11#include "FairEventHeader.h"
12#include "FairRootManager.h"
14#include "TClonesArray.h"
43 fCh =
new TChain(
"cbmsim");
67 fCh =
new TChain(
"cbmsim");
107 cout << par <<
" " <<
fEv << endl;
112 else if (par !=
fEv) {
113 LOG(fatal) <<
"CbmEvBuildSource::ReadEvent(" << par <<
"): Can't jump to arbitrary event but 0. Current event is "
125 if (digi == NULL)
continue;
137 if (digi2 == NULL)
continue;
138 fST = digi2->GetTime();
155 for (j = 0; j < 16; j++)
159 for (j =
fISts; j > -1; j--) {
161 if (digi2 == NULL)
continue;
165 for (j =
fISts + 1; j < nsts; j++) {
167 if (digi2 == NULL)
continue;
177 for (j = n1 + 1; j < nsts; j++) {
179 if (digi2 == NULL)
continue;
188 for (j = 0; j < 16; j++)
193 fST = digi2->GetTime();
224 if (
fI ==
fN)
return -1;
228 LOG(info) <<
"CbmBuildEventsSimple: Sts digis in slice " <<
fSlice->GetDataSize(
kSts)
231 for (i = 0; i < 16; i++)
241 FairRootManager* mgr = FairRootManager::Instance();
243 fCh->SetBranchAddress(
"TimeSlice.", &(
fSlice));
245 fN =
fCh->GetEntries();
249 LOG(fatal) <<
"Can't find root manager in the system.";
253 fSTSDigi =
new TClonesArray(
"CbmStsDigi", 10000);
254 mgr->Register(
"StsDigi",
"Digital response in STS",
fSTSDigi, kTRUE);
258 LOG(info) <<
"CbmEvBuildSource::Init() success";
264 cout <<
"Reset()" << endl;
277 for (i = st; i <= end; i++) {
283 LOG(info) <<
"CbmEvBuildSource: Event constructed. Digis used from " << st <<
" to " << end <<
".";
297 feh->SetEventTime(
fEvHeader->GetEventTime());
299 feh->SetMCEntryNumber(
fEvHeader->GetMCEntryNumber());
300 feh->SetInputFileId(
fEvHeader->GetInputFileId());
ClassImp(CbmConverterManager)
@ kSts
Silicon Tracking System.
virtual ~CbmEvBuildSource()
FairEventHeader * fEvHeader
Int_t fN
Chain of input files.
void AddFile(const char *fname)
Int_t fISts
Current time slice.
virtual Int_t ReadEvent(UInt_t par=0)
Int_t fNSTSDigis
Array of output STS digis for each built event.
virtual void FillEventHeader(FairEventHeader *feh)
void FillEvent(Int_t st, Int_t end)
Data class for a single-channel message in the STS.
XPU_D int32_t GetAddress() const
double GetStartTime() const
uint32_t GetElementId(int32_t address, int32_t level)
Get the index of an element.