NAIA
1.1.1
|
TS NAIA Chain true TChain. More...
#include <TSNaiaChain.h>
Public Member Functions | |
TSNAIAChain () | |
standard constructor More... | |
~TSNAIAChain () override | |
standard destructor More... | |
Int_t | Add (const char *name, Long64_t nentries=kBigNumber) override |
Add files to the chain (standard TChain syntax) More... | |
bool | IsMC () |
checks if the current files are MC or data More... | |
Int_t | GetEntry (Long64_t entry=0, Int_t getall=0) override |
load the requested entry in the chain and the corresponding (in time) RTIInfo More... | |
Event * | GetEvent (Long64_t entry) |
load the requested entry in the chain and the corresponding (in time) RTIInfo More... | |
Event * | GetEventWithRunEvent (int run, int event) |
load the requested entry in the chain and the corresponding (in time) RTIInfo More... | |
Int_t | GetNextEntry (bool reset=false) |
Loads the next event in the chain. More... | |
Public Attributes | |
TChain | rti_chain |
pointer to the chain of the RTI objects More... | |
TChain | file_chain |
pointer to the chain of th FileInfo objects More... | |
Event * | ev |
pointer to the current event in memory More... | |
RTIInfo * | rti |
pointer to the current RTI info in memory More... | |
FileInfo * | finfo |
pointer to the current FileInfo in memory More... | |
MCFileInfo * | mcfinfo |
pointer to the current MCFileInfo in memory More... | |
Private Member Functions | |
RTIInfo * | UpdateEventRTIInfo (unsigned int UT) |
load the RTIInfo object closer to chosen time More... | |
ClassDefOverride (TSNAIAChain, 1) | |
TS NAIA Chain true TChain.
This class is derived from TChain and then has all the typical chain properties included the use of the of a TSelector class with the TChain::Process method. This class is intended to be used as alternative and in parallel with the NAIAChain class.
This class takes care of opening also the helper chains for the RTI and FILEinfo TTrees contained in a typical NAIA file. When using the GetEntry, GetEntryWithIndex, GetEvent and GetNextEvent this class takes care of automatically update the RTIInfo branch.
Definition at line 38 of file TSNaiaChain.h.
TSNAIAChain::TSNAIAChain | ( | ) |
standard constructor
Definition at line 15 of file TSNaiaChain.cpp.
References file_chain, and rti_chain.
|
override |
|
override |
Add files to the chain (standard TChain syntax)
Definition at line 31 of file TSNaiaChain.cpp.
References ev, file_chain, finfo, GetEntry(), NAIA::getLogger(), IsMC(), mcfinfo, rti, rti_chain, NAIA::Event::SetAllBranchAddress(), and NAIA::Event::SetMC().
|
private |
|
override |
load the requested entry in the chain and the corresponding (in time) RTIInfo
Definition at line 94 of file TSNaiaChain.cpp.
Referenced by Add(), GetEvent(), GetEventWithRunEvent(), and GetNextEntry().
|
inline |
load the requested entry in the chain and the corresponding (in time) RTIInfo
Definition at line 81 of file TSNaiaChain.h.
References ev, and GetEntry().
Event * TSNAIAChain::GetEventWithRunEvent | ( | int | run, |
int | event | ||
) |
load the requested entry in the chain and the corresponding (in time) RTIInfo
Definition at line 107 of file TSNaiaChain.cpp.
References ev, and GetEntry().
Int_t TSNAIAChain::GetNextEntry | ( | bool | reset = false | ) |
Loads the next event in the chain.
reset | restart from the first event in the chain |
Definition at line 100 of file TSNaiaChain.cpp.
References GetEntry().
bool TSNAIAChain::IsMC | ( | ) |
checks if the current files are MC or data
Definition at line 80 of file TSNaiaChain.cpp.
References NAIA::MCTruthBase::BranchName.
Referenced by Add(), and UpdateEventRTIInfo().
|
private |
load the RTIInfo object closer to chosen time
UT | the requeste UTC time |
Definition at line 82 of file TSNaiaChain.cpp.
References IsMC(), rti, rti_chain, and NAIA::RTIInfo::UTCTime.
Event* NAIA::TSNAIAChain::ev |
pointer to the current event in memory
Definition at line 47 of file TSNaiaChain.h.
Referenced by Add(), GetEvent(), GetEventWithRunEvent(), and ~TSNAIAChain().
TChain NAIA::TSNAIAChain::file_chain |
pointer to the chain of th FileInfo objects
Definition at line 43 of file TSNaiaChain.h.
Referenced by Add(), and TSNAIAChain().
FileInfo* NAIA::TSNAIAChain::finfo |
pointer to the current FileInfo in memory
Definition at line 51 of file TSNaiaChain.h.
Referenced by Add(), and ~TSNAIAChain().
MCFileInfo* NAIA::TSNAIAChain::mcfinfo |
pointer to the current MCFileInfo in memory
Definition at line 53 of file TSNaiaChain.h.
Referenced by Add(), and ~TSNAIAChain().
RTIInfo* NAIA::TSNAIAChain::rti |
pointer to the current RTI info in memory
Definition at line 49 of file TSNaiaChain.h.
Referenced by Add(), UpdateEventRTIInfo(), and ~TSNAIAChain().
TChain NAIA::TSNAIAChain::rti_chain |
pointer to the chain of the RTI objects
Definition at line 41 of file TSNaiaChain.h.
Referenced by Add(), TSNAIAChain(), and UpdateEventRTIInfo().