NAIA
|
#include <Chain/Event.h>
Public Member Functions | |
void | BranchAll (TTree *tree) |
Forwards this tree to all containers so that each one can create its own branch. More... | |
void | SetAllBranchAddress (TTree *tree) |
Forwards this tree to all containers so that each one can create its own branch address for reading operations. More... | |
void | MirrorBranches (TTree *tree, const Event &sourceEvent) |
Set all branch addresses for skimming, creates all branches reading from outside Event. More... | |
void | Clear () |
Clear all containers. More... | |
void | LinkContainers () |
Setup dependencies between containers. E.g: TrTrackPlus needs info from TrTrackBase, and so on... More... | |
void | SetEventNumber (unsigned long long iEv) |
Set the Event Number for all containers. The corresponding entry will be loaded upon the first read request. More... | |
bool | CheckMask (Category mask) |
Check the event mask against a predefined mask. More... | |
void | SetMaskCategory (Category cat) |
Set the given gategory bit to 1 in the event mask. More... | |
void | SetMC (bool isMC) |
Set wether this is a MC event or not. More... | |
void | ForceReadAllBranches () |
Force data reading for all branches. Don't use unless you need it. Rely on read-on-demand instead. More... | |
Private Attributes | |
bool | m_isMC = false |
Event object.
Single Tree Chain.
This class acts as an interface to group and access containers with information from the various subdetectors. This should be provided by the chain class as a transient view of the event data.
This class implements a data structure where all dataobjects are branches of a single tree. However all read/write operations are handled by the single containers.
void NAIA::Event::BranchAll | ( | TTree * | tree | ) |
Forwards this tree to all containers so that each one can create its own branch.
tree | The tree to be forwarded |
Definition at line 4 of file Event.cpp.
References NAIA::OnDemandContainer< T >::Branch(), daq, ecalBase, ecalPlus, evSummary, extHitBase, header, m_isMC, mcTruthBase, mcTruthPlus, richBase, richPlus, tofBase, tofBaseSt, tofPlus, tofPlusSt, trdKBase, trdKBaseSt, trTrackBase, and trTrackPlus.
Referenced by NAIA::SingleTreeChain::SetupBranches().
|
inline |
Check the event mask against a predefined mask.
mask |
Definition at line 72 of file Event.h.
References header, NAIA::HeaderData::Mask(), and MatchAllBits().
void NAIA::Event::Clear | ( | ) |
Clear all containers.
Definition at line 164 of file Event.cpp.
References NAIA::EventSummaryData::Clear(), NAIA::UnbExtHitBaseData::Clear(), NAIA::HeaderData::Clear(), NAIA::TofBaseData::Clear(), NAIA::EcalBaseData::Clear(), NAIA::DAQData::Clear(), NAIA::RichBaseData::Clear(), NAIA::MCTruthBaseData::Clear(), NAIA::TrTrackBaseData::Clear(), NAIA::TrdKBaseData::Clear(), NAIA::MCTruthPlusData::Clear(), NAIA::EcalPlusData::Clear(), NAIA::TofPlusData::Clear(), NAIA::RichPlusData::Clear(), NAIA::TrTrackPlusData::Clear(), daq, ecalBase, ecalPlus, evSummary, extHitBase, header, LinkContainers(), m_isMC, mcTruthBase, mcTruthPlus, richBase, richPlus, tofBase, tofBaseSt, tofPlus, tofPlusSt, trdKBase, trdKBaseSt, trTrackBase, and trTrackPlus.
Referenced by NAIA::SingleTreeChain::Clear().
void NAIA::Event::ForceReadAllBranches | ( | ) |
Force data reading for all branches. Don't use unless you need it. Rely on read-on-demand instead.
Definition at line 100 of file Event.cpp.
References daq, ecalBase, ecalPlus, evSummary, extHitBase, header, NAIA::OnDemandContainer< T >::LoadEvent(), m_isMC, mcTruthBase, mcTruthPlus, richBase, richPlus, tofBase, tofBaseSt, tofPlus, tofPlusSt, trdKBase, trdKBaseSt, trTrackBase, and trTrackPlus.
void NAIA::Event::LinkContainers | ( | ) |
Setup dependencies between containers. E.g: TrTrackPlus needs info from TrTrackBase, and so on...
Definition at line 198 of file Event.cpp.
References extHitBase, NAIA::UnbExtHitBaseData::tofBase, tofBaseSt, trdKBase, NAIA::TrdKBaseData::trkBase, NAIA::TrTrackPlusData::trkBase, trTrackBase, and trTrackPlus.
Referenced by Clear().
void NAIA::Event::MirrorBranches | ( | TTree * | tree, |
const Event & | sourceEvent | ||
) |
Set all branch addresses for skimming, creates all branches reading from outside Event.
tree | The tree to be forwarded |
sourceEvent | the Event from which we read the values |
Definition at line 68 of file Event.cpp.
References daq, ecalBase, ecalPlus, evSummary, extHitBase, header, m_isMC, mcTruthBase, mcTruthPlus, NAIA::OnDemandContainer< T >::MirrorBranch(), richBase, richPlus, tofBase, tofBaseSt, tofPlus, tofPlusSt, trdKBase, trdKBaseSt, trTrackBase, and trTrackPlus.
void NAIA::Event::SetAllBranchAddress | ( | TTree * | tree | ) |
Forwards this tree to all containers so that each one can create its own branch address for reading operations.
tree | The tree to be forwarded |
Definition at line 36 of file Event.cpp.
References daq, ecalBase, ecalPlus, evSummary, extHitBase, header, m_isMC, mcTruthBase, mcTruthPlus, richBase, richPlus, NAIA::OnDemandContainer< T >::SetBranchAddress(), tofBase, tofBaseSt, tofPlus, tofPlusSt, trdKBase, trdKBaseSt, trTrackBase, and trTrackPlus.
Referenced by NAIA::SingleTreeChain::GetEvent(), and NAIA::SingleTreeChain::SetupBranches().
void NAIA::Event::SetEventNumber | ( | unsigned long long | iEv | ) |
Set the Event Number for all containers. The corresponding entry will be loaded upon the first read request.
iEv | The event number |
Definition at line 132 of file Event.cpp.
References daq, ecalBase, ecalPlus, evSummary, extHitBase, header, m_isMC, mcTruthBase, mcTruthPlus, richBase, richPlus, NAIA::OnDemandContainer< T >::SetTreeEntry(), tofBase, tofBaseSt, tofPlus, tofPlusSt, trdKBase, trdKBaseSt, trTrackBase, and trTrackPlus.
Referenced by NAIA::SingleTreeChain::GetEvent().
|
inline |
Set the given gategory bit to 1 in the event mask.
cat | The category to be set |
Definition at line 79 of file Event.h.
References header, and NAIA::HeaderData::SetMaskCategory().
|
inline |
Set wether this is a MC event or not.
isMC |
Definition at line 86 of file Event.h.
References m_isMC.
Referenced by NAIA::SingleTreeChain::SetupBranches().
DAQ NAIA::Event::daq |
Definition at line 99 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
EcalBase NAIA::Event::ecalBase |
Definition at line 107 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
EcalPlus NAIA::Event::ecalPlus |
Definition at line 108 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
EventSummary NAIA::Event::evSummary |
Definition at line 97 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
UnbExtHitBase NAIA::Event::extHitBase |
Definition at line 119 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), LinkContainers(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
Header NAIA::Event::header |
Definition at line 96 of file Event.h.
Referenced by BranchAll(), CheckMask(), Clear(), ForceReadAllBranches(), NAIA::SingleTreeChain::GetEventFileInfo(), NAIA::SingleTreeChain::GetEventMCFileInfo(), NAIA::SingleTreeChain::GetEventRTIInfo(), MirrorBranches(), SetAllBranchAddress(), SetEventNumber(), and SetMaskCategory().
|
private |
Definition at line 125 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), SetEventNumber(), and SetMC().
MCTruthBase NAIA::Event::mcTruthBase |
Definition at line 121 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
MCTruthPlus NAIA::Event::mcTruthPlus |
Definition at line 122 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
RichBase NAIA::Event::richBase |
Definition at line 116 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
RichPlus NAIA::Event::richPlus |
Definition at line 117 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
TofBase NAIA::Event::tofBase |
Definition at line 101 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
TofBaseStandalone NAIA::Event::tofBaseSt |
Definition at line 104 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), LinkContainers(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
TofPlus NAIA::Event::tofPlus |
Definition at line 102 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
TofPlusStandalone NAIA::Event::tofPlusSt |
Definition at line 105 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
TrdKBase NAIA::Event::trdKBase |
Definition at line 113 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), LinkContainers(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
TrdKBaseStandalone NAIA::Event::trdKBaseSt |
Definition at line 114 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
TrTrackBase NAIA::Event::trTrackBase |
Definition at line 110 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), LinkContainers(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
TrTrackPlus NAIA::Event::trTrackPlus |
Definition at line 111 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), LinkContainers(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().