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