10#ifndef BMNFILESOURCE_H
11#define BMNFILESOURCE_H
13#include "FairEventHeader.h"
14#include "FairFileHeader.h"
15#include "FairFileSourceBase.h"
16#include "FairMCEventHeader.h"
41 void Close()
override;
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
#define ClassDefOverride(name, id)
void SetEvtHeaderNew(Bool_t Status)
Set the status of the EvtHeader.
std::map< TString, TChain * > fFriendTypeList
TChain * fInChain
Input Chain.
UInt_t fNoOfEntries
No of Entries in this source.
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 (g...
TFolder * fCbmout
folder structure of output
BmnFileSource(const BmnFileSource &)
BmnFileSource(TFile *f, const char *Title="InputRootFile", UInt_t identifier=0)
TTree * fInTree
Input Tree.
UInt_t fCurrentEntryNo
for internal use, to return the same event time for the same entry
Int_t CheckMaxEventNo(Int_t EvtEnd=0) override
Check the maximum event number we can run to.
Double_t fGapTime
Time without particles in beam (gap) (ns).
TObjArray * GetListOfFoldersBmn()
TFile * fRootFile
ROOT file.
void SetCheckFileLayout(Bool_t enable)
Allow to disable the testing the file layout when adding files to a chain.
void GetRunNumber(int &period_number, int &run_number)
Get period and run numbers extracted while the class construction if exist.
Bool_t SpecifyRunId() override
Read one event from source to find out which RunId to use.
std::list< TString > fFriendFileList
List of all files added with AddFriend.
void SetInputFile(TString name)
Bool_t ActivateObject(TObject **obj, const char *BrName) override
Bool_t fEvtHeaderIsNew
This flag is true if the event header was created in this session otherwise it is false which means t...
void SetEventTimeInterval(Double_t min, Double_t max)
Set the min and max limit for event time in ns.
void CreateNewFriendChain(TString inputFile, TString inputLevel)
int ExtractRunNumber()
function to extract period and run numbers in the class constructor if exist
Int_t fFileType
input file type (data level): 0 - EXP DIGI, 1 - EXP DST, 10 - SIM DIGI, 11 - SIM DST,...
TFolder * GetBranchDescriptionFolder()
TString fInputTitle
Title of input source, could be input, background or signal.
void SetInTree(TTree *tempTree)
std::map< TString, std::multimap< TString, TArrayI > > fRunIdInfoAll
FairEventHeader * fEvtHeader
Event Header.
Int_t GetFileType()
Get input file type (data level): 0 - EXP DIGI, 1 - EXP DST, 10 - SIM DIGI, 11 - SIM DST,...
BmnFileSource operator=(const BmnFileSource &)
void SetEventMeanTime(Double_t mean)
Set the mean time for the event in ns.
void SetFileHeader(FairFileHeader *f)
Double_t fEventTimeMax
max time for one Event (ns)
Double_t fEventMeanTime
EventMean time used (P(t)=1/fEventMeanTime*Exp(-t/fEventMeanTime).
std::unique_ptr< TF1 > fTimeProb
used to generate random numbers for event time;
Double_t fEventTime
Time of event since th start (ns).
FairMCEventHeader * fMCHeader
MC Event header.
Int_t fPeriodNumber
period number extracted in the class constructor if exists
Bool_t fEventTimeInMCHeader
This is true if the event time used, came from simulation.
~BmnFileSource() override
Bool_t IsInitialized
Initialization flag, true if initialized.
void AddFriend(TString FileName)
Add a friend file (input) by name).
Int_t ReadEvent(UInt_t i=0) override
Bool_t ActivateObjectAny(void **, const std::type_info &, const char *) override
Bool_t fCheckFileLayout
True if the file layout should be checked when adding files to a chain.
std::list< TString > fInputLevel
const TFile * GetRootFile()
Double_t fBeamTime
Time of particles in beam (ns).
Int_t fRunNumber
run number extracted in the class constructor if exists
void FillEventHeader(FairEventHeader *feh) override
Double_t fEventTimeMin
min time for one event (ns)
Double_t GetDeltaEventTime()
TFolder * fCbmroot
folder structure of input
void AddFile(TString FileName)
Add ROOT file to input, the file will be chained to already added files.
FairFileHeader * fFileHeader
File Header.
std::list< TString > fInputChainList
UInt_t fTimeforEntryNo
for internal use, to return the same event time for the same entry
void ReadBranchEvent(const char *BrName) override
Read the tree entry on one branch.
TObjArray fListFolderBmn
list of folders from all input (and friends) files