StBFChain Class Reference

#include <StBFChain.h>

Inheritance diagram for StBFChain:
StChain StMaker

List of all members.

Public Member Functions

 StBFChain (const char *name="bfc", const Bool_t UseOwnHeader=kFALSE)
void Setup (Int_t mode=1)
virtual ~StBFChain ()
 Destructor. Call Finish() . See this method for detail on what is cleaned.
virtual Int_t Make (int number)
virtual Int_t Make ()
virtual Int_t Load ()
 Routine handling library loading depending on chain options.
virtual Int_t Instantiate ()
 Maker-instantiation handler.
virtual Int_t Init ()
virtual Int_t AddAB (const Char_t *after="", const StMaker *maker=0, const Int_t Opt=1)
virtual Int_t AddAfter (const Char_t *after, const StMaker *maker)
virtual Int_t AddBefore (const Char_t *before, const StMaker *maker)
void SetFlags (const Char_t *Chain="gstar tfs")
 Scan all flags, check if they are correct, manipulate the comment if necessary.
void Set_IO_Files (const Char_t *infile=0, const Char_t *outfile=0)
void SetInputFile (const Char_t *infile=0)
void SetOutputFile (const Char_t *outfile=0)
 Takes care of output file name (extension).
void SetTFile (TFile *tf)
TFile * GetTFile () const
virtual Int_t kOpt (const TString *Tag, Bool_t Check=kTRUE) const
 Check option if defined.
virtual Int_t kOpt (const Char_t *Tag, Bool_t Check=kTRUE) const
 Check option if defined (Char_t argument interface).
virtual void SetDbOptions (StMaker *db=0)
 Treats the DbV options used for database timestamp.
virtual void SetGeantOptions (StMaker *geant=0)
 Handles all geant options.
virtual void SetTreeOptions ()
 Creates output-tree branches.
virtual void SetOption (const Int_t k, const Char_t *chain="Chain")
 Enable/disable valid command line options.
virtual void SetOption (const Char_t *Opt, const Char_t *chain="Chain")
virtual void SetOption (const TString *Opt, const Char_t *chain="Chain")
virtual void SetOptions (const Char_t *Opt, const Char_t *chain="Chain")
virtual void SetOptionOff (const Char_t *Opt, const Char_t *chain="Chain")
virtual void SetOptionOff (const TString *Opt, const Char_t *chain="Chain")
virtual Int_t Finish ()
 Really the destructor (close files, delete pointers etc ...).
virtual Option_t * GetOption () const
virtual Bool_t GetOption (const Int_t k) const
 Returns chain-option state (on/off).
virtual Bool_t GetOption (const TString *Opt, Bool_t Check=kTRUE) const
virtual Bool_t GetOption (const Char_t *Opt, Bool_t Check=kTRUE) const
virtual Char_t * GetOptionString (const Char_t *)
 Returns the comment string associated to an option.
virtual const TString & GetFileIn () const
virtual const TString & GetFileOut () const
TString GetGeometry () const
virtual Long_t ProcessLine (const char *line)
virtual const char * GetCVS () const

Static Public Member Functions

static Int_t ParseString (const TString &tChain, TObjArray &Opt, Bool_t Sort=kFALSE)

Detailed Description

Author:
Yuri Fisyak, Jerome LAURET
Date:
1999/07/29 , 2001-2011 @(#)StRoot/StBFChain:
Name

:

Id
StBFChain.h,v 1.54 2014/08/06 11:42:52 jeromel Exp

Class to control "BFC" chain

This class :

Definition at line 32 of file StBFChain.h.


Member Function Documentation

Char_t * StBFChain::GetOptionString ( const Char_t *  Opt  )  [virtual]

Returns the comment string associated to an option.

Any option passed a bla=XX is reshaped as follow ...

  • The SetFlags() function strip out the =XX part and replaces the comment by the value XX
  • This GetOptionString() returns the comment part so makers can globally access the option string.

Note : If the requested option is not part of the global BFC[] array, the kOpt() method is going to scream at you but it will still work. You can ask for that option to be added to the chain official options later whenever your code debugging is done. In other words, this method allows you to pass ANY options not officially declared and use it as test/work-around to pass any parameters to your maker.

However, if the parameters are to be used in production, we DO request/require that they are declared as a valid option.

Definition at line 1261 of file StBFChain.cxx.

References kOpt().

Int_t StBFChain::Instantiate (  )  [virtual]

Maker-instantiation handler.

This routine contains it all (make instantiation that is), from calibration precedence to parameter setting depending on option etc ... Other thing done here which deserves attention

  • The maker's SetMode() mechanism is treated here.
  • Calibration options like NoMySQLDb, NoCintCalDb or NoCintDb and path are set
  • SetFlavor() sim+ofl or sim, and filestreams is made

If a maker is added along with some flag options, this is the place to implement the switches.

Definition at line 214 of file StBFChain.cxx.

References StMaker::GetName(), kOpt(), StMaker::SetActive(), SetDbOptions(), SetGeantOptions(), and SetTreeOptions().

Int_t StBFChain::kOpt ( const TString *  tag,
Bool_t  Check = kTRUE 
) const [virtual]

Check option if defined.

This method checks if the options are valid by comparing them to the list of declared options. This is called for each option passed as argument. The real sorting of all options is done in SetFlags().

Definition at line 981 of file StBFChain.cxx.

Referenced by GetOptionString(), Instantiate(), kOpt(), and Setup().

virtual Int_t StBFChain::Make (  )  [inline, virtual]

The Make() method is the one responsible for calling the maker's InitRun(). Note that that InitRun() is called for real data and if both of the following are true

  • a header exists
  • the run number changes

This is the ONLY place calling the InitRun() routine.

check privilege to skip event

Reimplemented from StChain.

Definition at line 69 of file StBFChain.h.

void StBFChain::SetDbOptions ( StMaker mk = 0  )  [virtual]

Treats the DbV options used for database timestamp.

Re-scan all options and search for dbv options. This method also sorts out the string-based database timestamp for reconstruction. Those have to be in phase with the geant geometry (see SetGeantOptions()) if simulation is being reconstructed.

The order matters since a later option would overwrite an earlier one. The mechanism introduced for a dynamic (i.e. not pre-defined) timestamp is that it will be used ONLY if there are no other timestamp options. Be aware of this precedence ...

Definition at line 1566 of file StBFChain.cxx.

References StMaker::GetName().

Referenced by Instantiate().

void StBFChain::SetFlags ( const Char_t *  Chain = "gstar tfs"  ) 

Scan all flags, check if they are correct, manipulate the comment if necessary.

This method checks if the options passed are correct and/or sorts out the extraneous information passed through the comment if applies. Two special flags exists, that is, dbv and sdt for database interraction ...

  • The dbv tag is used to setup the end-time for entries (time after which any database insertions will be ignored). This is used to provide a mechanism by which we can run production with a stable set of calibration constant and still allow for development value insertion to get in.
  • The sdt tag is used to setup the database look-up time stamp that is, on which date to look at the database. This is usefull if we want to decouple Geant geometry and database calibration constants. This may also be used to get database values when you do not run over a raw data file.
  • The geometry options are now dynamic. This includes BOTH Y(ear) based geometries and RY geometry (Real data) options. They are defined now in StMaker as a static map.

The GOptXXXvvvvvv options are used to pass an flexible option value vvvvvv to makers in the chain matching the name XXX. The three letter acronym will be following the detector sub-systems naming. If a maker uses such convenience, the basic rule applies:

  • the Maker MUST use a centralized conversion function of vvvvvv to a private structure with explicit naming of each switches
  • explaination on usage and the thourough explaination of the meaning of the values vvvvvv must be clearly added to the documentation

Definition at line 1299 of file StBFChain.cxx.

References StMaker::GetName(), SetOption(), and Setup().

void StBFChain::SetGeantOptions ( StMaker geantMk = 0  )  [virtual]

Handles all geant options.

This method sets the Geant options that is the Geometry loading part. Depends on St_geant_Maker instantiated in the Instantiate() method. Please, change SetDbOptions()

Definition at line 1521 of file StBFChain.cxx.

Referenced by Instantiate().

void StBFChain::Setup ( Int_t  mode = 1  ) 

This method can be called with mode 1 or 2 to enable chain setup 1 or chain setup 2.

Note: This constructor now accepts a second argument for the chain name. Embedding scripts were modified accordingly.

This was primarily set to make possible the transition between the regular chain and the ITTF chain options.

Definition at line 58 of file StBFChain.cxx.

References kOpt().

Referenced by SetFlags().


The documentation for this class was generated from the following files:
 All Classes Functions Variables

Generated on 30 Apr 2015 for STDATAFILTERMAKER by  doxygen 1.6.1