39 |
SetDIG("TSPA", new PamVMCTrkDig()); |
SetDIG("TSPA", new PamVMCTrkDig()); |
40 |
SetDIG("S4",new PamVMCS4Dig()); |
SetDIG("S4",new PamVMCS4Dig()); |
41 |
SetDIG("NDTI",new PamVMCNDDig()); |
SetDIG("NDTI",new PamVMCNDDig()); |
42 |
SetDIG("RunHeader", new PamVMCDigRunHeader()); |
//SetDIG("RunHeader", new PamVMCDigRunHeader()); |
43 |
SetDIG("RunTrailer", new PamVMCDigRunTrailer()); |
//SetDIG("RunTrailer", new PamVMCDigRunTrailer()); |
44 |
} |
} |
45 |
|
|
46 |
public: |
public: |
53 |
return (PamVMCDigitizer*)fdigmap(name); |
return (PamVMCDigitizer*)fdigmap(name); |
54 |
} |
} |
55 |
|
|
56 |
|
/* Setting pointer to random objects for all Digitizers */ |
57 |
/* All digitizers load calibrations and calibrate */ |
/* All digitizers load calibrations and calibrate */ |
58 |
void LoadCalib(){ |
void Initialize(TRandom* random){ |
59 |
TMapIter *n= (TMapIter *)fdigmap.MakeIterator(); |
TMapIter *n= (TMapIter *)fdigmap.MakeIterator(); |
60 |
TObject *o; while( o=(TObject *) n->Next()) { |
TObject *o; while( (o=(TObject *) n->Next())) { |
61 |
((PamVMCDigitizer *)fdigmap.GetValue(o))->LoadCalib(); |
((PamVMCDigitizer *)fdigmap.GetValue(o))->LoadCalib(); |
62 |
|
((PamVMCDigitizer *)fdigmap.GetValue(o))->SetRandom(random); |
63 |
} |
} |
64 |
} |
} |
65 |
|
|
66 |
/* This calls digitization for all detector */ |
/* This calls digitization for all detector */ |
67 |
void Digitize(Int_t EventNo, Int_t PrimaryPDG){ |
void Digitize(Int_t EventNo, Int_t PrimaryPDG){ |
68 |
TMapIter *n= (TMapIter *)fdigmap.MakeIterator(); |
TMapIter *n= (TMapIter *)fdigmap.MakeIterator(); |
69 |
TObject *o; while( o=(TObject *) n->Next()) { |
TObject *o; while( (o=(TObject *) n->Next())) { |
70 |
((PamVMCDigitizer *)fdigmap.GetValue(o))->Digitize(); |
((PamVMCDigitizer *)fdigmap.GetValue(o))->Digitize(); |
71 |
} |
} |
72 |
|
|
114 |
to raw-file only once, when run is over */ |
to raw-file only once, when run is over */ |
115 |
void FinishRun(){ |
void FinishRun(){ |
116 |
TMapIter *n= (TMapIter *)fdigmap.MakeIterator(); |
TMapIter *n= (TMapIter *)fdigmap.MakeIterator(); |
117 |
TObject *o; while( o=(TObject *) n->Next()) { |
TObject *o; while( (o=(TObject *) n->Next())) { |
118 |
((PamVMCDigitizer *)fdigmap.GetValue(o))->FinishRun(); |
((PamVMCDigitizer *)fdigmap.GetValue(o))->FinishRun(); |
119 |
} |
} |
120 |
} |
} |
123 |
|
|
124 |
void PrintCollections(){ |
void PrintCollections(){ |
125 |
TMapIter *n= (TMapIter *)fdigmap.MakeIterator(); |
TMapIter *n= (TMapIter *)fdigmap.MakeIterator(); |
126 |
TObject *o; while( o=(TObject *) n->Next()) { |
TObject *o; while( (o=(TObject *) n->Next())) { |
127 |
((PamVMCDigitizer *)fdigmap.GetValue(o))->PrintCollections(); |
((PamVMCDigitizer *)fdigmap.GetValue(o))->PrintCollections(); |
128 |
} |
} |
129 |
} |
} |