26 if (
svc.retrieve().isFailure()) { std::abort(); }
28 detectorList& dList =
c->GetDetectorStore().GetDetectorList();
29 detectorList::const_iterator
it;
30 for (
it = dList.begin();
it != dList.end(); ++
it) {
31 std::vector<AGDDDetectorPositioner*>& dPos = ((*it).second)->GetDetectorPositioners();
32 for (
unsigned int i = 0;
i < dPos.size();
i++) {
33 std::string chTag = dPos[
i]->ID.detectorAddress;
34 GeoFullPhysVol* vol = dPos[
i]->theVolume;
36 std::string
stName = chTag.substr(0, 4);
38 int etaIndex{999},
phiIndex{999}, mLayer{999}, iSide{0};
39 int iLS =
atoi((chTag.substr(3, 1)).c_str());
44 if (chTag.substr(13, 1) ==
"A")
46 else if (chTag.substr(13, 1) ==
"C")
48 etaIndex = iSide *
atoi((chTag.substr(5, 1)).c_str());
50 mLayer =
atoi((chTag.substr(7, 1)).c_str());
51 std::string
vName = vol->getLogVol()->getName();
52 std::string sName =
vName.substr(
vName.find(
'-') + 1);
54 if (chTag.substr(0, 3) ==
"sMD") {
55 std::unique_ptr<MMReadoutElement>
re = std::make_unique<MMReadoutElement>(vol, sName, etaIndex,
phiIndex, mLayer,
mgr);
58 mgr->addMMReadoutElement(std::move(
re));
59 }
else if (chTag.substr(0, 3) ==
"sTG") {
60 std::unique_ptr<sTgcReadoutElement>
re = std::make_unique<sTgcReadoutElement>(vol, sName, etaIndex,
phiIndex, mLayer,
mgr);
61 std::string myVolName = (chTag.substr(0, 8)).c_str();
64 mgr->addsTgcReadoutElement(std::move(
re));