CbmRoot
|
An MC (transport) input to digitisation in CBM. More...
#include <CbmMCInput.h>
Public Member Functions | |
CbmMCInput () | |
Default constructor. More... | |
CbmMCInput (TChain *chain, ECbmTreeAccess mode=ECbmTreeAccess::kRegular) | |
Constructor. More... | |
virtual | ~CbmMCInput () |
Destructor. More... | |
std::set< TString > & | GetBranchList () |
List of branches @value Reference to branch list. More... | |
TChain * | GetChain () const |
Pointer to chain @value Pointer to TChain object. More... | |
Int_t | GetNextEntry () |
Get the next unused entry from the chain @value Id of tree entry. More... | |
Int_t | GetMaxNofEvents () const |
Maximal number of events to be read from the input. @value Number of entries in the tree for kRegular. -1 else. More... | |
ECbmTreeAccess | GetMode () const |
Tree access mode @value Access mode. More... | |
Long64_t | GetNofEntries () const |
Number of entries @value Number of entries in this input chain. More... | |
UInt_t | GetNofUsedEntries () const |
Number of used entries @value Number of successful calls to GetNextEvent() More... | |
Private Member Functions | |
UInt_t | ReadBranches () |
Read list of branches from file @value Number of branches. More... | |
ClassDef (CbmMCInput, 1) | |
Private Attributes | |
TChain * | fChain |
ECbmTreeAccess | fMode |
Input chain. More... | |
std::set< TString > | fBranches |
UInt_t | fLastUsedEntry |
UInt_t | fNofUsedEntries |
An MC (transport) input to digitisation in CBM.
Definition at line 27 of file CbmMCInput.h.
CbmMCInput::CbmMCInput | ( | ) |
CbmMCInput::CbmMCInput | ( | TChain * | chain, |
ECbmTreeAccess | mode = ECbmTreeAccess::kRegular |
||
) |
Constructor.
chain | Pointer to input file chain |
mode | Access mode (see EAccessMode) |
Definition at line 23 of file CbmMCInput.cxx.
|
virtual |
Destructor.
Definition at line 34 of file CbmMCInput.cxx.
|
private |
std::set< TString > & CbmMCInput::GetBranchList | ( | ) |
List of branches @value Reference to branch list.
Definition at line 39 of file CbmMCInput.cxx.
References fBranches, and ReadBranches().
Referenced by CbmMCInputSet::AddInput(), and CbmMCInputSet::CheckBranchList().
|
inline |
Pointer to chain @value Pointer to TChain object.
Definition at line 54 of file CbmMCInput.h.
References fChain.
Referenced by CbmMCInputSet::ActivateObject(), CbmDigitization::CheckInput(), CbmDigitizationSource::Init(), CbmDigitizationSource::ReadEventByEvent(), and CbmDigitizationSource::ReadRunId().
|
inline |
Maximal number of events to be read from the input. @value Number of entries in the tree for kRegular. -1 else.
Definition at line 68 of file CbmMCInput.h.
|
inline |
Tree access mode @value Access mode.
Definition at line 76 of file CbmMCInput.h.
References fMode.
Referenced by CbmDigitizationSource::ReadEventByEvent().
Int_t CbmMCInput::GetNextEntry | ( | ) |
Get the next unused entry from the chain @value Id of tree entry.
The method returns -1 if the maximum number of entries is exceeded.
Definition at line 50 of file CbmMCInput.cxx.
References fChain, fLastUsedEntry, fMode, fNofUsedEntries, GetNofEntries(), kRandom, and kRepeat.
Referenced by CbmDigitizationSource::ReadEventByEvent().
|
inline |
Number of entries @value Number of entries in this input chain.
Definition at line 82 of file CbmMCInput.h.
References fChain.
Referenced by GetNextEntry(), and CbmDigitizationSource::ReadEventByEvent().
|
inline |
Number of used entries @value Number of successful calls to GetNextEvent()
Definition at line 88 of file CbmMCInput.h.
References fNofUsedEntries.
|
private |
Read list of branches from file @value Number of branches.
The list of branches is stored as TList in each file.
Definition at line 83 of file CbmMCInput.cxx.
References fBranches, and fChain.
Referenced by GetBranchList().
|
private |
Definition at line 94 of file CbmMCInput.h.
Referenced by GetBranchList(), and ReadBranches().
|
private |
Definition at line 92 of file CbmMCInput.h.
Referenced by GetChain(), GetMaxNofEvents(), GetNextEntry(), GetNofEntries(), and ReadBranches().
|
private |
Definition at line 95 of file CbmMCInput.h.
Referenced by GetNextEntry().
|
private |
Input chain.
Definition at line 93 of file CbmMCInput.h.
Referenced by GetMaxNofEvents(), GetMode(), and GetNextEntry().
|
private |
Definition at line 96 of file CbmMCInput.h.
Referenced by GetNextEntry(), and GetNofUsedEntries().