111 LOG(info) << GetName() <<
": Initialisation...";
114 FairRootManager* ioman = FairRootManager::Instance();
116 LOG(error) << GetName() <<
"::Init: No FairRootManager!";
121 fEvents =
dynamic_cast<TClonesArray*
>(ioman->GetObject(
"CbmEvent"));
126 fEventDigis =
new TClonesArray(
"CbmMvdDigi", 10000);
128 LOG(error) <<
"No MvdDigi branch found. There was no MVD in the "
129 "simulation. Switch this task off";
134 fCluster =
new TClonesArray(
"CbmMvdCluster", 10000);
135 ioman->Register(
"MvdCluster",
"Mvd Clusters",
fCluster, IsOutputBranchPersistent(
"MvdCluster"));
139 if (
fDetector->GetSensorArraySize() > 1) {
140 LOG(debug) <<
"-I- succesfully loaded Geometry from file -I-";
143 LOG(fatal) <<
"Geometry couldn't be loaded from file. No MVD digitizer available.";
147 const std::map<uint32_t, CbmMvdSensor*>& sensorMap =
fDetector->GetSensorMap();
148 UInt_t plugincount =
fDetector->GetPluginCount();
150 for (
auto itr = sensorMap.begin(); itr != sensorMap.end(); itr++) {
153 itr->second->AddPlugin(clusterTask);
154 itr->second->SetClusterPlugin(plugincount);
157 fDetector->SetPluginCount(plugincount + 1);
164 LOG(info) << GetName() <<
" initialised";