FairRoot
|
#include <FairRootManager.h>
Public Member Functions | |
virtual | ~FairRootManager () |
Bool_t | AllDataProcessed () |
Int_t | AddBranchToList (const char *name) |
Int_t | CheckBranch (const char *BrName) |
void | CloseSink () |
void | CreateGeometryFile (const char *geofile) |
void | Fill () |
void | LastFill () |
TClonesArray * | GetEmptyTClonesArray (TString branchName) |
TClonesArray * | GetTClonesArray (TString branchName) |
void | UpdateBranches () |
TString | GetBranchName (Int_t id) |
Int_t | GetBranchId (TString const &BrName) |
Int_t | GetMCTrackBranchId () const |
TList * | GetBranchNameList () |
const std::vector< std::string > & | GetReqBranchNames () const |
TObject * | GetObject (const char *BrName) |
template<typename T > | |
T | InitObjectAs (const char *BrName) |
Double_t | GetEventTime () |
TObject * | GetCloneOfLinkData (const FairLink link) |
TClonesArray * | GetCloneOfTClonesArray (const FairLink link) |
void | InitTSBuffer (TString branchName, BinaryFunctor *function) |
TClonesArray * | GetData (TString branchName, BinaryFunctor *function, Double_t parameter) |
TClonesArray * | GetData (TString branchName, BinaryFunctor *startFunction, Double_t startParameter, BinaryFunctor *stopFunction, Double_t stopParameter) |
void | RegisterTSBuffer (TString branchName, FairTSBufferFunctional *functionalBuffer) |
void | TerminateTSBuffer (TString branchName) |
void | TerminateAllTSBuffer () |
FairTSBufferFunctional * | GetTSBuffer (TString branchName) |
Int_t | ReadEvent (Int_t i=0) |
Int_t | ReadNonTimeBasedEventFromBranches (Int_t i=0) |
void | ReadBranchEvent (const char *BrName) |
void | ReadBranchEvent (const char *BrName, Int_t entry) |
Int_t | GetRunId () |
Bool_t | ReadNextEvent (Double_t dt) |
void | Register (const char *name, const char *Foldername, TNamed *obj, Bool_t toFile) |
void | Register (const char *name, const char *Foldername, TCollection *obj, Bool_t toFile) |
template<typename T > | |
void | RegisterAny (const char *name, T *&obj, Bool_t toFile) |
bool | CreatePersistentBranchesAny () |
void | RegisterInputObject (const char *name, TObject *obj) |
TClonesArray * | Register (TString branchName, TString className, TString folderName, Bool_t toFile) |
FairWriteoutBuffer * | RegisterWriteoutBuffer (TString branchName, FairWriteoutBuffer *buffer) |
void | UpdateListOfTimebasedBranches () |
void | RunWithTimeStamps () |
void | SetBranchNameList (TList *list) |
void | SetTimeBasedBranchNameList (TList *list) |
void | FillEventHeader (FairEventHeader *feh) |
void | SetLastFill (Bool_t val=kTRUE) |
Int_t | Write (const char *name=0, Int_t option=0, Int_t bufsize=0) |
void | WriteGeometry () |
void | WriteFileHeader (FairFileHeader *f) |
void | WriteFolder () |
Int_t | CheckMaxEventNo (Int_t EvtEnd=0) |
void | StoreWriteoutBufferData (Double_t eventTime) |
void | StoreAllWriteoutBufferData () |
void | DeleteOldWriteoutBufferData () |
Int_t | GetEntryNr () |
void | SetEntryNr (Int_t val) |
void | SetUseFairLinks (Bool_t val) |
Bool_t | GetUseFairLinks () const |
void | SetSource (FairSource *tempSource) |
FairSource * | GetSource () |
Bool_t | InitSource () |
void | SetSink (FairSink *tempSink) |
FairSink * | GetSink () |
Bool_t | InitSink () |
void | SetListOfFolders (TObjArray *ta) |
TChain * | GetInChain () |
TChain * | GetSignalChainNo (UInt_t i) |
TTree * | GetInTree () |
const TFile * | GetRootFile () |
TFile * | GetInFile () |
void | SetInChain (TChain *tempChain, Int_t ident=-1) |
void | SetFinishRun (Bool_t val=kTRUE) |
Bool_t | FinishRun () |
Int_t | GetInstanceId () const |
void | UpdateFileName (TString &fileName) |
TFile * | GetOutFile () |
TTree * | GetOutTree () |
Bool_t | SpecifyRunId () |
template<typename T > | |
void | RegisterAny (const char *brname, T *&obj, bool persistence) |
template<typename TPtr > | |
TPtr | InitObjectAs (const char *brname) |
Static Public Member Functions | |
static FairRootManager * | Instance () |
static char * | GetTreeName () |
static char * | GetFolderName () |
|
virtual |
dtor
Definition at line 131 of file FairRootManager.cxx.
Int_t FairRootManager::AddBranchToList | ( | const char * | name | ) |
Add a branch name to the Branchlist and give it an id
Definition at line 227 of file FairRootManager.cxx.
Bool_t FairRootManager::AllDataProcessed | ( | ) |
Definition at line 363 of file FairRootManager.cxx.
Int_t FairRootManager::CheckBranch | ( | const char * | BrName | ) |
Check if Branch persistence or not (Memory branch) return value: 1 : Branch is Persistance 2 : Memory Branch 0 : Branch does not exist
The first time this method is called the map is generated and then used
Definition at line 713 of file FairRootManager.cxx.
Int_t FairRootManager::CheckMaxEventNo | ( | Int_t | EvtEnd = 0 | ) |
Check the maximum event number we can run to
Definition at line 900 of file FairRootManager.cxx.
|
inline |
Definition at line 68 of file FairRootManager.h.
void FairRootManager::CreateGeometryFile | ( | const char * | geofile | ) |
Create a new file and save the current TGeoManager object to it
Writes the geometry in a separate file. This is only to have a file which can be read without the framework. The geomanager used by the framework is still stored in the parameter file or database
Definition at line 407 of file FairRootManager.cxx.
bool FairRootManager::CreatePersistentBranchesAny | ( | ) |
for branches which are not managed by folders, we need a special function to trigger persistent branch creation return true if successful; false if problem
void FairRootManager::DeleteOldWriteoutBufferData | ( | ) |
Definition at line 972 of file FairRootManager.cxx.
void FairRootManager::Fill | ( | ) |
Definition at line 373 of file FairRootManager.cxx.
|
inline |
Definition at line 192 of file FairRootManager.h.
|
inline |
Definition at line 267 of file FairRootManager.h.
Int_t FairRootManager::GetBranchId | ( | TString const & | BrName | ) |
Return Id of a branch named
Return the branch id from the name
Definition at line 306 of file FairRootManager.cxx.
TString FairRootManager::GetBranchName | ( | Int_t | id | ) |
Return branch name by Id
Return the branch name from the id
Definition at line 294 of file FairRootManager.cxx.
|
inline |
Return a TList of TObjString of branch names available in this session
Definition at line 92 of file FairRootManager.h.
TObject * FairRootManager::GetCloneOfLinkData | ( | const FairLink | link | ) |
Returns a clone of the data object the link is pointing to. The clone has to be deleted in the calling code!
Definition at line 558 of file FairRootManager.cxx.
TClonesArray * FairRootManager::GetCloneOfTClonesArray | ( | const FairLink | link | ) |
Get the data of the given branch name, this method runs over multiple entries of the tree and selects the data according to the function and the parameter given.
Definition at line 640 of file FairRootManager.cxx.
TClonesArray * FairRootManager::GetData | ( | TString | branchName, |
BinaryFunctor * | function, | ||
Double_t | parameter | ||
) |
Definition at line 326 of file FairRootManager.cxx.
TClonesArray * FairRootManager::GetData | ( | TString | branchName, |
BinaryFunctor * | startFunction, | ||
Double_t | startParameter, | ||
BinaryFunctor * | stopFunction, | ||
Double_t | stopParameter | ||
) |
Definition at line 335 of file FairRootManager.cxx.
TClonesArray * FairRootManager::GetEmptyTClonesArray | ( | TString | branchName | ) |
Definition at line 265 of file FairRootManager.cxx.
|
inline |
Definition at line 219 of file FairRootManager.h.
Double_t FairRootManager::GetEventTime | ( | ) |
Return a pointer to the object (collection) saved in the fInTree branch named BrName
Definition at line 749 of file FairRootManager.cxx.
|
static |
Definition at line 1011 of file FairRootManager.cxx.
|
inline |
Definition at line 243 of file FairRootManager.h.
|
inline |
Definition at line 257 of file FairRootManager.h.
|
inline |
public Members for multi-threading
Definition at line 274 of file FairRootManager.h.
|
inline |
Definition at line 245 of file FairRootManager.h.
|
inline |
The MCTrack branch stands out since it is required by the framework algorithms
Definition at line 89 of file FairRootManager.h.
TObject * FairRootManager::GetObject | ( | const char * | BrName | ) |
Get the Object (container) for the given branch name, this method can be used to access the data of a branch that was created from a different analysis task, and not written in the tree yet. the user have to cast this pointer to the right type. Return a pointer to the object (collection) saved in the fInChain branch named BrName
Get Data object by name
Try to find the object in the folder structure, object already activated by other task or call
if the object does not exist then it could be a memory branch
if the object does not exist then look in the input tree
there is an input tree and the object was not in memory
Definition at line 521 of file FairRootManager.cxx.
TFile * FairRootManager::GetOutFile | ( | ) |
Return a pointer to the output File of type TFile
Definition at line 1059 of file FairRootManager.cxx.
TTree * FairRootManager::GetOutTree | ( | ) |
Return a pointer to the output tree of type TTree
Definition at line 1068 of file FairRootManager.cxx.
|
inline |
Return the vector of branch names that were requested by tasks as input
Definition at line 94 of file FairRootManager.h.
|
inline |
Definition at line 251 of file FairRootManager.h.
Int_t FairRootManager::GetRunId | ( | ) |
Read all entries from input tree(s) with time stamp from current time to dt (time in ns)
Definition at line 480 of file FairRootManager.cxx.
|
inline |
Definition at line 244 of file FairRootManager.h.
|
inline |
Definition at line 239 of file FairRootManager.h.
|
inline |
Definition at line 235 of file FairRootManager.h.
TClonesArray * FairRootManager::GetTClonesArray | ( | TString | branchName | ) |
Definition at line 283 of file FairRootManager.cxx.
|
static |
Definition at line 979 of file FairRootManager.cxx.
|
inline |
Definition at line 136 of file FairRootManager.h.
|
inline |
Definition at line 223 of file FairRootManager.h.
T FairRootManager::InitObjectAs | ( | const char * | BrName | ) |
Initializes and returns a default object for a branch or looks it up when it exists already. Returns nullptr when the branch does not exist or looking up with wrong type. The name Init indicates that this functions should be called only in Init sections of FairTasks. The returned default object will be filled with data by the framework.
TPtr FairRootManager::InitObjectAs | ( | const char * | brname | ) |
Definition at line 476 of file FairRootManager.h.
Bool_t FairRootManager::InitSink | ( | ) |
Definition at line 182 of file FairRootManager.cxx.
Bool_t FairRootManager::InitSource | ( | ) |
Definition at line 160 of file FairRootManager.cxx.
void FairRootManager::InitTSBuffer | ( | TString | branchName, |
BinaryFunctor * | function | ||
) |
Definition at line 321 of file FairRootManager.cxx.
|
static |
static access method
Definition at line 69 of file FairRootManager.cxx.
void FairRootManager::LastFill | ( | ) |
Definition at line 379 of file FairRootManager.cxx.
void FairRootManager::ReadBranchEvent | ( | const char * | BrName | ) |
Read the tree entry on one branch
Definition at line 489 of file FairRootManager.cxx.
void FairRootManager::ReadBranchEvent | ( | const char * | BrName, |
Int_t | entry | ||
) |
Read the tree entry on one branch for a specific entry
Definition at line 468 of file FairRootManager.cxx.
Int_t FairRootManager::ReadEvent | ( | Int_t | i = 0 | ) |
Read a single entry from background chain
Definition at line 442 of file FairRootManager.cxx.
Bool_t FairRootManager::ReadNextEvent | ( | Double_t | dt | ) |
TODO
Definition at line 514 of file FairRootManager.cxx.
Int_t FairRootManager::ReadNonTimeBasedEventFromBranches | ( | Int_t | i = 0 | ) |
Read a single entry from each branch that is not read via TSBuffers
Definition at line 498 of file FairRootManager.cxx.
void FairRootManager::Register | ( | const char * | name, |
const char * | Foldername, | ||
TNamed * | obj, | ||
Bool_t | toFile | ||
) |
create a new branch in the output tree
name | Name of the branch to create |
Foldername | Folder name containing this branch (e.g Detector name) |
obj | Pointer of type TNamed (e.g. MCStack object) |
toFile | if kTRUE, branch will be saved to the tree |
Definition at line 222 of file FairRootManager.cxx.
void FairRootManager::Register | ( | const char * | name, |
const char * | Foldername, | ||
TCollection * | obj, | ||
Bool_t | toFile | ||
) |
create a new branch in the output tree
name | Name of the branch to create |
Foldername | Folder name containing this branch (e.g Detector name) |
obj | Pointer of type TCollection (e.g. TClonesArray of hits, points) |
toFile | if kTRUE, branch will be saved to the tree |
Definition at line 240 of file FairRootManager.cxx.
TClonesArray * FairRootManager::Register | ( | TString | branchName, |
TString | className, | ||
TString | folderName, | ||
Bool_t | toFile | ||
) |
Definition at line 251 of file FairRootManager.cxx.
void FairRootManager::RegisterAny | ( | const char * | name, |
T *& | obj, | ||
Bool_t | toFile | ||
) |
create a new branch based on an arbitrary type T (for which a dictionary must exist)
void FairRootManager::RegisterAny | ( | const char * | brname, |
T *& | obj, | ||
bool | persistence | ||
) |
Definition at line 457 of file FairRootManager.h.
void FairRootManager::RegisterInputObject | ( | const char * | name, |
TObject * | obj | ||
) |
Definition at line 245 of file FairRootManager.cxx.
|
inline |
Definition at line 130 of file FairRootManager.h.
FairWriteoutBuffer * FairRootManager::RegisterWriteoutBuffer | ( | TString | branchName, |
FairWriteoutBuffer * | buffer | ||
) |
Register a new FairWriteoutBuffer to the map. If a Buffer with the same map key already exists the given buffer will be deleted and the old will be returned!
Definition at line 907 of file FairRootManager.cxx.
|
inline |
Use time stamps to read data and not tree entries
Definition at line 185 of file FairRootManager.h.
void FairRootManager::SetBranchNameList | ( | TList * | list | ) |
Set the branch name list
Definition at line 729 of file FairRootManager.cxx.
|
inline |
Definition at line 220 of file FairRootManager.h.
|
inline |
Definition at line 266 of file FairRootManager.h.
void FairRootManager::SetInChain | ( | TChain * | tempChain, |
Int_t | ident = -1 |
||
) |
Definition at line 741 of file FairRootManager.cxx.
|
inline |
Enables a last Fill command after all events are processed to store any data which is still in Buffers
Definition at line 199 of file FairRootManager.h.
|
inline |
Definition at line 242 of file FairRootManager.h.
|
inline |
Definition at line 238 of file FairRootManager.h.
|
inline |
Status | : if true all inputs are mixed, i.e: each read event will take one entry from each input and put them in one big event and send it to the next stepThese methods have been moved to the FairFileSource |
Definition at line 234 of file FairRootManager.h.
void FairRootManager::SetTimeBasedBranchNameList | ( | TList * | list | ) |
Replace the time based branch name list
Replace the list
Definition at line 931 of file FairRootManager.cxx.
|
inline |
Definition at line 222 of file FairRootManager.h.
Bool_t FairRootManager::SpecifyRunId | ( | ) |
Read one event from source to find out which RunId to use
Definition at line 431 of file FairRootManager.cxx.
void FairRootManager::StoreAllWriteoutBufferData | ( | ) |
Definition at line 960 of file FairRootManager.cxx.
void FairRootManager::StoreWriteoutBufferData | ( | Double_t | eventTime | ) |
Definition at line 953 of file FairRootManager.cxx.
void FairRootManager::TerminateAllTSBuffer | ( | ) |
Definition at line 356 of file FairRootManager.cxx.
void FairRootManager::TerminateTSBuffer | ( | TString | branchName | ) |
Definition at line 349 of file FairRootManager.cxx.
void FairRootManager::UpdateBranches | ( | ) |
Update the list of Memory branches from the source used
Definition at line 751 of file FairRootManager.cxx.
void FairRootManager::UpdateFileName | ( | TString & | fileName | ) |
Definition at line 1052 of file FairRootManager.cxx.
void FairRootManager::UpdateListOfTimebasedBranches | ( | ) |
Update the list of time based branches in the output file
Add branches that are time based to the proper list
Definition at line 919 of file FairRootManager.cxx.
Int_t FairRootManager::Write | ( | const char * | name = 0 , |
Int_t | option = 0 , |
||
Int_t | bufsize = 0 |
||
) |
When creating TTree from TFolder the fullpath of the objects is used as branch names this method truncate the full path from the branch names
Writes the tree in the file.
Definition at line 388 of file FairRootManager.cxx.
void FairRootManager::WriteFileHeader | ( | FairFileHeader * | f | ) |
Write the file header object to the output file
Definition at line 894 of file FairRootManager.cxx.
void FairRootManager::WriteFolder | ( | ) |
Write the folder structure used to create the tree to the output file
Definition at line 423 of file FairRootManager.cxx.
void FairRootManager::WriteGeometry | ( | ) |
Write the current TGeoManager to file
Writes the geometry in the current output file.
Definition at line 400 of file FairRootManager.cxx.