|
ATLAS Offline Software
|
MuonMDT_CablingAlg reads raw condition data and writes derived condition data to the condition store.
More...
#include <MuonMDT_CablingAlg.h>
|
| 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 |
|
|
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...
|
|
|
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
|
SG::ReadCondHandleKey< CondAttrListCollection > | m_readKeyMez {this, "MezzanineFolders", "/MDT/CABLING/MEZZANINE_SCHEMA"} |
|
SG::ReadCondHandleKey< CondAttrListCollection > | m_readKeyMap {this, "MapFolders", "/MDT/CABLING/MAP_SCHEMA"} |
|
SG::WriteCondHandleKey< MuonMDT_CablingMap > | m_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 |
|
MuonMDT_CablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition at line 22 of file MuonMDT_CablingAlg.h.
◆ CablingData
◆ StoreGateSvc_t
◆ MuonMDT_CablingAlg()
MuonMDT_CablingAlg::MuonMDT_CablingAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~MuonMDT_CablingAlg()
virtual MuonMDT_CablingAlg::~MuonMDT_CablingAlg |
( |
| ) |
|
|
virtualdefault |
◆ 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.
◆ dbPayloadToJson()
Definition at line 62 of file MuonMDT_CablingAlg.cxx.
64 itr != readHandle->
end(); ++itr) {
72 return StatusCode::FAILURE;
75 data = *(
static_cast<const std::string*
>((atr[
"data"]).addressOfData()));
79 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode MuonMDT_CablingAlg::execute |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
Definition at line 39 of file MuonMDT_CablingAlg.cxx.
43 if (writeHandle.isValid()) {
44 ATH_MSG_DEBUG(
"CondHandle " << writeHandle.fullKey() <<
" is already valid."
45 <<
". In theory this should not be called, but may happen"
46 <<
" if multiple concurrent events are being processed out of order.");
47 return StatusCode::SUCCESS;
51 std::unique_ptr<MuonMDT_CablingMap> writeCdo{std::make_unique<MuonMDT_CablingMap>()};
55 if (!writeCdo->finalize_init(msgStream()))
return StatusCode::FAILURE;
57 ATH_CHECK(writeHandle.record(std::move(writeCdo)));
58 ATH_MSG_INFO(
"recorded new " << writeHandle.key() <<
" with range " << writeHandle.getRange() <<
" into Conditions Store");
59 return StatusCode::SUCCESS;
◆ 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 260 of file MuonMDT_CablingAlg.cxx.
264 constexpr
unsigned int coding_block_size = 3;
265 const unsigned int n = info_map.size() >= coding_block_size ? coding_block_size : info_map.size();
266 bool decoded_full_block{
false};
267 for (
unsigned int i = 0;
i <
n; ++
i) {
272 map_data.tdcId =
info;
276 map_data.channelId =
info;
281 map_data.tube =
info % map_data.tubes_per_layer;
282 map_data.layer = ((
info - map_data.tube) / map_data.tubes_per_layer) % map_data.layer_block;
283 map_data.multilayer = (((
info - map_data.tube) / map_data.tubes_per_layer) - map_data.layer) / map_data.layer_block;
284 decoded_full_block =
true;
289 if (decoded_full_block) info_map.erase(info_map.begin(), info_map.begin() + coding_block_size);
290 return decoded_full_block;
◆ 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 208 of file MuonMDT_CablingAlg.cxx.
209 map_data.eta = *(
static_cast<const int*
>((atr[
"Eta"]).addressOfData()));
210 map_data.phi = *(
static_cast<const int*
>((atr[
"Phi"]).addressOfData()));
211 map_data.mrod = *(
static_cast<const int*
>((atr[
"MROD"]).addressOfData()));
212 map_data.csm = *(
static_cast<const int*
>((atr[
"CSM"]).addressOfData()));
213 map_data.channelId = *(
static_cast<const int*
>((atr[
"Chan"]).addressOfData()));
214 map_data.mezzanine_type = *(
static_cast<const int*
>((atr[
"Mezzanine_Type"]).addressOfData()));
216 const std::string
chamber_name = *(
static_cast<const std::string*
>((atr[
"Chamber_Name"]).addressOfData()));
217 const std::string subdetector_id = *(
static_cast<const std::string*
>((atr[
"SubDet_Id"]).addressOfData()));
220 std::string stationNameString =
chamber_name.substr(0, 3);
222 if (stationNameString ==
"BOE") { stationNameString =
"BOL"; }
224 if (stationNameString ==
"BIX" || stationNameString ==
"BIY") {
225 stationNameString =
"BIS";
226 static std::atomic<bool> sInfoPrinted{
false};
228 ATH_MSG_INFO(
"Found an entry concerning the new BIS78 chambers. Will increase the number of tube per layer to "
243 map_data.stationIndex =
m_idHelperSvc->mdtIdHelper().stationNameIndex(stationNameString);
244 ATH_MSG_VERBOSE(
"station name: " << stationNameString <<
" index: " <<
static_cast<int>(map_data.stationIndex));
250 if (map_data.stationIndex < 0) {
251 static std::atomic<bool> stWarningPrinted{
false};
252 if (!stWarningPrinted) {
253 ATH_MSG_WARNING(
"Found stationIndex=" <<
static_cast<int>(map_data.stationIndex)
254 <<
" which is not reasonable, maybe related to ATLASRECTS-5961, continuing...");
255 stWarningPrinted =
true;
258 return map_data.stationIndex >= 0;
◆ extraDeps_update_handler()
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.
86 return Algorithm::extraOutputDeps();
◆ filterPassed()
virtual bool AthReentrantAlgorithm::filterPassed |
( |
const EventContext & |
ctx | ) |
const |
|
inlinevirtualinherited |
◆ initialize()
StatusCode MuonMDT_CablingAlg::initialize |
( |
| ) |
|
|
overridevirtual |
◆ inputHandles()
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 |
Specify if the algorithm is clonable.
Reentrant algorithms are clonable.
Reimplemented in Simulation::BeamEffectsAlg, InDet::SiTrackerSpacePointFinder, InDet::SCT_Clusterization, InDet::SiSPSeededTrackFinder, SCTRawDataProvider, InDet::GNNSeedingTrackMaker, SCT_PrepDataToxAOD, RoIBResultToxAOD, InDet::SiSPGNNTrackMaker, SCT_CablingCondAlgFromCoraCool, SCT_ReadCalibDataTestAlg, SCT_CablingCondAlgFromText, SCT_ReadCalibChipDataTestAlg, SCT_TestCablingAlg, SCT_ConfigurationConditionsTestAlg, ITkPixelCablingAlg, ITkStripCablingAlg, SCTEventFlagWriter, SCT_ConditionsSummaryTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_TdaqEnabledTestAlg, SCT_SiliconConditionsTestAlg, SCTSiLorentzAngleTestAlg, SCT_ByteStreamErrorsTestAlg, SCT_ConditionsParameterTestAlg, SCT_FlaggedConditionTestAlg, SCT_StripVetoTestAlg, SCT_RawDataToxAOD, and SCTSiPropertiesTestAlg.
Definition at line 44 of file AthReentrantAlgorithm.cxx.
◆ isReEntrant()
virtual bool MuonMDT_CablingAlg::isReEntrant |
( |
| ) |
const |
|
inlinefinaloverridevirtual |
◆ loadCablingSchema()
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 82 of file MuonMDT_CablingAlg.cxx.
87 if (!in_json.good()) {
89 return StatusCode::FAILURE;
94 return StatusCode::SUCCESS;
97 if (!readHandleMap.isValid()) {
98 ATH_MSG_ERROR(
"Null pointer to the read conditions object "<<readHandleMap.fullKey());
99 return StatusCode::FAILURE;
103 ATH_MSG_INFO(
"Size of CondAttrListCollection " << readHandleMap.fullKey()
104 <<
" readCdoMap->size()= " << readHandleMap->size());
106 ATH_MSG_VERBOSE(
"Collection CondAttrListCollection CLID " << readHandleMap->clID());
111 return StatusCode::SUCCESS;
115 for (itrMap = readHandleMap->begin(); itrMap != readHandleMap->end(); ++itrMap) {
121 constexpr std::string_view
delimiter{
","};
122 const std::string map = *(
static_cast<const std::string*
>((atr[
"Map"]).addressOfData()));
131 return StatusCode::FAILURE;
138 ATH_MSG_INFO(
"Found a round 3 setup. Will add the cabling for BIS78 manually");
139 const int BIS_stat =
m_idHelperSvc->mdtIdHelper().stationNameIndex(
"BIS");
141 for (
unsigned int sector = 1; sector <= 8; ++sector) {
142 int is_biy{0}, tdcId{0};
143 auto increment_tdc = [&is_biy, &tdcId]() {
145 constexpr
int tdcMax = 17;
146 if (tdcId > tdcMax) {
151 constexpr
int tubesPerCsm = 54;
152 bool added_tdc =
true;
155 for (
int ml = 1; ml <= 2; ++ml) {
157 const int tubes_per_layer =
m_idHelperSvc->mdtIdHelper().tubeMax(layer_id);
159 const int first_tube = 6 * (1 + tdcId / 2) + tubesPerCsm * is_biy;
160 const bool valid_tube = (first_tube <= tubes_per_layer);
161 added_tdc |= valid_tube;
169 bis78_data.stationIndex = BIS_stat;
171 bis78_data.phi = sector;
174 bis78_data.mrod = (is_biy ? -1 : 7) + sector;
175 bis78_data.csm = is_biy ? 5 : 0;
176 bis78_data.subdetectorId = 99;
178 bis78_data.mezzanine_type = sector != 6 ? 61 : 71;
179 const unsigned int tube_coding = first_tube + bis78_data.tubes_per_layer * (4 + bis78_data.layer_block * ml);
181 <<
m_idHelperSvc->mdtIdHelper().tubeMax(layer_id) <<
" tdcId: "
182 << tdcId <<
" is_Biy: " << is_biy <<
" first_tube: " << first_tube);
187 <<
m_idHelperSvc->mdtIdHelper().stationNameString(bis78_data.stationIndex) <<
" " << bis78_data);
189 ATH_MSG_ERROR(
"Failed to add mezzanine card " << bis78_data);
190 return StatusCode::FAILURE;
193 if (bis78_data.tube != first_tube) {
194 ATH_MSG_ERROR(
"BIS78 data tube encoding failed. Expected " << first_tube <<
" got " << bis78_data.tube <<
".");
195 return StatusCode::FAILURE;
196 }
else if (bis78_data.multilayer != ml) {
197 ATH_MSG_ERROR(
"BIS78 data ml encoding failed. Expected " << ml <<
" got " << bis78_data.multilayer <<
".");
198 return StatusCode::FAILURE;
205 return StatusCode::SUCCESS;
◆ loadCablingSchemaFromJSON()
Definition at line 357 of file MuonMDT_CablingAlg.cxx.
359 for (
const auto &db_channel :
payload.items()) {
363 ms_channel.eta = ms_payload[
"eta"];
364 ms_channel.phi = ms_payload[
"phi"];
365 ms_channel.multilayer = ms_payload[
"ml"];
367 ms_channel.subdetectorId = ms_payload[
"subDet"];
368 ms_channel.csm = ms_payload[
"csm"];
369 ms_channel.mrod = ms_payload[
"mrod"];
371 ms_channel.mezzanine_type = ms_payload[
"mezzId"];
372 ms_channel.tdcId = ms_payload[
"tdcId"];
373 ms_channel.tube = ms_payload[
"tubeZero"];
375 ms_channel.layer = 1;
377 ms_channel.channelId = hedgeHogCard ? (*std::min_element(
378 hedgeHogCard->tubeToTdcMap().begin(),
379 hedgeHogCard->tubeToTdcMap().end())) : 0;
382 return StatusCode::SUCCESS;
◆ loadMezzanineFromJSON()
Definition at line 345 of file MuonMDT_CablingAlg.cxx.
347 for (
const auto &cabl_chan :
payload.items()) {
349 const uint8_t id = mezz_payload[
"mezzId"];
350 const uint8_t nLay = mezz_payload[
"nTubeLayer"];
351 const MezzMapping
mapping = mezz_payload[
"tdcToTubeMap"];
353 msgStream()))
return StatusCode::FAILURE;
355 return StatusCode::SUCCESS;
◆ loadMezzanineSchema()
Load the mezzanine schema into the cabling.
Read Cond Handle
Definition at line 293 of file MuonMDT_CablingAlg.cxx.
297 if (!in_json.good()) {
299 return StatusCode::FAILURE;
304 return StatusCode::SUCCESS;
309 if (!readHandleMez.isValid()) {
311 return StatusCode::FAILURE;
315 ATH_MSG_INFO(
"Size of CondAttrListCollection " << readHandleMez.fullKey()
316 <<
" readCdoMez->size()= " << readHandleMez->size());
322 return StatusCode::SUCCESS;
325 for (itrMez = readHandleMez->begin(); itrMez != readHandleMez->end(); ++itrMez) {
327 int sequence{0},
layer{0}, mezzanine_type{0};
329 mezzanine_type = *(
static_cast<const int*
>((atr[
"Mezzanine_Type"]).addressOfData()));
330 layer = *(
static_cast<const int*
>((atr[
"Layer"]).addressOfData()));
331 sequence = *(
static_cast<const int*
>((atr[
"Sequence"]).addressOfData()));
332 ATH_MSG_VERBOSE(
"Sequence load is " << sequence <<
" for the mezzanine type = " << mezzanine_type
333 <<
" for the layer number = " <<
layer);
337 ATH_MSG_ERROR(
"Could not add the mezzanine sequence to the map ");
338 return StatusCode::FAILURE;
343 return StatusCode::SUCCESS;
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ setFilterPassed()
virtual void AthReentrantAlgorithm::setFilterPassed |
( |
bool |
state, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
inlinevirtualinherited |
◆ 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.
69 return Gaudi::Algorithm::sysExecute (ctx);
◆ 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.
107 if ( cs.retrieve().isFailure() ) {
109 return StatusCode::SUCCESS;
111 if (cs->regHandle(
this,*
h).isFailure()) {
112 sc = StatusCode::FAILURE;
113 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ 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
◆ m_evtStore
◆ 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
◆ m_isRun3
Gaudi::Property<bool> MuonMDT_CablingAlg::m_isRun3 {this, "isRun3", false, "Auxillary property to load the BIS78 cabling by hand"} |
|
private |
◆ 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
◆ m_readKeyMez
◆ 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
◆ m_vhka
◆ m_writeKey
The documentation for this class was generated from the following files:
int stationNameIndex(const std::string &name) const
char data[hepevt_bytes_allocation_ATLAS]
const_iterator end() const
bool extractStationInfo(const coral::AttributeList &atr, CablingData &map_data) const
Retrieves the general MDT station info from the coral attribute.
SG::WriteCondHandleKey< MuonMDT_CablingMap > m_writeKey
bool addMezzanine(CablingData cabling_data, DataSource source, MsgStream &log)
Add a new fully configured mezzanine card.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< std::string > tokenize(const std::string &the_str, std::string_view delimiters)
Splits the string into smaller substrings.
std::array< uint8_t, 24 > Mapping
StatusCode loadCablingSchema(const EventContext &ctx, SG::WriteCondHandle< MuonMDT_CablingMap > &writeHandle, MuonMDT_CablingMap &cabling_map) const
Load the cabling schema of the tubes.
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)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
MuonMDT_CablingMap::CablingData CablingData
#define ATH_MSG_VERBOSE(x)
Gaudi::Property< std::string > m_mezzJSON
virtual void setOwner(IDataHandleHolder *o)=0
bool extractLayerInfo(std::vector< std::string > &, CablingData &map_data) const
Retrieves the channel info from the coral attribute.
StatusCode dbPayloadToJson(SG::ReadCondHandle< CondAttrListCollection > &readHandle, nlohmann::json &json) const
MezzCardPtr getHedgeHogMapping(uint8_t mezzCardId) const
AthReentrantAlgorithm()
Default constructor:
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
std::shared_ptr< const MdtMezzanineCard > MezzCardPtr
int tubes_per_layer
Helper constants to extract tube,layer, multilayer information.
SG::ReadCondHandleKey< CondAttrListCollection > m_readKeyMap
bool readBlobAsString(const coral::Blob &, std::string &)
::StatusCode StatusCode
StatusCode definition for legacy code.
static EventIDRange infiniteRunLB()
Produces an EventIDRange that is infinite in RunLumi and invalid in Time.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
SG::ReadCondHandleKey< CondAttrListCollection > m_readKeyMez
StatusCode loadMezzanineSchema(const EventContext &ctx, SG::WriteCondHandle< MuonMDT_CablingMap > &writeHandle, MuonMDT_CablingMap &cabling_map) const
Load the mezzanine schema into the cabling.
std::string to_string(const DetectorType &type)
virtual StatusCode sysInitialize() override
Override sysInitialize.
StatusCode initialize(bool used=true)
Gaudi::Property< bool > m_isRun3
StatusCode loadMezzanineFromJSON(nlohmann::json &&payload, MuonMDT_CablingMap &cabling_map) const
bool addMezanineLayout(std::unique_ptr< MdtMezzanineCard > card, MsgStream &log)
Adds a new mezzanine card mapping.
#define ATH_MSG_WARNING(x)
ChanAttrListMap::const_iterator const_iterator
Gaudi::Property< bool > m_useJSONFormat
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
StatusCode loadCablingSchemaFromJSON(nlohmann::json &&payload, MuonMDT_CablingMap &cabling_map) const
static constexpr int maxNTubesPerLayer
The maxNTubesPerLayer represents the absolute maximum of tubes which are built into a single multilay...
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
bool addMezzanineLine(const int type, const int layer, const int sequence, MsgStream &log)
Add a new line describing a mezzanine type.
void addDependency(const EventIDRange &range)
Gaudi::Property< std::string > m_chambJSON