109 LOG(info) << GetName() <<
": Initialisation...";
112 FairRootManager* ioman = FairRootManager::Instance();
114 LOG(error) << GetName() <<
"::Init: No FairRootManager!";
119 fEvents =
dynamic_cast<TClonesArray*
>(ioman->GetObject(
"CbmEvent"));
121 fInputDigis = (TClonesArray*) ioman->GetObject(
"MvdDigi");
122 fEventDigis =
new TClonesArray(
"CbmMvdDigi", 10000);
124 LOG(error) <<
"No MvdDigi branch found. There was no MVD in the "
125 "simulation. Switch this task off";
130 fCluster =
new TClonesArray(
"CbmMvdHit", 10000);
131 ioman->Register(
"MvdHit",
"Mvd Hits",
fCluster, IsOutputBranchPersistent(
"MvdHit"));
135 if (
fDetector->GetSensorArraySize() > 1) {
136 LOG(debug) <<
"-I- succesfully loaded Geometry from file -I-";
139 LOG(fatal) <<
"Geometry couldn't be loaded from file. No MVD digitizer available.";
143 const std::map<uint32_t, CbmMvdSensor*>& sensorMap =
fDetector->GetSensorMap();
144 UInt_t plugincount =
fDetector->GetPluginCount();
146 for (
auto itr = sensorMap.begin(); itr != sensorMap.end(); itr++) {
149 itr->second->AddPlugin(hitTask);
150 itr->second->SetHitPlugin(plugincount);
153 fDetector->SetPluginCount(plugincount + 1);
154 fHitPluginNr = (UInt_t)(
fDetector->GetPluginArraySize());
161 LOG(info) << GetName() <<
" initialised";