Go to the documentation of this file.
32 static constexpr std::string_view routineName{
"TSNAIAChain::Add"};
35 Long64_t ntrees[3] = {0, 0, 0};
37 ntrees[0] += TChain::Add(name, nentries);
49 ntrees[1] +=
rti_chain.Add(name, nentries);
51 if (
rti ==
nullptr && !
IsMC()) {
55 if (ntrees[1] != ntrees[0]) {
56 logger->warn(
"I found {} NAIAChain trees but only {} RTIInfo trees", ntrees[0], ntrees[1]);
63 if (
finfo ==
nullptr) {
71 if (ntrees[2] != ntrees[0]) {
72 logger->warn(
"I found {} NAIAChain trees but only {} FileInfo trees", ntrees[0], ntrees[2]);
84 throw(std::runtime_error(
"UpdateEventRTIInfo called on a MC chain"));
89 int ret =
rti_chain.GetEntryWithIndex(UT);
90 return (ret > 0) ?
rti :
nullptr;
95 int ret = TChain::GetEntry(entry, getall);
101 Long64_t current = GetReadEntry();
108 Long64_t Entry_num = GetEntryNumberWithIndex(run, event);
TSNAIAChain()
standard constructor
Container class for additional MC File information.
void SetMC(bool isMC)
Set wether this is a MC event or not.
RTIInfo * rti
pointer to the current RTI info in memory
Event * GetEventWithRunEvent(int run, int event)
load the requested entry in the chain and the corresponding (in time) RTIInfo
TS NAIA Chain true TChain.
FileInfo * finfo
pointer to the current FileInfo in memory
TChain rti_chain
pointer to the chain of the RTI objects
Container class for processed File information.
RTIInfo * UpdateEventRTIInfo(unsigned int UT)
load the RTIInfo object closer to chosen time
MCFileInfo * mcfinfo
pointer to the current MCFileInfo in memory
auto getLogger(std::string_view fnName)
Create a new logger with a given function name.
Int_t Add(const char *name, Long64_t nentries=kBigNumber) override
Add files to the chain (standard TChain syntax)
~TSNAIAChain() override
standard destructor
Container class for RTI info.
unsigned int UTCTime
JMDC unix time (seconds since 1 Jan 1970)
void SetAllBranchAddress(TTree *tree)
Forwards this tree to all containers so that each one can create its own branch address for reading o...
bool IsMC()
checks if the current files are MC or data
static const std::string BranchName
Int_t GetNextEntry(bool reset=false)
Loads the next event in the chain.
TSNaiaAChain class description.
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
Event * ev
pointer to the current event in memory
TChain file_chain
pointer to the chain of th FileInfo objects