ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
MuonMDT_CablingAlg Class Reference

MuonMDT_CablingAlg reads raw condition data and writes derived condition data to the condition store. More...

#include <MuonMDT_CablingAlg.h>

Inheritance diagram for MuonMDT_CablingAlg:
Collaboration diagram for MuonMDT_CablingAlg:

Public Types

using CablingData = MuonMDT_CablingMap::CablingData
 

Public Member Functions

 MuonMDT_CablingAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~MuonMDT_CablingAlg ()=default
 
virtual StatusCode initialize () override
 
virtual StatusCode execute (const EventContext &ctx) const override
 
virtual bool isReEntrant () const override final
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode dbPayloadToJson (SG::ReadCondHandle< CondAttrListCollection > &readHandle, nlohmann::json &json) const
 
bool extractStationInfo (const coral::AttributeList &atr, CablingData &map_data) const
 Retrieves the general MDT station info from the coral attribute. More...
 
bool extractLayerInfo (std::vector< std::string > &, CablingData &map_data) const
 Retrieves the channel info from the coral attribute. More...
 
StatusCode loadMezzanineSchema (const EventContext &ctx, SG::WriteCondHandle< MuonMDT_CablingMap > &writeHandle, MuonMDT_CablingMap &cabling_map) const
 Load the mezzanine schema into the cabling. More...
 
StatusCode loadMezzanineFromJSON (nlohmann::json &&payload, MuonMDT_CablingMap &cabling_map) const
 
StatusCode loadCablingSchema (const EventContext &ctx, SG::WriteCondHandle< MuonMDT_CablingMap > &writeHandle, MuonMDT_CablingMap &cabling_map) const
 Load the cabling schema of the tubes. More...
 
StatusCode loadCablingSchemaFromJSON (nlohmann::json &&payload, MuonMDT_CablingMap &cabling_map) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
SG::ReadCondHandleKey< CondAttrListCollectionm_readKeyMez {this, "MezzanineFolders", "/MDT/CABLING/MEZZANINE_SCHEMA"}
 
SG::ReadCondHandleKey< CondAttrListCollectionm_readKeyMap {this, "MapFolders", "/MDT/CABLING/MAP_SCHEMA"}
 
SG::WriteCondHandleKey< MuonMDT_CablingMapm_writeKey {this, "WriteKey", "MuonMDT_CablingMap", "Key of output MDT cabling map"}
 
Gaudi::Property< bool > m_isRun3 {this, "isRun3", false, "Auxillary property to load the BIS78 cabling by hand"}
 
Gaudi::Property< std::string > m_mezzJSON
 
Gaudi::Property< std::string > m_chambJSON
 
Gaudi::Property< bool > m_useJSONFormat
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

MuonMDT_CablingAlg reads raw condition data and writes derived condition data to the condition store.

Definition at line 22 of file MuonMDT_CablingAlg.h.

Member Typedef Documentation

◆ CablingData

Definition at line 31 of file MuonMDT_CablingAlg.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MuonMDT_CablingAlg()

MuonMDT_CablingAlg::MuonMDT_CablingAlg ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 25 of file MuonMDT_CablingAlg.cxx.

25 : AthReentrantAlgorithm(name, pSvcLocator) {}

◆ ~MuonMDT_CablingAlg()

virtual MuonMDT_CablingAlg::~MuonMDT_CablingAlg ( )
virtualdefault

Member Function Documentation

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ dbPayloadToJson()

StatusCode MuonMDT_CablingAlg::dbPayloadToJson ( SG::ReadCondHandle< CondAttrListCollection > &  readHandle,
nlohmann::json json 
) const
private

Definition at line 59 of file MuonMDT_CablingAlg.cxx.

59  {
60  for (CondAttrListCollection::const_iterator itr = readHandle->begin();
61  itr != readHandle->end(); ++itr) {
62  const coral::AttributeList& atr = itr->second;
63  std::string data{};
64  if (atr["data"].specification().type() == typeid(coral::Blob)) {
65 
66  ATH_MSG_VERBOSE("Loading data as a BLOB, uncompressing...");
67  if (!CoralUtilities::readBlobAsString(atr["data"].data<coral::Blob>(), data)) {
68  ATH_MSG_FATAL("Cannot uncompress BLOB! Aborting...");
69  return StatusCode::FAILURE;
70  }
71  } else {
72  data = *(static_cast<const std::string*>((atr["data"]).addressOfData()));
73  }
75  }
76  return StatusCode::SUCCESS;
77 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode MuonMDT_CablingAlg::execute ( const EventContext &  ctx) const
overridevirtual

Definition at line 36 of file MuonMDT_CablingAlg.cxx.

36  {
37  ATH_MSG_VERBOSE("MuonMDT_CablingAlg::execute()");
38  // Write Cond Handle
40  if (writeHandle.isValid()) {
41  ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid."
42  << ". In theory this should not be called, but may happen"
43  << " if multiple concurrent events are being processed out of order.");
44  return StatusCode::SUCCESS;
45  }
46  writeHandle.addDependency(EventIDRange(IOVInfiniteRange::infiniteRunLB()));
47  ATH_MSG_INFO("Load the Mdt cabling");
48  std::unique_ptr<MuonMDT_CablingMap> writeCdo{std::make_unique<MuonMDT_CablingMap>()};
49 
50  ATH_CHECK(loadMezzanineSchema(ctx, writeHandle, *writeCdo));
51  ATH_CHECK(loadCablingSchema(ctx, writeHandle, *writeCdo));
52  if (!writeCdo->finalize_init(msgStream())) return StatusCode::FAILURE;
53 
54  ATH_CHECK(writeHandle.record(std::move(writeCdo)));
55  ATH_MSG_INFO("recorded new " << writeHandle.key() << " with range " << writeHandle.getRange() << " into Conditions Store");
56  return StatusCode::SUCCESS;
57 }

◆ extractLayerInfo()

bool MuonMDT_CablingAlg::extractLayerInfo ( std::vector< std::string > &  info_map,
CablingData map_data 
) const
private

Retrieves the channel info from the coral attribute.

The map data is endcoded in repitive blocks of <tdcId>,<channelId>,<tube_numbering>,<tdcId>,<channelId>,<tube_numbering>,...

unpack the tube Id

Definition at line 257 of file MuonMDT_CablingAlg.cxx.

257  {
258  ATH_MSG_VERBOSE(" parsing of the map");
261  constexpr unsigned int coding_block_size = 3;
262  const unsigned int n = info_map.size() >= coding_block_size ? coding_block_size : info_map.size();
263  bool decoded_full_block{false};
264  for (unsigned int i = 0; i < n; ++i) {
265  ATH_MSG_VERBOSE(i << "..." << info_map[i]);
266  int info = CxxUtils::atoi(info_map[i]);
267  // this is a tdcid
268  if (i == 0) {
269  map_data.tdcId = info;
270  }
271  // this is a channel Id
272  else if (i == 1) {
273  map_data.channelId = info;
274  }
275  // this is a tube id that must be unpacked
276  else if (i == 2) {
278  map_data.tube = info % map_data.tubes_per_layer;
279  map_data.layer = ((info - map_data.tube) / map_data.tubes_per_layer) % map_data.layer_block;
280  map_data.multilayer = (((info - map_data.tube) / map_data.tubes_per_layer) - map_data.layer) / map_data.layer_block;
281  decoded_full_block = true;
282  }
283  }
284 
285  // the stationIndex is later on passed to the MdtIdHelper, thus, it must be a reasonable station name, i.e. not < 0
286  if (decoded_full_block) info_map.erase(info_map.begin(), info_map.begin() + coding_block_size);
287  return decoded_full_block;
288 }

◆ extractStationInfo()

bool MuonMDT_CablingAlg::extractStationInfo ( const coral::AttributeList &  atr,
CablingData map_data 
) const
private

Retrieves the general MDT station info from the coral attribute.

Hack for the BIS78 sMDT chambers

Temporary hack to remove all EI chambers until the proper data base tag arrives

It's still useful to keep the C-side chamber if the asymmetric geometry is loaded

Definition at line 205 of file MuonMDT_CablingAlg.cxx.

205  {
206  map_data.eta = *(static_cast<const int*>((atr["Eta"]).addressOfData()));
207  map_data.phi = *(static_cast<const int*>((atr["Phi"]).addressOfData()));
208  map_data.mrod = *(static_cast<const int*>((atr["MROD"]).addressOfData()));
209  map_data.csm = *(static_cast<const int*>((atr["CSM"]).addressOfData()));
210  map_data.channelId = *(static_cast<const int*>((atr["Chan"]).addressOfData()));
211  map_data.mezzanine_type = *(static_cast<const int*>((atr["Mezzanine_Type"]).addressOfData()));
212 
213  const std::string chamber_name = *(static_cast<const std::string*>((atr["Chamber_Name"]).addressOfData()));
214  const std::string subdetector_id = *(static_cast<const std::string*>((atr["SubDet_Id"]).addressOfData()));
215 
216  // convert the string name to index
217  std::string stationNameString = chamber_name.substr(0, 3);
218  // fix for the BOE chambers, which in the offline are treated as BOL
219  if (stationNameString == "BOE") { stationNameString = "BOL"; }
221  if (stationNameString == "BIX" || stationNameString == "BIY") {
222  stationNameString = "BIS";
223  static std::atomic<bool> sInfoPrinted{false};
224  if (!sInfoPrinted)
225  ATH_MSG_INFO("Found an entry concerning the new BIS78 chambers. Will increase the number of tube per layer to "
227  sInfoPrinted = true;
228 
229  map_data.tubes_per_layer = MdtIdHelper::maxNTubesPerLayer;
230  }
232  if (m_isRun3) {
234  if ((stationNameString == "EIS" && (!m_idHelperSvc->hasCSC() || chamber_name.find('A') != std::string::npos)) ||
235  chamber_name.find("BIS7A") != std::string::npos) {
236  ATH_MSG_VERBOSE("It's sooo sad but the chamber " << chamber_name << " is no longer with us");
237  return false;
238  }
239  }
240  map_data.stationIndex = m_idHelperSvc->mdtIdHelper().stationNameIndex(stationNameString);
241  ATH_MSG_VERBOSE("station name: " << stationNameString << " index: " << static_cast<int>(map_data.stationIndex));
242  // convert the subdetector id to integer
243  map_data.subdetectorId = CxxUtils::atoi(subdetector_id);
244 
245  ATH_MSG_VERBOSE("Data load is chamber_Name = " << chamber_name <<" translated to "<<map_data<<" FINISHED HERE ");
246 
247  if (map_data.stationIndex < 0) {
248  static std::atomic<bool> stWarningPrinted{false};
249  if (!stWarningPrinted) {
250  ATH_MSG_WARNING("Found stationIndex=" << static_cast<int>(map_data.stationIndex)
251  << " which is not reasonable, maybe related to ATLASRECTS-5961, continuing...");
252  stWarningPrinted = true;
253  }
254  }
255  return map_data.stationIndex >= 0;
256 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ initialize()

StatusCode MuonMDT_CablingAlg::initialize ( )
overridevirtual

Definition at line 27 of file MuonMDT_CablingAlg.cxx.

27  {
28  ATH_MSG_DEBUG("initialize " << name());
32  ATH_CHECK(m_idHelperSvc.retrieve());
33  return StatusCode::SUCCESS;
34 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ isReEntrant()

virtual bool MuonMDT_CablingAlg::isReEntrant ( ) const
inlinefinaloverridevirtual

Definition at line 29 of file MuonMDT_CablingAlg.h.

29 { return false; }

◆ loadCablingSchema()

StatusCode MuonMDT_CablingAlg::loadCablingSchema ( const EventContext &  ctx,
SG::WriteCondHandle< MuonMDT_CablingMap > &  writeHandle,
MuonMDT_CablingMap cabling_map 
) const
private

Load the cabling schema of the tubes.

now this mezzanine can be added to the map:

Load manually the BIX7 / BIY7 chambers into the data base if neccessary

That translates to 54 tubes per layer per CSM

The mrod numbering is 8 for sector 2, 9 for sector 4 etc.. For BIY it's 1 for sector 2, 2 for sector 4, etc.

Definition at line 79 of file MuonMDT_CablingAlg.cxx.

80  {
81 
82  if (m_chambJSON.value().size()){
83  std::ifstream in_json{m_chambJSON};
84  if (!in_json.good()) {
85  ATH_MSG_FATAL("Failed to open external JSON file "<<m_chambJSON);
86  return StatusCode::FAILURE;
87  }
89  in_json >> payload;
90  ATH_CHECK(loadCablingSchemaFromJSON( std::move(payload), cabling_map));
91  return StatusCode::SUCCESS;
92  }
94  if (!readHandleMap.isValid()) {
95  ATH_MSG_ERROR("Null pointer to the read conditions object "<<readHandleMap.fullKey());
96  return StatusCode::FAILURE;
97  }
98  writeHandle.addDependency(readHandleMap);
99 
100  ATH_MSG_INFO("Size of CondAttrListCollection " << readHandleMap.fullKey()
101  << " readCdoMap->size()= " << readHandleMap->size());
102 
103  ATH_MSG_VERBOSE("Collection CondAttrListCollection CLID " << readHandleMap->clID());
104  if (m_useJSONFormat) {
106  ATH_CHECK(dbPayloadToJson(readHandleMap, json));
107  ATH_CHECK(loadCablingSchemaFromJSON(std::move(json),cabling_map));
108  return StatusCode::SUCCESS;
109  }
110  // access to Map Schema Table to obtained the Map
112  for (itrMap = readHandleMap->begin(); itrMap != readHandleMap->end(); ++itrMap) {
113  const coral::AttributeList& atr = itrMap->second;
114 
115  CablingData map_data;
116  if (!extractStationInfo(atr, map_data)) continue;
117 
118  constexpr std::string_view delimiter{","};
119  const std::string map = *(static_cast<const std::string*>((atr["Map"]).addressOfData()));
120  std::vector<std::string> info_map = CxxUtils::tokenize(map, delimiter);
121 
122  while (extractLayerInfo(info_map, map_data)) {
124  ATH_MSG_VERBOSE("Adding new mezzanine stationName: " << m_idHelperSvc->mdtIdHelper().stationNameString(map_data.stationIndex)
125  << " " << map_data);
126  if (!cabling_map.addMezzanine(map_data, DataSource::LegacyCOOL, msgStream())) {
127  ATH_MSG_ERROR("Failed to add cabling " << map_data);
128  return StatusCode::FAILURE;
129  } else
130  ATH_MSG_VERBOSE("Added new cabling channel " << map_data);
131  }
132  } // end of CondAttrListCollection loop
134  if (m_isRun3) {
135  ATH_MSG_INFO("Found a round 3 setup. Will add the cabling for BIS78 manually");
136  const int BIS_stat = m_idHelperSvc->mdtIdHelper().stationNameIndex("BIS");
137  constexpr int eta_index = 7;
138  for (unsigned int sector = 1; sector <= 8; ++sector) {
139  int is_biy{0}, tdcId{0};
140  auto increment_tdc = [&is_biy, &tdcId]() {
141  ++tdcId;
142  constexpr int tdcMax = 17; // Maximum 18 tdcs per CSM
143  if (tdcId > tdcMax) {
144  tdcId = 0;
145  ++is_biy;
146  }
147  };
148  constexpr int tubesPerCsm = 54;
149  bool added_tdc = true;
150  while (added_tdc) {
151  added_tdc = false;
152  for (int ml = 1; ml <= 2; ++ml) {
153  const Identifier layer_id = m_idHelperSvc->mdtIdHelper().channelID(BIS_stat, eta_index, sector, ml, 1, 1);
154  const int tubes_per_layer = m_idHelperSvc->mdtIdHelper().tubeMax(layer_id);
155 
156  const int first_tube = 6 * (1 + tdcId / 2) + tubesPerCsm * is_biy;
157  const bool valid_tube = (first_tube <= tubes_per_layer);
158  added_tdc |= valid_tube;
159  if (!valid_tube) {
160  increment_tdc();
161  continue;
162  }
163 
164  CablingData bis78_data{};
166  bis78_data.stationIndex = BIS_stat;
167  bis78_data.eta = eta_index;
168  bis78_data.phi = sector;
171  bis78_data.mrod = (is_biy ? -1 : 7) + sector;
172  bis78_data.csm = is_biy ? 5 : 0;
173  bis78_data.subdetectorId = 99;
174 
175  bis78_data.mezzanine_type = sector != 6 ? 61 : 71;
176  const unsigned int tube_coding = first_tube + bis78_data.tubes_per_layer * (4 + bis78_data.layer_block * ml);
177  ATH_MSG_VERBOSE("ooooh BIS78 is being hacked in " << m_idHelperSvc->toString(layer_id) << " tubes_per_layer "
178  << m_idHelperSvc->mdtIdHelper().tubeMax(layer_id) << " tdcId: "
179  << tdcId << " is_Biy: " << is_biy << " first_tube: " << first_tube);
180 
181  std::vector<std::string> db_coding{std::to_string(tdcId), "0", std::to_string(tube_coding)};
182  if (extractLayerInfo(db_coding, bis78_data)) {
183  ATH_MSG_VERBOSE("Adding new mezzanine stationName: "
184  << m_idHelperSvc->mdtIdHelper().stationNameString(bis78_data.stationIndex) << " " << bis78_data);
185  if (!cabling_map.addMezzanine(bis78_data, DataSource::LegacyCOOL, msgStream())) {
186  ATH_MSG_ERROR("Failed to add mezzanine card " << bis78_data);
187  return StatusCode::FAILURE;
188  }
189  }
190  if (bis78_data.tube != first_tube) {
191  ATH_MSG_ERROR("BIS78 data tube encoding failed. Expected " << first_tube << " got " << bis78_data.tube << ".");
192  return StatusCode::FAILURE;
193  } else if (bis78_data.multilayer != ml) {
194  ATH_MSG_ERROR("BIS78 data ml encoding failed. Expected " << ml << " got " << bis78_data.multilayer << ".");
195  return StatusCode::FAILURE;
196  }
197  increment_tdc();
198  }
199  }
200  }
201  }
202  return StatusCode::SUCCESS;
203 }

◆ loadCablingSchemaFromJSON()

StatusCode MuonMDT_CablingAlg::loadCablingSchemaFromJSON ( nlohmann::json &&  payload,
MuonMDT_CablingMap cabling_map 
) const
private

Definition at line 354 of file MuonMDT_CablingAlg.cxx.

354  {
355  const MdtIdHelper& id_helper = m_idHelperSvc->mdtIdHelper();
356  for (const auto &db_channel : payload.items()) {
357  nlohmann::json ms_payload = db_channel.value();
358  CablingData ms_channel{};
359  ms_channel.stationIndex = id_helper.stationNameIndex(ms_payload["station"]);
360  ms_channel.eta = ms_payload["eta"];
361  ms_channel.phi = ms_payload["phi"];
362  ms_channel.multilayer = ms_payload["ml"];
363 
364  ms_channel.subdetectorId = ms_payload["subDet"];
365  ms_channel.csm = ms_payload["csm"];
366  ms_channel.mrod = ms_payload["mrod"];
367 
368  ms_channel.mezzanine_type = ms_payload["mezzId"];
369  ms_channel.tdcId = ms_payload["tdcId"];
370  ms_channel.tube = ms_payload["tubeZero"];
371 
372  ms_channel.layer = 1;
373  MdtMezzanineCard::MezzCardPtr hedgeHogCard = cabling_map.getHedgeHogMapping(ms_channel.mezzanine_type);
374  ms_channel.channelId = hedgeHogCard ? (*std::min_element(
375  hedgeHogCard->tubeToTdcMap().begin(),
376  hedgeHogCard->tubeToTdcMap().end())) : 0;
377  if (!cabling_map.addMezzanine(ms_channel, DataSource::JSON, msgStream())) return StatusCode::FAILURE;
378  }
379  return StatusCode::SUCCESS;
380 }

◆ loadMezzanineFromJSON()

StatusCode MuonMDT_CablingAlg::loadMezzanineFromJSON ( nlohmann::json &&  payload,
MuonMDT_CablingMap cabling_map 
) const
private

Definition at line 342 of file MuonMDT_CablingAlg.cxx.

342  {
343  using MezzMapping = MdtMezzanineCard::Mapping;
344  for (const auto &cabl_chan : payload.items()) {
345  nlohmann::json mezz_payload = cabl_chan.value();
346  const uint8_t id = mezz_payload["mezzId"];
347  const uint8_t nLay = mezz_payload["nTubeLayer"];
348  const MezzMapping mapping = mezz_payload["tdcToTubeMap"];
349  if(!cabling_map.addMezanineLayout(std::make_unique<MdtMezzanineCard>(mapping, nLay, id),
350  msgStream())) return StatusCode::FAILURE;
351  }
352  return StatusCode::SUCCESS;
353 }

◆ loadMezzanineSchema()

StatusCode MuonMDT_CablingAlg::loadMezzanineSchema ( const EventContext &  ctx,
SG::WriteCondHandle< MuonMDT_CablingMap > &  writeHandle,
MuonMDT_CablingMap cabling_map 
) const
private

Load the mezzanine schema into the cabling.

Read Cond Handle

Definition at line 290 of file MuonMDT_CablingAlg.cxx.

291  {
292  if (m_mezzJSON.value().size()){
293  std::ifstream in_json{m_mezzJSON};
294  if (!in_json.good()) {
295  ATH_MSG_FATAL("Failed to open external JSON file "<<m_mezzJSON);
296  return StatusCode::FAILURE;
297  }
299  in_json >> payload;
300  ATH_CHECK(loadMezzanineFromJSON(std::move(payload), cabling_map));
301  return StatusCode::SUCCESS;
302  }
303 
306  if (!readHandleMez.isValid()) {
307  ATH_MSG_ERROR("Null pointer to the read conditions object "<<m_readKeyMez.fullKey());
308  return StatusCode::FAILURE;
309  }
310  writeHandle.addDependency(readHandleMez);
311 
312  ATH_MSG_INFO("Size of CondAttrListCollection " << readHandleMez.fullKey()
313  << " readCdoMez->size()= " << readHandleMez->size());
314 
315  if (m_useJSONFormat) {
317  ATH_CHECK(dbPayloadToJson(readHandleMez, json));
318  ATH_CHECK(loadMezzanineFromJSON(std::move(json),cabling_map));
319  return StatusCode::SUCCESS;
320  }
322  for (itrMez = readHandleMez->begin(); itrMez != readHandleMez->end(); ++itrMez) {
323  const coral::AttributeList& atr = itrMez->second;
324  int sequence{0}, layer{0}, mezzanine_type{0};
325 
326  mezzanine_type = *(static_cast<const int*>((atr["Mezzanine_Type"]).addressOfData()));
327  layer = *(static_cast<const int*>((atr["Layer"]).addressOfData()));
328  sequence = *(static_cast<const int*>((atr["Sequence"]).addressOfData()));
329  ATH_MSG_VERBOSE("Sequence load is " << sequence << " for the mezzanine type = " << mezzanine_type
330  << " for the layer number = " << layer);
331 
332  // here add the mezzanine type to the cabling class
333  if (!cabling_map.addMezzanineLine(mezzanine_type, layer, sequence, msgStream())) {
334  ATH_MSG_ERROR("Could not add the mezzanine sequence to the map ");
335  return StatusCode::FAILURE;
336  } else {
337  ATH_MSG_VERBOSE("Sequence added successfully to the map");
338  }
339  }
340  return StatusCode::SUCCESS;
341 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_chambJSON

Gaudi::Property<std::string> MuonMDT_CablingAlg::m_chambJSON
private
Initial value:
{this, "CablingJSON", "",
"External JSON file to read the MDT cabling from"}

Definition at line 62 of file MuonMDT_CablingAlg.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MuonMDT_CablingAlg::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 34 of file MuonMDT_CablingAlg.h.

◆ m_isRun3

Gaudi::Property<bool> MuonMDT_CablingAlg::m_isRun3 {this, "isRun3", false, "Auxillary property to load the BIS78 cabling by hand"}
private

Definition at line 39 of file MuonMDT_CablingAlg.h.

◆ m_mezzJSON

Gaudi::Property<std::string> MuonMDT_CablingAlg::m_mezzJSON
private
Initial value:
{this, "MezzanineJSON", "" ,
"External JSON file to read the mezzanine mapping from"}

Definition at line 59 of file MuonMDT_CablingAlg.h.

◆ m_readKeyMap

SG::ReadCondHandleKey<CondAttrListCollection> MuonMDT_CablingAlg::m_readKeyMap {this, "MapFolders", "/MDT/CABLING/MAP_SCHEMA"}
private

Definition at line 36 of file MuonMDT_CablingAlg.h.

◆ m_readKeyMez

SG::ReadCondHandleKey<CondAttrListCollection> MuonMDT_CablingAlg::m_readKeyMez {this, "MezzanineFolders", "/MDT/CABLING/MEZZANINE_SCHEMA"}
private

Definition at line 35 of file MuonMDT_CablingAlg.h.

◆ m_useJSONFormat

Gaudi::Property<bool> MuonMDT_CablingAlg::m_useJSONFormat
private
Initial value:
{this, "UseJSONFormat", false,
"Read out the cabling database JSON based"}

Definition at line 65 of file MuonMDT_CablingAlg.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_writeKey

SG::WriteCondHandleKey<MuonMDT_CablingMap> MuonMDT_CablingAlg::m_writeKey {this, "WriteKey", "MuonMDT_CablingMap", "Key of output MDT cabling map"}
private

Definition at line 37 of file MuonMDT_CablingAlg.h.


The documentation for this class was generated from the following files:
grepfile.info
info
Definition: grepfile.py:38
MuonIdHelper::stationNameIndex
int stationNameIndex(const std::string &name) const
Definition: MuonIdHelper.cxx:846
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
CondAttrListCollection::end
const_iterator end() const
Definition: CondAttrListCollection.h:315
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
MuonMDT_CablingAlg::extractStationInfo
bool extractStationInfo(const coral::AttributeList &atr, CablingData &map_data) const
Retrieves the general MDT station info from the coral attribute.
Definition: MuonMDT_CablingAlg.cxx:205
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
MuonMDT_CablingAlg::m_writeKey
SG::WriteCondHandleKey< MuonMDT_CablingMap > m_writeKey
Definition: MuonMDT_CablingAlg.h:37
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:575
json
nlohmann::json json
Definition: HistogramDef.cxx:9
MuonMDT_CablingMap::addMezzanine
bool addMezzanine(CablingData cabling_data, DataSource source, MsgStream &log)
Add a new fully configured mezzanine card.
Definition: MuonMDT_CablingMap.cxx:184
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
MdtCablingOffData::stationIndex
int8_t & stationIndex
Definition: MdtCablingData.h:26
MuonMDT_CablingMap::DataSource::JSON
@ JSON
CxxUtils::tokenize
std::vector< std::string > tokenize(const std::string &the_str, std::string_view delimiters)
Splits the string into smaller substrings.
Definition: Control/CxxUtils/Root/StringUtils.cxx:15
MdtMezzanineCard::Mapping
std::array< uint8_t, 24 > Mapping
Definition: MdtMezzanineCard.h:39
MuonMDT_CablingAlg::loadCablingSchema
StatusCode loadCablingSchema(const EventContext &ctx, SG::WriteCondHandle< MuonMDT_CablingMap > &writeHandle, MuonMDT_CablingMap &cabling_map) const
Load the cabling schema of the tubes.
Definition: MuonMDT_CablingAlg.cxx:79
parse
std::map< std::string, std::string > parse(const std::string &list)
Definition: egammaLayerRecalibTool.cxx:1040
AthCommonDataStore::renounce
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
Definition: AthCommonDataStore.h:380
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
CondAttrListCollection::begin
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
Definition: CondAttrListCollection.h:309
python.subdetectors.tile.Blob
Blob
Definition: tile.py:17
MuonMDT_CablingAlg::CablingData
MuonMDT_CablingMap::CablingData CablingData
Definition: MuonMDT_CablingAlg.h:31
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
find_tgc_unfilled_channelids.mapping
mapping
Definition: find_tgc_unfilled_channelids.py:17
MuonMDT_CablingAlg::m_mezzJSON
Gaudi::Property< std::string > m_mezzJSON
Definition: MuonMDT_CablingAlg.h:59
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
MuonMDT_CablingAlg::extractLayerInfo
bool extractLayerInfo(std::vector< std::string > &, CablingData &map_data) const
Retrieves the channel info from the coral attribute.
Definition: MuonMDT_CablingAlg.cxx:257
createDCubeDigitHistograms_withSel.chamber_name
chamber_name
Definition: createDCubeDigitHistograms_withSel.py:109
MuonMDT_CablingAlg::dbPayloadToJson
StatusCode dbPayloadToJson(SG::ReadCondHandle< CondAttrListCollection > &readHandle, nlohmann::json &json) const
Definition: MuonMDT_CablingAlg.cxx:59
MuonMDT_CablingMap::getHedgeHogMapping
MezzCardPtr getHedgeHogMapping(uint8_t mezzCardId) const
Definition: MuonMDT_CablingMap.cxx:176
python.AthDsoLogger.delimiter
delimiter
Definition: AthDsoLogger.py:71
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
MdtMezzanineCard::MezzCardPtr
std::shared_ptr< const MdtMezzanineCard > MezzCardPtr
Definition: MdtMezzanineCard.h:38
lumiFormat.i
int i
Definition: lumiFormat.py:92
MdtCablingData::tubes_per_layer
int tubes_per_layer
Helper constants to extract tube,layer, multilayer information.
Definition: MdtCablingData.h:105
MuonMDT_CablingAlg::m_readKeyMap
SG::ReadCondHandleKey< CondAttrListCollection > m_readKeyMap
Definition: MuonMDT_CablingAlg.h:36
CoralUtilities::readBlobAsString
bool readBlobAsString(const coral::Blob &, std::string &)
Definition: blobaccess.cxx:85
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
IOVInfiniteRange::infiniteRunLB
static EventIDRange infiniteRunLB()
Produces an EventIDRange that is infinite in RunLumi and invalid in Time.
Definition: IOVInfiniteRange.h:39
MdtIdHelper
Definition: MdtIdHelper.h:61
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
createCablingJSON.eta_index
int eta_index
Definition: createCablingJSON.py:9
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
MuonMDT_CablingAlg::m_readKeyMez
SG::ReadCondHandleKey< CondAttrListCollection > m_readKeyMez
Definition: MuonMDT_CablingAlg.h:35
MuonMDT_CablingAlg::loadMezzanineSchema
StatusCode loadMezzanineSchema(const EventContext &ctx, SG::WriteCondHandle< MuonMDT_CablingMap > &writeHandle, MuonMDT_CablingMap &cabling_map) const
Load the mezzanine schema into the cabling.
Definition: MuonMDT_CablingAlg.cxx:290
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
MuonMDT_CablingMap::DataSource::LegacyCOOL
@ LegacyCOOL
MuonMDT_CablingAlg::m_isRun3
Gaudi::Property< bool > m_isRun3
Definition: MuonMDT_CablingAlg.h:39
MuonMDT_CablingAlg::loadMezzanineFromJSON
StatusCode loadMezzanineFromJSON(nlohmann::json &&payload, MuonMDT_CablingMap &cabling_map) const
Definition: MuonMDT_CablingAlg.cxx:342
a
TList * a
Definition: liststreamerinfos.cxx:10
h
MuonMDT_CablingMap::addMezanineLayout
bool addMezanineLayout(std::unique_ptr< MdtMezzanineCard > card, MsgStream &log)
Adds a new mezzanine card mapping.
Definition: MuonMDT_CablingMap.cxx:576
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CondAttrListCollection::const_iterator
ChanAttrListMap::const_iterator const_iterator
Definition: CondAttrListCollection.h:63
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MuonMDT_CablingAlg::m_useJSONFormat
Gaudi::Property< bool > m_useJSONFormat
Definition: MuonMDT_CablingAlg.h:65
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
MuonMDT_CablingAlg::loadCablingSchemaFromJSON
StatusCode loadCablingSchemaFromJSON(nlohmann::json &&payload, MuonMDT_CablingMap &cabling_map) const
Definition: MuonMDT_CablingAlg.cxx:354
MdtIdHelper::maxNTubesPerLayer
static constexpr int maxNTubesPerLayer
The maxNTubesPerLayer represents the absolute maximum of tubes which are built into a single multilay...
Definition: MdtIdHelper.h:68
MuonMDT_CablingAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonMDT_CablingAlg.h:34
SG::WriteCondHandle
Definition: WriteCondHandle.h:26
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
MuonMDT_CablingMap::addMezzanineLine
bool addMezzanineLine(const int type, const int layer, const int sequence, MsgStream &log)
Add a new line describing a mezzanine type.
Definition: MuonMDT_CablingMap.cxx:69
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >
SG::WriteCondHandle::addDependency
void addDependency(const EventIDRange &range)
Definition: WriteCondHandle.h:275
MuonMDT_CablingAlg::m_chambJSON
Gaudi::Property< std::string > m_chambJSON
Definition: MuonMDT_CablingAlg.h:62