CbmRoot
|
Access to a MC data branch for time-based analysis. More...
#include <CbmMCDataObject.h>
Public Member Functions | |
virtual | ~CbmMCDataObject () |
TObject * | Get (const CbmLink *lnk) |
TObject * | Get (const CbmLink &lnk) |
TObject * | Get (Int_t fileNumber, Int_t eventNumber) |
Private Member Functions | |
CbmMCDataObject () | |
CbmMCDataObject (const char *branchName, const std::vector< std::list< TString > > &fileList) | |
CbmMCDataObject (const char *branchName) | |
CbmMCDataObject (const CbmMCDataObject &) | |
void | Done () |
void | FinishEvent () |
void | AddFriend (Int_t chainNum1, Int_t chainNum2) |
TObject * | LegacyGet (Int_t fileNumber, Int_t eventNumber) |
CbmMCDataObject & | operator= (const CbmMCDataObject &) |
ClassDef (CbmMCDataObject, 1) | |
Private Attributes | |
Int_t | fLegacy |
TObject * | fLegacyObject |
If true, run in legacy mode. | |
TString | fBranchName |
Pointer to TObject for legacy mode. | |
Int_t | fSize |
Name of the data branch. | |
std::vector< TChain * > | fChains |
Number of input file lists (one per source) | |
std::vector< TObject * > | fTArr |
Arrays of chains (one per input source) | |
std::vector< Long64_t > | fN |
Data objects from chains (one per input source) | |
std::vector< std::map< Int_t, TObject * > > | fArrays |
Number of entries in chains. | |
Friends | |
class | CbmMCDataManager |
Access to a MC data branch for time-based analysis.
This class provides cached access to data for an event-by-event MC data branch, which is used when matching time-based reconstruction data to the input MC data. Data objects from already used events are cached, which allows switching between events without the performance deterioration induced by frequent calls to TTree::GetEntry(). In legacy mode, the data from the current event will be retrieved from FairRootManager.
Definition at line 38 of file CbmMCDataObject.h.
|
inlinevirtual |
Destructor
Definition at line 43 of file CbmMCDataObject.h.
|
inlineprivate |
Default constructor. Should be called from CbmMCDataManager.
Definition at line 69 of file CbmMCDataObject.h.
|
private |
Standard constructor. Should be called from CbmMCDataManager.
branchName | Name of data branch |
fileList | Vector of file list (one for each input source) |
Definition at line 21 of file CbmMCDataObject.cxx.
|
private |
Constructor in legacy mode. Gets the branch from FairRootManager.
branchName | Name of data branch |
Definition at line 76 of file CbmMCDataObject.cxx.
References fBranchName, and fLegacyObject.
|
private |
Copy constructor. Should not be called.
|
private |
Make TChain number chainNum2 friend of TChain number chainNum2
chainNum1 | a number of chain for which AddFriend is called |
chainNum2 | number of chain which became a friend |
Definition at line 58 of file CbmMCDataObject.cxx.
References fChains, and fLegacy.
Referenced by CbmMCDataManager::GetObject().
|
private |
|
private |
Done. Clear all arrays and delete file chain.
Definition at line 148 of file CbmMCDataObject.cxx.
References fChains, FinishEvent(), fLegacy, and fSize.
|
private |
|
inline |
Get an object by CbmLink reference
link | Reference to CbmLink object @value Pointer to linked object |
Definition at line 57 of file CbmMCDataObject.h.
References Get(), CbmLink::GetEntry(), and CbmLink::GetFile().
Referenced by Get().
|
inline |
Get an object by CbmLink pointer
link | Pointer to CbmLink object @value Pointer to linked object |
Definition at line 50 of file CbmMCDataObject.h.
References Get(), CbmLink::GetEntry(), and CbmLink::GetFile().
Referenced by CbmTofAnaTestbeam::FillHistos(), Get(), CbmSimEventHeaderConverter::ProcessData(), and cbm::ca::MCModule::ReadMCTracks().
TObject * CbmMCDataObject::Get | ( | Int_t | fileNumber, |
Int_t | eventNumber ) |
Get an object by file number and event number
fileNumber | Input file number |
eventNumber | Event number @value Pointer to referenced object |
Definition at line 110 of file CbmMCDataObject.cxx.
References fArrays, fChains, fLegacy, fN, fSize, fTArr, and LegacyGet().
|
private |
Get an object in legacy mode
fileNumber | Input number |
eventNumber | Event number @value Pointer to referenced object |
Definition at line 99 of file CbmMCDataObject.cxx.
References fLegacyObject.
Referenced by Get().
|
private |
|
friend |
Definition at line 39 of file CbmMCDataObject.h.
|
private |
Number of entries in chains.
Cached data objects. The vector index is the input source number, the map index is the event number.
Definition at line 123 of file CbmMCDataObject.h.
Referenced by CbmMCDataObject(), FinishEvent(), and Get().
|
private |
Pointer to TObject for legacy mode.
Definition at line 114 of file CbmMCDataObject.h.
Referenced by CbmMCDataObject().
|
private |
Number of input file lists (one per source)
Definition at line 116 of file CbmMCDataObject.h.
Referenced by AddFriend(), CbmMCDataObject(), Done(), and Get().
|
private |
Definition at line 112 of file CbmMCDataObject.h.
Referenced by AddFriend(), Done(), FinishEvent(), and Get().
|
private |
If true, run in legacy mode.
Definition at line 113 of file CbmMCDataObject.h.
Referenced by CbmMCDataObject(), and LegacyGet().
|
private |
Data objects from chains (one per input source)
Definition at line 118 of file CbmMCDataObject.h.
Referenced by CbmMCDataObject(), and Get().
|
private |
Name of the data branch.
Definition at line 115 of file CbmMCDataObject.h.
Referenced by CbmMCDataObject(), Done(), FinishEvent(), and Get().
|
private |
Arrays of chains (one per input source)
Definition at line 117 of file CbmMCDataObject.h.
Referenced by CbmMCDataObject(), and Get().