203{
205 const std::array<std::string,7> LGAD_moduleParamNames({"thickness","xPitch","yPitch","circuitsPerColumn","circuitsPerRow","padColumns","padRows"});
206
207 if(LGAD_module->
size() !=0){
209 std::map<std::string,std::string> LGAD_moduleMap;
210 for(const std::string& paramName:LGAD_moduleParamNames){
211 LGAD_moduleMap[paramName] = typeParams->getString(paramName);
212 }
213 std::string LGAD_moduleName = typeParams->getString("SensorType");
215 }
216 }
218
219
220
221 std::vector<std::string>
fields({
"endcap",
"layer",
"moduleInLayer"});
222
223
224 std::map<std::string, GeoFullPhysVol*> mapFPV;
225
226
227
228 const std::array<std::string,2> publishers({"HGTD","GeoModelXML"});
229
230 for (auto & iPub : publishers){
231
232 mapFPV = sqlreader->getPublishedNodes<std::string, GeoFullPhysVol*>(iPub,true);
233 if (!mapFPV.empty()) {
235 break;
236 }
237 }
238 if (mapFPV.empty())
ATH_MSG_ERROR(
"Could not find any FPV tables under the expected names: "<<publishers);
239
240 for (const auto&[fullPhysVolInfoString, fullPhysVolPointer] : mapFPV){
241
242 size_t startLGAD = fullPhysVolInfoString.find("lgad");
243 if(startLGAD==std::string::npos){
244 ATH_MSG_DEBUG(
"GeoFullPhysVol "<<fullPhysVolInfoString<<
" does not have the expected format. Skipping");
245 continue;
246 }
247 std::string
typeName = fullPhysVolInfoString.substr(startLGAD);
248 std::map<std::string, int>
index;
249 for (const std::string& field:fields){
250 size_t first = fullPhysVolInfoString.find(field+
"_");
251 size_t last = fullPhysVolInfoString.find(
'_',first+
field.size()+1);
252 if(first==std::string::npos || last==std::string::npos){
253 ATH_MSG_DEBUG(
"Could not extract "<<field<<
" from "<<fullPhysVolInfoString<<
". Skipping");
254 continue;
255 }
256 std::string strNew = fullPhysVolInfoString.substr(first+
field.size()+1,last-(first+
field.size()+1));
258 }
259
260 addSensor(typeName,index,0,fullPhysVolPointer);
261 }
262}
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
std::unique_ptr< IRDBRecord > IRDBRecord_ptr
void addSensor(const std::string &typeName, std::map< std::string, int > &index, int sequentialId, GeoVFullPhysVol *fpv) override final
virtual IRDBRecordset_ptr getRecordsetPtr(std::string_view node, std::string_view tag, std::string_view tag2node="", std::string_view connName="ATLASDD")=0
Provides access to the Recordset object containing HVS-tagged data.
virtual unsigned int size() const =0