NAIA
1.0.1
|
#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... | |
bool | IsMC () const |
Check if this is an 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.
NAIA 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, secondTrTrackBase, tofBase, tofBaseSt, tofPlus, tofPlusSt, trdKBase, trdKBaseSt, trTrackBase, trTrackBaseSt, and trTrackPlus.
Referenced by NAIA::NAIAChain::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 NAIA::MatchAllBits().
void NAIA::Event::Clear | ( | ) |
Clear all containers.
Definition at line 179 of file Event.cpp.
References NAIA::EventSummaryData::Clear(), NAIA::HeaderData::Clear(), NAIA::UnbExtHitBaseData::Clear(), NAIA::EcalBaseData::Clear(), NAIA::DAQData::Clear(), NAIA::TofBaseData::Clear(), NAIA::RichBaseData::Clear(), NAIA::MCTruthBaseData::Clear(), NAIA::TrTrackBaseData::Clear(), NAIA::TrdKBaseData::Clear(), NAIA::MCTruthPlusData::Clear(), NAIA::EcalPlusData::Clear(), NAIA::TofPlusData::Clear(), NAIA::TrTrackPlusData::Clear(), NAIA::RichPlusData::Clear(), daq, ecalBase, ecalPlus, evSummary, extHitBase, header, LinkContainers(), m_isMC, mcTruthBase, mcTruthPlus, richBase, richPlus, secondTrTrackBase, tofBase, tofBaseSt, tofPlus, tofPlusSt, trdKBase, trdKBaseSt, trTrackBase, trTrackBaseSt, and trTrackPlus.
Referenced by NAIA::NAIAChain::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 109 of file Event.cpp.
References daq, ecalBase, ecalPlus, evSummary, extHitBase, header, NAIA::OnDemandContainer< T >::LoadEvent(), m_isMC, mcTruthBase, mcTruthPlus, richBase, richPlus, secondTrTrackBase, tofBase, tofBaseSt, tofPlus, tofPlusSt, trdKBase, trdKBaseSt, trTrackBase, trTrackBaseSt, and trTrackPlus.
|
inline |
void NAIA::Event::LinkContainers | ( | ) |
Setup dependencies between containers. E.g: TrTrackPlus needs info from TrTrackBase, and so on...
Definition at line 216 of file Event.cpp.
References extHitBase, NAIA::UnbExtHitBaseData::tofBase, tofBaseSt, NAIA::UnbExtHitBaseData::trdBase, trdKBase, trdKBaseSt, 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 74 of file Event.cpp.
References daq, ecalBase, ecalPlus, evSummary, extHitBase, header, m_isMC, mcTruthBase, mcTruthPlus, NAIA::OnDemandContainer< T >::MirrorBranch(), richBase, richPlus, secondTrTrackBase, tofBase, tofBaseSt, tofPlus, tofPlusSt, trdKBase, trdKBaseSt, trTrackBase, trTrackBaseSt, 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 39 of file Event.cpp.
References daq, ecalBase, ecalPlus, evSummary, extHitBase, header, m_isMC, mcTruthBase, mcTruthPlus, richBase, richPlus, secondTrTrackBase, NAIA::OnDemandContainer< T >::SetBranchAddress(), tofBase, tofBaseSt, tofPlus, tofPlusSt, trdKBase, trdKBaseSt, trTrackBase, trTrackBaseSt, and trTrackPlus.
Referenced by NAIA::NAIAChain::GetEvent(), and NAIA::NAIAChain::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 144 of file Event.cpp.
References daq, ecalBase, ecalPlus, evSummary, extHitBase, header, m_isMC, mcTruthBase, mcTruthPlus, richBase, richPlus, secondTrTrackBase, NAIA::OnDemandContainer< T >::SetTreeEntry(), tofBase, tofBaseSt, tofPlus, tofPlusSt, trdKBase, trdKBaseSt, trTrackBase, trTrackBaseSt, and trTrackPlus.
Referenced by NAIA::NAIAChain::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::NAIAChain::SetupBranches().
DAQ NAIA::Event::daq |
Definition at line 106 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
EcalBase NAIA::Event::ecalBase |
Definition at line 114 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
EcalPlus NAIA::Event::ecalPlus |
Definition at line 115 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
EventSummary NAIA::Event::evSummary |
Definition at line 104 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
UnbExtHitBase NAIA::Event::extHitBase |
Definition at line 130 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), LinkContainers(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
Header NAIA::Event::header |
Definition at line 103 of file Event.h.
Referenced by BranchAll(), CheckMask(), Clear(), ForceReadAllBranches(), NAIA::NAIAChain::GetEventFileInfo(), NAIA::NAIAChain::GetEventMCFileInfo(), NAIA::NAIAChain::GetEventRTIInfo(), MirrorBranches(), SetAllBranchAddress(), SetEventNumber(), and SetMaskCategory().
|
private |
Definition at line 136 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), IsMC(), MirrorBranches(), SetAllBranchAddress(), SetEventNumber(), and SetMC().
MCTruthBase NAIA::Event::mcTruthBase |
Definition at line 132 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
MCTruthPlus NAIA::Event::mcTruthPlus |
Definition at line 133 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
RichBase NAIA::Event::richBase |
Definition at line 127 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
RichPlus NAIA::Event::richPlus |
Definition at line 128 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
SecondTrTrackBase NAIA::Event::secondTrTrackBase |
Definition at line 120 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
TofBase NAIA::Event::tofBase |
Definition at line 108 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
TofBaseStandalone NAIA::Event::tofBaseSt |
Definition at line 111 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), LinkContainers(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
TofPlus NAIA::Event::tofPlus |
Definition at line 109 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
TofPlusStandalone NAIA::Event::tofPlusSt |
Definition at line 112 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
TrdKBase NAIA::Event::trdKBase |
Definition at line 124 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), LinkContainers(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
TrdKBaseStandalone NAIA::Event::trdKBaseSt |
Definition at line 125 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), LinkContainers(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
TrTrackBase NAIA::Event::trTrackBase |
Definition at line 117 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), LinkContainers(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
TrTrackBaseStandalone NAIA::Event::trTrackBaseSt |
Definition at line 122 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().
TrTrackPlus NAIA::Event::trTrackPlus |
Definition at line 118 of file Event.h.
Referenced by BranchAll(), Clear(), ForceReadAllBranches(), LinkContainers(), MirrorBranches(), SetAllBranchAddress(), and SetEventNumber().