NAIA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Public Member Functions | Public Attributes | Private Attributes | List of all members
NAIA::Event Class Reference

Event object. More...

#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...
 

Public Attributes

Header header
 
EventSummary evSummary
 
DAQ daq
 
TofBase tofBase
 
TofPlus tofPlus
 
TofBaseStandalone tofBaseSt
 
TofPlusStandalone tofPlusSt
 
EcalBase ecalBase
 
EcalPlus ecalPlus
 
TrTrackBase trTrackBase
 
TrTrackPlus trTrackPlus
 
TrdKBase trdKBase
 
TrdKBaseStandalone trdKBaseSt
 
RichBase richBase
 
RichPlus richPlus
 
UnbExtHitBase extHitBase
 
MCTruthBase mcTruthBase
 
MCTruthPlus mcTruthPlus
 

Private Attributes

bool m_isMC = false
 

Detailed Description

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.

Definition at line 20 of file Event.h.

Member Function Documentation

void NAIA::Event::BranchAll ( TTree *  tree)

Forwards this tree to all containers so that each one can create its own branch.

Parameters
treeThe 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().

bool NAIA::Event::CheckMask ( Category  mask)
inline

Check the event mask against a predefined mask.

Parameters
mask
Returns
true if the event mask satisfies the requested flags

Definition at line 72 of file Event.h.

References header, NAIA::HeaderData::Mask(), and MatchAllBits().

void NAIA::Event::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.

Parameters
treeThe tree to be forwarded
sourceEventthe 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.

Parameters
treeThe 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.

Parameters
iEvThe 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().

void NAIA::Event::SetMaskCategory ( Category  cat)
inline

Set the given gategory bit to 1 in the event mask.

Parameters
catThe category to be set

Definition at line 79 of file Event.h.

References header, and NAIA::HeaderData::SetMaskCategory().

void NAIA::Event::SetMC ( bool  isMC)
inline

Set wether this is a MC event or not.

Parameters
isMC

Definition at line 86 of file Event.h.

References m_isMC.

Referenced by NAIA::SingleTreeChain::SetupBranches().

Member Data Documentation

DAQ NAIA::Event::daq
EcalBase NAIA::Event::ecalBase
EcalPlus NAIA::Event::ecalPlus
EventSummary NAIA::Event::evSummary
UnbExtHitBase NAIA::Event::extHitBase
Header NAIA::Event::header
bool NAIA::Event::m_isMC = false
private
MCTruthBase NAIA::Event::mcTruthBase
MCTruthPlus NAIA::Event::mcTruthPlus
RichBase NAIA::Event::richBase
RichPlus NAIA::Event::richPlus
TofBase NAIA::Event::tofBase
TofBaseStandalone NAIA::Event::tofBaseSt
TofPlus NAIA::Event::tofPlus
TofPlusStandalone NAIA::Event::tofPlusSt
TrdKBase NAIA::Event::trdKBase
TrdKBaseStandalone NAIA::Event::trdKBaseSt
TrTrackBase NAIA::Event::trTrackBase
TrTrackPlus NAIA::Event::trTrackPlus

The documentation for this class was generated from the following files: