Selector to process trees containing Event structures.
#ifndef ProofEventProc_h
#define ProofEventProc_h
public :
Event *event;
EventHeader fEvtHdr;
void InitEvent() { event = 0 ; fEventName = 0; fTracks = 0;
fHighPt = 0; fMuons = 0; fH = 0; fIsValid =
kFALSE; }
ProcFileElements *fProcElem;
void CheckRanges();
ProofEventProc(
TTree *) { InitEvent(); fFullRead =
kTRUE; fTestAbort = -1;
fPtHist = 0; fPzHist = 0; fPxPyHist = 0;
fEntMin = -1; fEntMax = -1; fProcElems = 0; fProcElem = 0;}
ProofEventProc() { InitEvent(); fFullRead =
kTRUE; fTestAbort = -1;
fPtHist = 0; fPzHist = 0; fPxPyHist = 0;
fEntMin = -1; fEntMax = -1; fProcElems = 0; fProcElem = 0;}
virtual ~ProofEventProc() {
if (fProcElems) { fProcElems->
SetOwner(
kFALSE);
delete fProcElems;} }
virtual void SetOption(
const char *option) { fOption = option; }
};
#endif
#ifdef ProofEventProc_cxx
{
fEventName=0;
fTracks=0;
fHighPt=0;
fMuons=0;
fH=0;
}
Bool_t ProofEventProc::Notify()
{
if (fChain) {
Info(
"Notify",
"processing file: %s", fn.
Data());
}
if (fProcElem) fProcElem->Add(fEntMin, fEntMax);
fEntMin = -1;
fEntMax = -1;
if (fProcElems) fProcElem = (ProcFileElements *) fProcElems->
FindObject(fn);
if (!fProcElem) {
Info(
"Notify",
"assigned new file: create ProcFileElements entry");
fProcElem =
new ProcFileElements(fn.
Data());
if (!fProcElems) fProcElems =
new TList;
if (fProcElems) fProcElems->
Add(fProcElem);
}
b_event_fType = fChain->
GetBranch(
"fType[20]");
b_fEventName = fChain->
GetBranch(
"fEventName");
b_event_fNtrack = fChain->
GetBranch(
"fNtrack");
b_event_fNvertex = fChain->
GetBranch(
"fNvertex");
b_event_fTemperature = fChain->
GetBranch(
"fTemperature");
b_event_fMeasures = fChain->
GetBranch(
"fMeasures[10]");
b_event_fMatrix = fChain->
GetBranch(
"fMatrix[4][4]");
b_fClosestDistance = fChain->
GetBranch(
"fClosestDistance");
b_event_fEvtHdr = fChain->
GetBranch(
"fEvtHdr");
b_event_fLastTrack = fChain->
GetBranch(
"fLastTrack");
b_event_fWebHistogram = fChain->
GetBranch(
"fWebHistogram");
b_event_fTriggerBits = fChain->
GetBranch(
"fTriggerBits");
b_event_fIsValid = fChain->
GetBranch(
"fIsValid");
}
#endif
Class to hold information about the processed elements of a file.
#define ClassDef(name, id)
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
A TTree is a list of TBranches.
An array of clone (identical) objects.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
1-D histogram with a float per channel (see TH1 documentation)}
2-D histogram with a float per channel (see TH1 documentation)}
virtual void Add(TObject *obj)
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
An array of references to TObjects.
Persistent Reference link to a TObject A TRef is a lightweight object pointing to any TObject.
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
virtual void SetObject(TObject *obj)
virtual void Init(TTree *)
virtual int Version() const
TSelectorList * fOutput
! List of objects created during processing
virtual Bool_t Process(Long64_t)
virtual void SlaveBegin(TTree *)
virtual void SetOption(const char *option)
virtual void SetInputList(TList *input)
virtual TList * GetOutputList() const
virtual Bool_t Notify()
This method must be overridden to handle object notification.
virtual void SlaveTerminate()
virtual void Begin(TTree *)
const char * Data() const
A TTree represents a columnar dataset.
virtual TBranch * GetBranch(const char *name)
Return pointer to the branch with the given name in this tree or its friends.
TFile * GetCurrentFile() const
Return pointer to the current file.
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=0)
Change branch address, dealing with clone trees properly.
virtual void SetMakeClass(Int_t make)
Set all the branches in this TTree to be in decomposed object mode (also known as MakeClass mode).