CbmRoot
CbmMCDataManager Class Reference

Task class creating and managing CbmMCDataArray objects. More...

#include <CbmMCDataManager.h>

Inheritance diagram for CbmMCDataManager:
[legend]
Collaboration diagram for CbmMCDataManager:
[legend]

Public Member Functions

 CbmMCDataManager ()
 
 CbmMCDataManager (const char *name, Int_t legacy=0)
 
 ~CbmMCDataManager ()
 
Int_t AddFile (const char *fileName)
 
Int_t AddFileToChain (const char *fileName, Int_t chainNumber)
 
void AddFriend (Int_t chainNum1, Int_t chainNum2)
 
virtual void Exec (Option_t *)
 
virtual void FinishEvent ()
 
virtual InitStatus Init ()
 
CbmMCDataArrayInitBranch (const char *name)
 
CbmMCDataObjectGetObject (const char *name)
 

Private Member Functions

 ClassDef (CbmMCDataManager, 1)
 

Private Attributes

Int_t fLegacy
 If true, use FairRootManager in event-by-event mode. More...
 
std::vector< std::list< TString > > fFileList
 
std::map< TString, CbmMCDataArray * > fActive
 Array of filename chains. More...
 
std::map< TString, CbmMCDataObject * > fActiveObj
 
std::map< Int_t, Int_t > fFriends
 

Detailed Description

Task class creating and managing CbmMCDataArray objects.

Author
//Dr.Sys mikha.nosp@m.il.p.nosp@m.rokud.nosp@m.in@c.nosp@m.ern.c.nosp@m.h
Date
31 March 2015

Definition at line 27 of file CbmMCDataManager.h.

Constructor & Destructor Documentation

◆ CbmMCDataManager() [1/2]

CbmMCDataManager::CbmMCDataManager ( )

Default constructor

Definition at line 15 of file CbmMCDataManager.cxx.

References fActive, fActiveObj, fFileList, and fFriends.

◆ CbmMCDataManager() [2/2]

CbmMCDataManager::CbmMCDataManager ( const char *  name,
Int_t  legacy = 0 
)

Standard constructor

Parameters
nameTask name
legacyIf true, run in legacy mode (using FairRootManager)

Definition at line 27 of file CbmMCDataManager.cxx.

References fActive, fActiveObj, fFileList, and fFriends.

◆ ~CbmMCDataManager()

CbmMCDataManager::~CbmMCDataManager ( )

Destructor

Definition at line 42 of file CbmMCDataManager.cxx.

References fActive, and fActiveObj.

Member Function Documentation

◆ AddFile()

Int_t CbmMCDataManager::AddFile ( const char *  fileName)

Add a MC input file

Parameters
fileNameInput file name @value Running number of input (chain)

A new input chain will be started with this file.

Definition at line 56 of file CbmMCDataManager.cxx.

References fFileList.

◆ AddFileToChain()

Int_t CbmMCDataManager::AddFileToChain ( const char *  fileName,
Int_t  chainNumber 
)

Add a MC file to an existing input chain

Parameters
fileNameInput file name
chainNumberNumber of input chain to which the file will be added @value Size of input chain (number of files in chain)

Definition at line 66 of file CbmMCDataManager.cxx.

References fFileList, and i.

◆ AddFriend()

void CbmMCDataManager::AddFriend ( Int_t  chainNum1,
Int_t  chainNum2 
)
inline

Make TChain number chainNum2 friend of TChain number chainNum2

Parameters
chainNum1a number of chain for which AddFriend is called
chainNum2number of chain which became a friend

Definition at line 64 of file CbmMCDataManager.h.

References fFriends.

◆ ClassDef()

CbmMCDataManager::ClassDef ( CbmMCDataManager  ,
 
)
private

◆ Exec()

virtual void CbmMCDataManager::Exec ( Option_t *  )
inlinevirtual

Execution (empty; just to match FairTask structure)

Definition at line 69 of file CbmMCDataManager.h.

◆ FinishEvent()

void CbmMCDataManager::FinishEvent ( )
virtual

End of event action

Definition at line 83 of file CbmMCDataManager.cxx.

References fActive, and fActiveObj.

◆ GetObject()

◆ Init()

InitStatus CbmMCDataManager::Init ( )
virtual

Initialisation

Definition at line 95 of file CbmMCDataManager.cxx.

◆ InitBranch()

Member Data Documentation

◆ fActive

std::map<TString, CbmMCDataArray*> CbmMCDataManager::fActive
private

Array of filename chains.

List of created CbmMCDataArrays

Definition at line 99 of file CbmMCDataManager.h.

Referenced by CbmMCDataManager(), FinishEvent(), InitBranch(), and ~CbmMCDataManager().

◆ fActiveObj

std::map<TString, CbmMCDataObject*> CbmMCDataManager::fActiveObj
private

List of created CbmMCDataObjects

Definition at line 101 of file CbmMCDataManager.h.

Referenced by CbmMCDataManager(), FinishEvent(), GetObject(), and ~CbmMCDataManager().

◆ fFileList

std::vector<std::list<TString> > CbmMCDataManager::fFileList
private

Array of chains, each with a list of file names

Definition at line 96 of file CbmMCDataManager.h.

Referenced by AddFile(), AddFileToChain(), CbmMCDataManager(), GetObject(), and InitBranch().

◆ fFriends

std::map<Int_t, Int_t> CbmMCDataManager::fFriends
private

Map of friends

Definition at line 103 of file CbmMCDataManager.h.

Referenced by AddFriend(), CbmMCDataManager(), GetObject(), and InitBranch().

◆ fLegacy

Int_t CbmMCDataManager::fLegacy
private

If true, use FairRootManager in event-by-event mode.

Definition at line 93 of file CbmMCDataManager.h.

Referenced by GetObject(), and InitBranch().


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