FairRoot/PandaRoot
|
#include <TGo4EventElement.h>
Public Member Functions | |
TGo4EventElement () | |
TGo4EventElement (const char *name) | |
TGo4EventElement (const char *aName, const char *aTitle, Short_t aBaseCat=0) | |
virtual | ~TGo4EventElement (void) |
void | SetValid (Bool_t on) |
Bool_t | IsValid () const |
void | SetEventSource (TGo4EventSource *src) |
void | SetParent (TGo4EventElement *par) |
TGo4EventElement * | GetParent () const |
TGo4EventSource * | GetEventSource () const |
Bool_t | CheckEventSource (const char *classname) |
virtual Int_t | Fill () |
virtual Int_t | Init () |
virtual void | PrintEvent () |
virtual void | makeBranch (TBranch *parent) |
virtual void | deactivate () |
virtual void | activate () |
virtual void | Clear (Option_t *t="") |
virtual void | clearAll (Int_t) |
virtual Bool_t | isComposed () |
virtual Short_t | getId () |
virtual void | setDebug (Bool_t debug) |
virtual TGo4EventElement & | operator[] (Int_t) |
virtual void | Print (Option_t *option="") const |
virtual void | synchronizeWithTree (TTree *tree, TGo4EventElement **var_ptr=0) |
virtual Int_t | activateBranch (TBranch *branch, Int_t index=0, TGo4EventElement **var_ptr=0) |
Protected Attributes | |
Short_t | fIdentifier |
Bool_t | fDebug |
Private Attributes | |
Bool_t | fbIsValid |
TGo4EventElement * | fxParent |
TGo4EventSource * | fxEventSource |
Definition at line 36 of file TGo4EventElement.h.
TGo4EventElement::TGo4EventElement | ( | ) |
Definition at line 23 of file TGo4EventElement.cxx.
TGo4EventElement::TGo4EventElement | ( | const char * | name | ) |
Definition at line 33 of file TGo4EventElement.cxx.
TGo4EventElement::TGo4EventElement | ( | const char * | aName, |
const char * | aTitle, | ||
Short_t | aBaseCat = 0 |
||
) |
Definition at line 43 of file TGo4EventElement.cxx.
|
virtual |
Definition at line 53 of file TGo4EventElement.cxx.
|
virtual |
Definition at line 168 of file TGo4EventElement.cxx.
|
virtual |
THIS WAS OLD CODE FROM TGo4FileSource
void TGo4EventElement::synchronizeWithTree(TTree *tree, TGo4EventElement** var_ptr)
TString topname; Bool_t masterbranch=kFALSE; TString branchName = dest->GetName(); if(!fxBranchName.Contains(".")) { fxBranchName+="."; // for master branch, add dot. Subbranch names with dot separators do not get final dot masterbranch=kTRUE; } TObjArray* blist = tree->GetListOfBranches(); TBranch* topb = (TBranch*) blist->At(0); if(topb) { topname = topb->GetName(); cout <<"Activating top branch "<<topname.Data() << endl; tree->SetBranchAddress(topname.Data(),(void**) var_ptr); topb->SetAddress(&fxTopEvent); // this will not set address of possible cloned tree. we use the set address of the tree } tree->SetBranchStatus("*",0); // note: only deactivate subleafs after address of top branch is set! tree->SetBranchStatus(topname.Data(),1); // required to process any of the subbranches! TString wildbranch = branchName; wildbranch += "*"; tree->SetBranchStatus(wildbranch.Data(),1); cout <<"Build event activates: "<<wildbranch.Data() << endl; wildbranch = branchName; if(!masterbranch) wildbranch+="."; wildbranch+="*"; tree->SetBranchStatus(wildbranch.Data(),1); cout <<"Build event activates: "<<wildbranch.Data() << endl; fbActivated = kTRUE;
Definition at line 137 of file TGo4EventElement.cxx.
Referenced by synchronizeWithTree().
Bool_t TGo4EventElement::CheckEventSource | ( | const char * | classname | ) |
Check if event source is valid. Tests the pointer for zero, and if not zero, compares classname of the event source with given string. To be used from the Fill method and from the analysis method init event classes.
Definition at line 57 of file TGo4EventElement.cxx.
|
virtual |
Reimplemented in TProtoUnpackEvent.
Definition at line 181 of file TGo4EventElement.cxx.
|
inlinevirtual |
Definition at line 91 of file TGo4EventElement.h.
|
virtual |
Definition at line 155 of file TGo4EventElement.cxx.
|
virtual |
Method called by the event owner (analysis step) to fill the event element from the set event source. Event source can be the source of the analysis step (if this is a raw event) or the event processor (if this is a reduced event). Fill method has to specify how the event source writes to the members of this event structure. Either by calling methods of the source (like myevent.a=fxEventSource->GetA(); etc ), or by direct copy to the member (like fxEventSource->FillMemoryAt(&myevent.a);)
Definition at line 197 of file TGo4EventElement.cxx.
References Clear(), fxEventSource, res, and SetValid().
|
inline |
|
inlinevirtual |
|
inline |
|
virtual |
Method called on initialization of event classes. User might check the correct type of the eventsource here and assign this to a subclass pointer.
Definition at line 185 of file TGo4EventElement.cxx.
References Clear(), fxEventSource, res, and SetValid().
|
inlinevirtual |
Definition at line 92 of file TGo4EventElement.h.
|
inline |
Returns the valid state of this event.
Definition at line 50 of file TGo4EventElement.h.
References fbIsValid.
|
virtual |
Definition at line 71 of file TGo4EventElement.cxx.
|
inlinevirtual |
Definition at line 95 of file TGo4EventElement.h.
|
virtual |
Definition at line 66 of file TGo4EventElement.cxx.
References PrintEvent().
|
virtual |
Method prints content of the event
Definition at line 62 of file TGo4EventElement.cxx.
Referenced by Print().
|
inlinevirtual |
|
inline |
Setter for the event source that is currently used by the Fill method.
Definition at line 53 of file TGo4EventElement.h.
References fxEventSource.
|
inline |
|
inline |
Switches the valid state of this event.
Definition at line 47 of file TGo4EventElement.h.
References fbIsValid.
Referenced by Fill(), and Init().
|
virtual |
Use this method to map event structure with the Tree branch(es)
Definition at line 77 of file TGo4EventElement.cxx.
References activateBranch(), and TString.
|
private |
Indicates if this event is valid or not. If false, the event store will not write the event.
Definition at line 108 of file TGo4EventElement.h.
Referenced by IsValid(), and SetValid().
|
protected |
Definition at line 124 of file TGo4EventElement.h.
Referenced by setDebug().
|
protected |
Definition at line 123 of file TGo4EventElement.h.
Referenced by getId().
|
private |
The external event source instance which is used to fill this event structure from the raw event. Lazy initialization as zero; the pointer is set by analysis only for top level Event Elements with subevents. Might be exchanged on the fly to switch the unpack of different subevents into the same event structure. 0..1
Definition at line 120 of file TGo4EventElement.h.
Referenced by Fill(), GetEventSource(), Init(), and SetEventSource().
|
private |
The higher level event element that owns this instance 1
Definition at line 112 of file TGo4EventElement.h.
Referenced by GetParent(), and SetParent().