SND@LHC Software
Loading...
Searching...
No Matches
sndEventHeaderBaseCut.cxx
Go to the documentation of this file.
2
3#include <stdexcept>
4
5#include "SNDLHCEventHeader.h"
6#include "TChain.h"
7
8namespace snd::analysis_cuts {
9
11 TChain * EventHeaderBaseCut::tree = 0;
12
14 if (header == 0){
16 ch->SetBranchAddress("EventHeader", &header);
17 ch->GetEntry(0);
18 if (header->GetEventTime() == -1) {
19 ch->SetBranchAddress("EventHeader.", &header);
20 ch->GetEntry(0);
21 if (header->GetEventTime() == -1) throw std::runtime_error("Invalid event header");
22 }
23 tree = ch;
24 }
25 }
26}