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