NAIA  1.0.1
 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...
 
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...
 

Public Attributes

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

Private Attributes

bool m_isMC = false
 

Detailed Description

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.

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, secondTrTrackBase, tofBase, tofBaseSt, tofPlus, tofPlusSt, trdKBase, trdKBaseSt, trTrackBase, trTrackBaseSt, and trTrackPlus.

Referenced by NAIA::NAIAChain::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 NAIA::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 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.

bool NAIA::Event::IsMC ( ) const
inline

Check if this is an MC event or not.

Definition at line 93 of file Event.h.

References m_isMC.

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.

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

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

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

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::NAIAChain::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
SecondTrTrackBase NAIA::Event::secondTrTrackBase
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
TrTrackBaseStandalone NAIA::Event::trTrackBaseSt
TrTrackPlus NAIA::Event::trTrackPlus

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