Go to the documentation of this file.
4 #include "TClonesArray.h"
6 #include "FairEventHeader.h"
7 #include "FairLogger.h"
8 #include "FairRootManager.h"
40 fCh =
new TChain(
"cbmsim");
63 fCh =
new TChain(
"cbmsim");
101 cout << par <<
" " <<
fEv << endl;
105 }
else if (par !=
fEv) {
106 LOG(fatal) <<
"CbmEvBuildSource::ReadEvent(" << par
107 <<
"): Can't jump to arbitrary event but 0. Current event is "
119 if (digi == NULL)
continue;
131 if (digi2 == NULL)
continue;
149 for (j = 0; j < 16; j++)
153 for (j =
fISts; j > -1; j--) {
155 if (digi2 == NULL)
continue;
159 for (j =
fISts + 1; j < nsts; j++) {
161 if (digi2 == NULL)
continue;
171 for (j = n1 + 1; j < nsts; j++) {
173 if (digi2 == NULL)
continue;
182 for (j = 0; j < 16; j++)
217 if (
fI ==
fN)
return -1;
221 LOG(info) <<
"CbmBuildEventsSimple: Sts digis in slice "
225 for (
i = 0;
i < 16;
i++)
234 FairRootManager* mgr = FairRootManager::Instance();
236 fCh->SetBranchAddress(
"TimeSlice.", &(
fSlice));
238 fN =
fCh->GetEntries();
242 LOG(fatal) <<
"Can't find root manager in the system.";
246 fSTSDigi =
new TClonesArray(
"CbmStsDigi", 10000);
247 mgr->Register(
"StsDigi",
"Digital response in STS",
fSTSDigi, kTRUE);
251 LOG(info) <<
"CbmEvBuildSource::Init() success";
256 cout <<
"Reset()" << endl;
268 for (
i = st;
i <= end;
i++) {
274 LOG(info) <<
"CbmEvBuildSource: Event constructed. Digis used from "
275 << st <<
" to " << end <<
".";
287 feh->SetEventTime(
fEvHeader->GetEventTime());
289 feh->SetMCEntryNumber(
fEvHeader->GetMCEntryNumber());
290 feh->SetInputFileId(
fEvHeader->GetInputFileId());
virtual void FillEventHeader(FairEventHeader *feh)
void AddFile(const char *fname)
Double_t GetStartTime() const
Int_t fNSTSDigis
Array of output STS digis for each built event.
Int_t fN
Chain of input files.
virtual Int_t ReadEvent(UInt_t par=0)
void FillEvent(Int_t st, Int_t end)
virtual ~CbmEvBuildSource()
UInt_t GetElementId(Int_t address, Int_t level)
Get the index of an element.
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Data class for a single-channel message in the STS.
Int_t fISts
Current time slice.
FairEventHeader * fEvHeader
@ kSts
Silicon Tracking System.