JSFModule
class description - source file - inheritance tree
protected:
void ConfDirectory()
public:
JSFModule(const Char_t* name = "JSFModule", const Char_t* title = "JSF Default Module", Option_t* opt)
JSFModule(const JSFModule&)
virtual ~JSFModule()
virtual Bool_t BeginRun(Int_t nrun)
static TClass* Class()
virtual Bool_t EndRun()
virtual JSFEventBuf* EventBuf()
TBranch* GetBranch()
TFile* GetFile()
virtual Bool_t GetLastRunInfo()
Bool_t GetMakeBranch()
TTree* GetTree()
virtual Bool_t Initialize()
virtual TClass* IsA() const
Bool_t IsWritable()
virtual void MakeBranch(TTree* tree)
virtual void PrintInfo()
virtual Bool_t Process(Int_t event)
virtual Bool_t ReadCommandArgument(int* argc, char** argv)
virtual void SetBranch(TTree* tree)
void SetBufferSize(Int_t size)
void SetFile(TFile* file)
void SetMakeBranch(Bool_t flag)
void SetModuleStatus(EJSFModuleStatus stat)
void SetRunNumber(Int_t nrun)
void SetSplit(Int_t split)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
virtual Bool_t Terminate()
protected:
Int_t fVersion Version number of the module
TList* fHistograms ! Pointer to the histograms ( =0 no histo)
TFile* fFile ! Where the data of this module is read/write
TTree* fTree ! pointer to event tree.
TBranch* fBranch ! Branch for this module.
Int_t fRunNumber run number
Int_t fSplit Split value for the branch
Int_t fBufferSize Buffer size of the branch
Bool_t fMakeBranch kTRUE to create branch for this module.
JSFEventBuf* fEventBuf ! Pointer to event data, saved in the Event tree
EJSFModuleStatus fStat ! Module status
See also
-
JSFGenerator, JSFLCFULL, JSFMEGenerator, JSFMergeEvent, JSFQuickSim, JSFSIMDST, JSFSpring
JSFModule
Basic unit of data analysis
User Analysis class should be derived from this class.
Basic member functions for data analysis are,
Initialize()
BeginRun(Int_t RunNumber)
Process(Int_t EventNumber)
EndRun()
Terminate()
User class should override these functions.
fFile is a pointer data member to the file. It is set by JSFSteer
and can be READ/WRITE/UPDATE. (UPDATE may not work properly yet.)
Event data is stored in the tree, Event, in the "fFile". Other
configuration data are stored as an Keyed file in the "fFile".
Directory and key names are,
Initialize() --> /conf/init/[modulename]
BeginRun(nnn) --> /conf/beginNNNNNN/[modulename]
EndRun(nnn) --> /conf/endNNNNN/[modulename]
Terminate() --> /conf/term/[modulename]
Note that key names have been changed since JSF-1-11, to
simplfy the directory structure.
The member function, ConfDirectory(), creates and cd to proper
directory. How to write/read data is depend on the implementaion
of the class.
Process is called only when the "fFile" is writable, while other
functions are called evenif fFile is not writable. If Initialize,
BeginRun, EndRun, or Terminate is called when fFile is not writable,
they should prepare data member of the class properly.
Event data is saved in the object pointed by fEventBuf, which is
the JSFEventBuf object. JSFModule does not create JSFEventBuf.
User class dereived from JSFModule should define fEventBuf.
The member function, MakeBranch() and SetBranch() is called from
JSFSteer::Initialize(). MakeBranch() defines the tree branch to
store event data, while SetBranch() set addresses to read tree data.
Usually, user read event data by tree->Fill(), which readin all branches
in the tree. If the branch address is not set properly, the program will
crash. When reading the root data, JSFSteer read the header and creats
the objetcs required to get tree data.
$Id: JSFModule.cxx,v 1.7 2001/11/06 05:17:15 miyamoto Exp $
JSFModule(const char *name, const char *title, Option_t *opt)
:TNamed(name,title)
Default constructor of JSF module.
If opt != "", the module is not included in the module list of JSFSteer.
~JSFModule()
Destrutor of JSF module.
void PrintInfo()
Bool_t Process(Int_t ev)
Called at each events. This function is not called when
the default file assigned to the class (fFile) is not writable.
Bool_t Initialize()
void ConfDirectory()
cd to conf directory to access configuration information
or where event tree is.
Bool_t BeginRun(Int_t nrun)
The BeginRun function is called when new run is started.
Each module
should output run dependant parameter here by object->Write() statement.
Bool_t EndRun()
End of run.
Bool_t Terminate()
End of run.
Bool_t GetLastRunInfo()
void MakeBranch(TTree *tree)
Make branch of the module
void SetBranch(TTree *tree)
Set Branch address for this module
Inline Functions
void SetModuleStatus(EJSFModuleStatus stat)
void SetRunNumber(Int_t nrun)
Bool_t ReadCommandArgument(int* argc, char** argv)
void SetSplit(Int_t split)
void SetBufferSize(Int_t size)
TBranch* GetBranch()
void SetMakeBranch(Bool_t flag)
Bool_t GetMakeBranch()
TFile* GetFile()
TTree* GetTree()
void SetFile(TFile* file)
JSFEventBuf* EventBuf()
Bool_t IsWritable()
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
JSFModule JSFModule(const JSFModule&)
Last update: Tue Jan 20 15:53:52 2004
ROOT page - Home page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.