R3BROOT
R3B analysis software
|
#include <R3BFileSource.h>
Public Member Functions | |
R3BFileSource (TFile *f, const char *Title="InputRootFile", UInt_t identifier=0) | |
R3BFileSource (const TString *RootFileName, const char *Title="InputRootFile", UInt_t identifier=0) | |
R3BFileSource (const TString RootFileName, const char *Title="InputRootFile", UInt_t identifier=0) | |
~R3BFileSource () override | |
Bool_t | Init () override |
Int_t | ReadEvent (UInt_t i=0) override |
void | Close () override |
void | Reset () override |
Source_Type | GetSourceType () override |
void | SetParUnpackers () override |
Bool_t | InitUnpackers () override |
Bool_t | ReInitUnpackers () override |
Int_t | CheckMaxEventNo (Int_t EvtEnd=0) override |
Check the maximum event number we can run to. | |
void | ReadBranchEvent (const char *BrName) override |
Read the tree entry on one branch. | |
void | ReadBranchEvent (const char *BrName, Int_t Entry) override |
Read specific tree entry on one branch. | |
void | FillEventHeader (FairEventHeader *feh) override |
const TFile * | GetRootFile () |
void | AddFriend (TString FileName) |
Add a friend file (input) by name) | |
void | AddFile (TString FileName) |
Add ROOT file to input, the file will be chained to already added files. | |
void | AddFriendsToChain () |
void | PrintFriendList () |
Bool_t | CompareBranchList (TFile *fileHandle, TString inputLevel) |
void | CheckFriendChains () |
void | CreateNewFriendChain (TString inputFile, TString inputLevel) |
TTree * | GetInTree () |
TChain * | GetInChain () |
TFile * | GetInFile () |
void | CloseInFile () |
void | SetInTree (TTree *tempTree) |
Set the input tree when running on PROOF worker. | |
TObjArray * | GetListOfFolders () |
TFolder * | GetBranchDescriptionFolder () |
UInt_t | GetEntries () |
void | SetInputFile (TString name) |
void | SetBeamTime (Double_t beamTime, Double_t gapTime) |
Set the repetition time of the beam when it can interact (beamTime) and when no interaction happen (gapTime). | |
void | SetEventTimeInterval (Double_t min, Double_t max) |
Set the min and max limit for event time in ns. | |
void | SetEventMeanTime (Double_t mean) |
Set the mean time for the event in ns. | |
void | SetEventTime () |
Double_t | GetDeltaEventTime () |
void | SetFileHeader (FairFileHeader *f) |
Double_t | GetEventTime () |
Bool_t | ActivateObject (TObject **obj, const char *BrName) override |
void | SetEvtHeaderNew (Bool_t Status) |
Set the status of the EvtHeader. | |
Bool_t | IsEvtHeaderNew () |
void | SetCheckFileLayout (Bool_t enable) |
Allow to disable the testing the file layout when adding files to a chain. | |
void | SetInputFileName (TString tstr) |
Bool_t | SpecifyRunId () |
Read one event from source to find out which RunId to use. | |
Static Public Member Functions | |
static R3BFileSource * | Instance () |
static instance | |
Private Member Functions | |
Int_t | GetRunid (uint64_t ts) |
GetRunid method to obtain the runid as function of timestamps. | |
R3BFileSource (const R3BFileSource &) | |
R3BFileSource | operator= (const R3BFileSource &) |
Private Attributes | |
TString | fInputTitle |
Title of input source, could be input, background or signal. | |
TFile * | fRootFile |
ROOT file. | |
Int_t | fCurrentEntryNr |
Current Entry number. | |
std::list< TString > | fFriendFileList |
List of all files added with AddFriend. | |
std::list< TString > | fInputChainList |
std::map< TString, TChain * > | fFriendTypeList |
std::map< TString, std::list< TString > * > | fCheckInputBranches |
std::list< TString > | fInputLevel |
std::map< TString, std::multimap< TString, TArrayI > > | fRunIdInfoAll |
TChain * | fInChain |
Input Chain. | |
TTree * | fInTree |
Input Tree. | |
TObjArray * | fListFolder |
list of folders from all input (and friends) files | |
FairRuntimeDb * | fRtdb |
RuntimeDb. | |
TFolder * | fFolderOut |
folder structure of output | |
TFolder * | fFolderIn |
folder structure of input | |
UInt_t | fSourceIdentifier |
UInt_t | fNoOfEntries |
No of Entries in this source. | |
Bool_t | IsInitialized |
Initialization flag, true if initialized. | |
FairMCEventHeader * | fMCHeader |
MC Event header. | |
R3BEventHeader * | fEvtHeader |
Event Header. | |
FairFileHeader * | fFileHeader |
File Header. | |
Bool_t | fEventTimeInMCHeader |
This is true if the event time used, came from simulation. | |
Bool_t | fEvtHeaderIsNew |
This flag is true if the event header was created in this session otherwise it is false which means the header was created in a previous data level and used here (e.g. | |
UInt_t | fCurrentEntryNo |
for internal use, to return the same event time for the same entry | |
UInt_t | fTimeforEntryNo |
for internal use, to return the same event time for the same entry | |
Double_t | fEventTimeMin |
min time for one event (ns) | |
Double_t | fEventTimeMax |
max time for one Event (ns) | |
Double_t | fEventTime |
Time of event since th start (ns) | |
Double_t | fBeamTime |
Time of particles in beam (ns) | |
Double_t | fGapTime |
Time without particles in beam (gap) (ns) | |
Double_t | fEventMeanTime |
EventMean time used (P(t)=1/fEventMeanTime*Exp(-t/fEventMeanTime) | |
TF1 * | fTimeProb |
used to generate random numbers for event time; | |
Bool_t | fCheckFileLayout |
True if the file layout should be checked when adding files to a chain. | |
std::ifstream | fInputFile |
input file with runids | |
TString | fInputFileName |
UInt_t | fExpid |
std::vector< UInt_t > | fRunid |
std::vector< uint64_t > | fTimestamp |
uint64_t | prevts |
uint64_t | nextts |
Static Private Attributes | |
static TMCThreadLocal R3BFileSource * | fSourceInstance = 0 |
Definition at line 39 of file R3BFileSource.h.
R3BFileSource::R3BFileSource | ( | TFile * | f, |
const char * | Title = "InputRootFile", | ||
UInt_t | identifier = 0 ) |
Definition at line 51 of file R3BFileSource.cxx.
R3BFileSource::R3BFileSource | ( | const TString * | RootFileName, |
const char * | Title = "InputRootFile", | ||
UInt_t | identifier = 0 ) |
Definition at line 105 of file R3BFileSource.cxx.
R3BFileSource::R3BFileSource | ( | const TString | RootFileName, |
const char * | Title = "InputRootFile", | ||
UInt_t | identifier = 0 ) |
Definition at line 160 of file R3BFileSource.cxx.
|
override |
Definition at line 217 of file R3BFileSource.cxx.
|
private |
|
override |
Definition at line 836 of file R3BFileSource.cxx.
void R3BFileSource::AddFile | ( | TString | FileName | ) |
Definition at line 511 of file R3BFileSource.cxx.
void R3BFileSource::AddFriend | ( | TString | FileName | ) |
Definition at line 509 of file R3BFileSource.cxx.
void R3BFileSource::AddFriendsToChain | ( | ) |
Definition at line 513 of file R3BFileSource.cxx.
void R3BFileSource::CheckFriendChains | ( | ) |
Definition at line 633 of file R3BFileSource.cxx.
|
override |
Definition at line 862 of file R3BFileSource.cxx.
|
override |
Definition at line 505 of file R3BFileSource.cxx.
|
inline |
Definition at line 87 of file R3BFileSource.h.
Bool_t R3BFileSource::CompareBranchList | ( | TFile * | fileHandle, |
TString | inputLevel ) |
Definition at line 780 of file R3BFileSource.cxx.
void R3BFileSource::CreateNewFriendChain | ( | TString | inputFile, |
TString | inputLevel ) |
Get The list of branches from the friend file and add it to the actual list
Definition at line 719 of file R3BFileSource.cxx.
|
override |
Definition at line 1020 of file R3BFileSource.cxx.
|
inline |
Definition at line 97 of file R3BFileSource.h.
Double_t R3BFileSource::GetDeltaEventTime | ( | ) |
Definition at line 921 of file R3BFileSource.cxx.
|
inline |
Definition at line 98 of file R3BFileSource.h.
Double_t R3BFileSource::GetEventTime | ( | ) |
Definition at line 937 of file R3BFileSource.cxx.
|
inline |
Definition at line 85 of file R3BFileSource.h.
|
inline |
Definition at line 86 of file R3BFileSource.h.
|
inline |
Definition at line 84 of file R3BFileSource.h.
|
inline |
Definition at line 96 of file R3BFileSource.h.
|
inline |
Definition at line 74 of file R3BFileSource.h.
|
private |
Definition at line 434 of file R3BFileSource.cxx.
|
inlineoverride |
Definition at line 58 of file R3BFileSource.h.
|
override |
Definition at line 225 of file R3BFileSource.cxx.
|
inlineoverride |
Definition at line 62 of file R3BFileSource.h.
|
static |
Definition at line 215 of file R3BFileSource.cxx.
|
inline |
Definition at line 121 of file R3BFileSource.h.
|
private |
void R3BFileSource::PrintFriendList | ( | ) |
Definition at line 603 of file R3BFileSource.cxx.
|
override |
fill the object with content if the other branches in this tree entry were already read
Definition at line 972 of file R3BFileSource.cxx.
|
override |
Definition at line 994 of file R3BFileSource.cxx.
|
override |
TODO We should use here the timestamp from the header to look for the right runId and set up the parameters for the analysis of the root files. std::cout << fEvtHeader->GetTimeStamp() << std::endl;
Definition at line 473 of file R3BFileSource.cxx.
|
inlineoverride |
Definition at line 64 of file R3BFileSource.h.
|
override |
Definition at line 507 of file R3BFileSource.cxx.
void R3BFileSource::SetBeamTime | ( | Double_t | beamTime, |
Double_t | gapTime ) |
The total repetition time is beamTime + gapTime
Definition at line 893 of file R3BFileSource.cxx.
|
inline |
Definition at line 125 of file R3BFileSource.h.
void R3BFileSource::SetEventMeanTime | ( | Double_t | mean | ) |
Definition at line 876 of file R3BFileSource.cxx.
void R3BFileSource::SetEventTime | ( | ) |
Definition at line 899 of file R3BFileSource.cxx.
void R3BFileSource::SetEventTimeInterval | ( | Double_t | min, |
Double_t | max ) |
Definition at line 885 of file R3BFileSource.cxx.
|
inline |
Status | True: The header was creatged in this session and has to be filled FALSE: We use an existing header from previous data level |
Definition at line 120 of file R3BFileSource.h.
|
inline |
Definition at line 111 of file R3BFileSource.h.
void R3BFileSource::SetInputFile | ( | TString | name | ) |
Definition at line 852 of file R3BFileSource.cxx.
|
inline |
Definition at line 127 of file R3BFileSource.h.
void R3BFileSource::SetInTree | ( | TTree * | tempTree | ) |
Definition at line 423 of file R3BFileSource.cxx.
|
inlineoverride |
Definition at line 60 of file R3BFileSource.h.
Bool_t R3BFileSource::SpecifyRunId | ( | ) |
Definition at line 1012 of file R3BFileSource.cxx.
|
private |
Definition at line 200 of file R3BFileSource.h.
|
private |
Default value is true.
Definition at line 210 of file R3BFileSource.h.
|
private |
Definition at line 149 of file R3BFileSource.h.
|
private |
Definition at line 189 of file R3BFileSource.h.
|
private |
Definition at line 144 of file R3BFileSource.h.
|
private |
Definition at line 204 of file R3BFileSource.h.
|
private |
Definition at line 198 of file R3BFileSource.h.
|
private |
Definition at line 181 of file R3BFileSource.h.
|
private |
Definition at line 196 of file R3BFileSource.h.
|
private |
Definition at line 194 of file R3BFileSource.h.
|
private |
Definition at line 175 of file R3BFileSource.h.
|
private |
in the digi)
Definition at line 186 of file R3BFileSource.h.
|
private |
Definition at line 219 of file R3BFileSource.h.
|
private |
Definition at line 178 of file R3BFileSource.h.
|
private |
Definition at line 163 of file R3BFileSource.h.
|
private |
Definition at line 161 of file R3BFileSource.h.
|
private |
Definition at line 146 of file R3BFileSource.h.
|
private |
Definition at line 148 of file R3BFileSource.h.
|
private |
Definition at line 202 of file R3BFileSource.h.
|
private |
Definition at line 153 of file R3BFileSource.h.
|
private |
Definition at line 147 of file R3BFileSource.h.
|
private |
Definition at line 216 of file R3BFileSource.h.
|
private |
Definition at line 217 of file R3BFileSource.h.
|
private |
Definition at line 150 of file R3BFileSource.h.
|
private |
Definition at line 140 of file R3BFileSource.h.
|
private |
Definition at line 155 of file R3BFileSource.h.
|
private |
Definition at line 157 of file R3BFileSource.h.
|
private |
Definition at line 172 of file R3BFileSource.h.
|
private |
Definition at line 167 of file R3BFileSource.h.
|
private |
Definition at line 142 of file R3BFileSource.h.
|
private |
Definition at line 159 of file R3BFileSource.h.
|
private |
Definition at line 220 of file R3BFileSource.h.
|
private |
Definition at line 151 of file R3BFileSource.h.
|
private |
Definition at line 165 of file R3BFileSource.h.
|
staticprivate |
Definition at line 138 of file R3BFileSource.h.
|
private |
Definition at line 191 of file R3BFileSource.h.
|
private |
Definition at line 206 of file R3BFileSource.h.
|
private |
Definition at line 221 of file R3BFileSource.h.
|
private |
Definition at line 169 of file R3BFileSource.h.
|
private |
Definition at line 222 of file R3BFileSource.h.
|
private |
Definition at line 222 of file R3BFileSource.h.