diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterCondAlg.cxx index 22c4372db017c3a2297a52672697aeff3bebd790..5ff4dcbc25d82ea7bb2ac993c2bf759a569b6268 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterCondAlg.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterCondAlg.cxx @@ -137,7 +137,7 @@ StatusCode SCT_ConditionsParameterCondAlg::execute(const EventContext& ctx) cons for (; modItr != modEnd; modItr += nChipsPerModule) { // Get SN and identifiers (the channel number is serial number+1) const unsigned int truncatedSerialNumber{modItr->first - 1}; - const IdentifierHash& moduleHash{m_cablingTool->getHashFromSerialNumber(truncatedSerialNumber)}; + const IdentifierHash& moduleHash{m_cablingTool->getHashFromSerialNumber(truncatedSerialNumber, ctx)}; if (not moduleHash.is_valid()) continue; // Loop over chips within module diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.cxx index 063e0bf5e368c9c09948ab7b70bda25dad544281..99e0ea5313e1268835f72e9d47ba4b1c1f3ff4b1 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.cxx @@ -203,7 +203,7 @@ StatusCode SCT_ConfigurationCondAlg::fillChannelData(SCT_ConfigurationCondData* // Get SN and identifiers (the channel number is serial number+1 for the CoraCool folders but =serial number // for Cool Vector Payload ; i.e. Run 1 and Run 2 resp.) const unsigned int truncatedSerialNumber{run1 ? (itr->first-1) : (itr->first)}; - const IdentifierHash& hash{m_cablingTool->getHashFromSerialNumber(truncatedSerialNumber)}; + const IdentifierHash& hash{m_cablingTool->getHashFromSerialNumber(truncatedSerialNumber, ctx)}; if (not hash.is_valid()) continue; const Identifier waferId{m_pHelper->wafer_id(hash)}; const Identifier moduleId{m_pHelper->module_id(waferId)}; @@ -255,7 +255,7 @@ StatusCode SCT_ConfigurationCondAlg::fillChannelData(SCT_ConfigurationCondData* thisChip->appendBadStripsToVector(badStripsVec); // Loop over bad strips and insert strip ID into set for (const auto& thisBadStrip:badStripsVec) { - const Identifier stripId{getStripId(truncatedSerialNumber, thisChip->id(), thisBadStrip, elements)}; + const Identifier stripId{getStripId(truncatedSerialNumber, thisChip->id(), thisBadStrip, elements, ctx)}; // If in rough order, may be better to call with itr of previous insertion as a suggestion if (stripId.is_valid()) writeCdo->setBadStripId(stripId, // strip Identifier thisChip->id()<6 ? hash : oppWaferHash, // wafer IdentifierHash @@ -336,14 +336,14 @@ StatusCode SCT_ConfigurationCondAlg::fillModuleData(SCT_ConfigurationCondData* w // Get SN and identifiers (the channel number is serial number+1 for the CoraCool folders but =serial number // for Cool Vector Payload ; i.e. Run 1 and Run 2 resp.) const unsigned int truncatedSerialNumber{run1 ? (itr->first-1) : (itr->first)}; - const IdentifierHash& hash{m_cablingTool->getHashFromSerialNumber(truncatedSerialNumber)}; + const IdentifierHash& hash{m_cablingTool->getHashFromSerialNumber(truncatedSerialNumber, ctx)}; ++totalNumberOfModules; if (not hash.is_valid()) continue; Identifier waferId{m_pHelper->wafer_id(hash)}; ++totalNumberOfValidModules; IdentifierHash oppWaferHash; - m_pHelper->get_other_side(m_cablingTool->getHashFromSerialNumber(truncatedSerialNumber), oppWaferHash); + m_pHelper->get_other_side(m_cablingTool->getHashFromSerialNumber(truncatedSerialNumber, ctx), oppWaferHash); const Identifier oppWaferId{m_pHelper->wafer_id(oppWaferHash)}; const Identifier moduleId{m_pHelper->module_id(waferId)}; // Get AttributeList from second (see https://svnweb.cern.ch/trac/lcgcoral/browser/coral/trunk/src/CoralBase/CoralBase/AttributeList.h ) @@ -412,7 +412,7 @@ StatusCode SCT_ConfigurationCondAlg::fillLinkStatus(SCT_ConfigurationCondData* w const SCT_SerialNumber serialNumber{ullSerialNumber}; if (not serialNumber.is_valid()) continue; // Check module hash - const IdentifierHash& hash{m_cablingTool->getHashFromSerialNumber(serialNumber.to_uint())}; + const IdentifierHash& hash{m_cablingTool->getHashFromSerialNumber(serialNumber.to_uint(), ctx)}; if (not hash.is_valid()) continue; int link0{run1 ? (itr->second[link0Index].data<int>()) : static_cast<int>(itr->second[link0Index].data<unsigned char>())}; @@ -430,7 +430,7 @@ StatusCode SCT_ConfigurationCondAlg::fillLinkStatus(SCT_ConfigurationCondData* w // Construct the strip ID from the module SN, chip number and strip number Identifier SCT_ConfigurationCondAlg::getStripId(const unsigned int truncatedSerialNumber, const unsigned int chipNumber, const unsigned int stripNumber, - const InDetDD::SiDetectorElementCollection* elements) const { + const InDetDD::SiDetectorElementCollection* elements, const EventContext& ctx) const { Identifier waferId; const Identifier invalidIdentifier; //initialiser creates invalid Id unsigned int strip{0}; @@ -443,11 +443,11 @@ SCT_ConfigurationCondAlg::getStripId(const unsigned int truncatedSerialNumber, c // returns the side 0 hash, so we use the helper for side 1 if (chipNumber<6) { - waferHash = m_cablingTool->getHashFromSerialNumber(truncatedSerialNumber); + waferHash = m_cablingTool->getHashFromSerialNumber(truncatedSerialNumber, ctx); strip = chipNumber * stripsPerChip + stripNumber; if (waferHash.is_valid()) waferId = m_pHelper->wafer_id(waferHash); } else { - m_pHelper->get_other_side(m_cablingTool->getHashFromSerialNumber(truncatedSerialNumber), waferHash); + m_pHelper->get_other_side(m_cablingTool->getHashFromSerialNumber(truncatedSerialNumber, ctx), waferHash); strip = (chipNumber - 6) * stripsPerChip + stripNumber; if (waferHash.is_valid()) waferId = m_pHelper->wafer_id(waferHash); } diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.h index cb059211e398bce2dc93f8000ed38b5e5df58ee9..d7c558be391256451ad91a2679d74b799b960c78 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.h @@ -42,7 +42,7 @@ class SCT_ConfigurationCondAlg : public AthReentrantAlgorithm StatusCode fillModuleData(SCT_ConfigurationCondData* writeCdo, EventIDRange& rangeModule, const EventContext& ctx) const; StatusCode fillLinkStatus(SCT_ConfigurationCondData* writeCdo, EventIDRange& rangeMur, const EventContext& ctx) const; Identifier getStripId(const unsigned int truncatedSerialNumber, const unsigned int chipNumber, const unsigned int stripNumber, - const InDetDD::SiDetectorElementCollection* elements) const; + const InDetDD::SiDetectorElementCollection* elements, const EventContext& ctx) const; static const std::string s_coolChannelFolderName; static const std::string s_coolChannelFolderName2; diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_RODVetoCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_RODVetoCondAlg.cxx index 5ead997314e2c73fd10359103361745f62c959be..4ad57d62af880b60d59cf1a153d25492e9d8d721 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_RODVetoCondAlg.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_RODVetoCondAlg.cxx @@ -38,7 +38,7 @@ StatusCode SCT_RODVetoCondAlg::execute(const EventContext& ctx) const { ATH_MSG_INFO(m_badRODElementsInput.value().size() <<" RODs were declared bad"); std::vector<unsigned int> allRods; - m_cabling->getAllRods(allRods); + m_cabling->getAllRods(allRods, ctx); SG::WriteHandle<IdentifierSet> badIds{m_badIds, ctx}; ATH_CHECK(badIds.record(std::make_unique<IdentifierSet>())); @@ -53,7 +53,7 @@ StatusCode SCT_RODVetoCondAlg::execute(const EventContext& ctx) const { } std::vector<IdentifierHash> listOfHashes; - m_cabling->getHashesForRod(listOfHashes, thisRod); + m_cabling->getHashesForRod(listOfHashes, thisRod, ctx); // Two consecutive hashes may produce the same module id, since they will be two sides // of the same module. We avoid invalid inserts by guarding against this. Identifier previousId; //constructor produces an invalid one diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibDataTestAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibDataTestAlg.cxx index 0fe2b50640fd064cc7d40443e3382b89c70ff619..bfaa9b1a1a201bf2b211a6892441b6fae8d926fd 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibDataTestAlg.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibDataTestAlg.cxx @@ -91,7 +91,7 @@ StatusCode SCT_ReadCalibDataTestAlg::processProperties() } // SCT_ReadCalibDataTestAlg::processProperties() //---------------------------------------------------------------------- -StatusCode SCT_ReadCalibDataTestAlg::execute(const EventContext& /*ctx*/) const +StatusCode SCT_ReadCalibDataTestAlg::execute(const EventContext& ctx) const { //This method is only used to test the summary service, and only used within this package, // so the INFO level messages have no impact on performance of these services when used by clients @@ -114,12 +114,12 @@ StatusCode SCT_ReadCalibDataTestAlg::execute(const EventContext& /*ctx*/) const int nbad{0}; //Loop over all wafers using hashIds from the cabling service std::vector<boost::uint32_t> listOfRODs; - m_cabling->getAllRods(listOfRODs); + m_cabling->getAllRods(listOfRODs, ctx); std::vector<boost::uint32_t>::iterator rodIter{listOfRODs.begin()}; std::vector<boost::uint32_t>::iterator rodEnd{listOfRODs.end()}; for (; rodIter != rodEnd; ++rodIter) { std::vector<IdentifierHash> listOfHashes; - m_cabling->getHashesForRod(listOfHashes, *rodIter); + m_cabling->getHashesForRod(listOfHashes, *rodIter, ctx); std::vector<IdentifierHash>::iterator hashIt{listOfHashes.begin()}; std::vector<IdentifierHash>::iterator hashEnd{listOfHashes.end()}; for (; hashIt != hashEnd; ++hashIt) { diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_TdaqEnabledCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_TdaqEnabledCondAlg.cxx index 0cd077688362342017dce5c433d4d04e2c61253e..688fd86c97af68006949521fcccaea52a934d2c2 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_TdaqEnabledCondAlg.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_TdaqEnabledCondAlg.cxx @@ -128,7 +128,7 @@ StatusCode SCT_TdaqEnabledCondAlg::execute(const EventContext& ctx) const tmpIdVec.reserve(s_modulesPerRod); for (const auto& thisRod : writeCdo->getGoodRods()) { tmpIdVec.clear(); - m_cablingTool->getHashesForRod(tmpIdVec, thisRod); + m_cablingTool->getHashesForRod(tmpIdVec, thisRod, ctx); writeCdo->setGoodModules(tmpIdVec); } writeCdo->setFilled(true); diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibDataTool.cxx b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibDataTool.cxx index f17e40e1b21954e36f2108ca7b4b3a04849c7068..55ede894dba108fb4a9f1ab6860b8e838e46b9b5 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibDataTool.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibDataTool.cxx @@ -291,12 +291,12 @@ std::list<Identifier> SCT_ReadCalibDataTool::defectList(const std::string& defec //Loop over all wafers using hashIds from the cabling service std::vector<boost::uint32_t> listOfRODs; - m_cabling->getAllRods(listOfRODs); + m_cabling->getAllRods(listOfRODs, ctx); std::vector<boost::uint32_t>::iterator rodIter{listOfRODs.begin()}; std::vector<boost::uint32_t>::iterator rodEnd{listOfRODs.end()}; for (; rodIter!=rodEnd; ++rodIter) { std::vector<IdentifierHash> listOfHashes; - m_cabling->getHashesForRod(listOfHashes, *rodIter); + m_cabling->getHashesForRod(listOfHashes, *rodIter, ctx); std::vector<IdentifierHash>::iterator hashIt{listOfHashes.begin()}; std::vector<IdentifierHash>::iterator hashEnd{listOfHashes.end()}; for (; hashIt != hashEnd; ++hashIt) { diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibDataTool.h b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibDataTool.h index fad58d5ab698cc3c62f8beeb947361c71adabea6..b09387c30fe668e242b13bca6d84a0253c75f9d8 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibDataTool.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibDataTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @file SCT_ReadCalibDataTool.h Header file for SCT_ReadCalibDataTool. diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ISCT_CablingTool.h b/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ISCT_CablingTool.h index 6a1e8a7e9ea0f0cd026af5a7baf0bdec3778637f..52340082ef86a2ea7e10a5a7023eab9b04759b71 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ISCT_CablingTool.h +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ISCT_CablingTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef ISCT_CablingTool_h @@ -18,6 +18,7 @@ #include "SCT_Cabling/SCT_OnlineId.h" //Gaudi includes +#include "GaudiKernel/EventContext.h" #include "GaudiKernel/IAlgTool.h" //standard includes @@ -42,36 +43,47 @@ class ISCT_CablingTool: virtual public IAlgTool { /// return offline hash, given the online Id (used by decoders) virtual IdentifierHash getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool withWarnings = true) const = 0; + virtual IdentifierHash getHashFromOnlineId(const SCT_OnlineId& onlineId, const EventContext& ctx, const bool withWarnings = true) const = 0; /// return the online Id, given a hash (used by simulation encoders) virtual SCT_OnlineId getOnlineIdFromHash(const IdentifierHash& hash) const = 0; + virtual SCT_OnlineId getOnlineIdFromHash(const IdentifierHash& hash, const EventContext& ctx) const = 0; /// return the rob/rod Id, given a hash (used by simulation encoders) virtual std::uint32_t getRobIdFromHash(const IdentifierHash& hash) const = 0; + virtual std::uint32_t getRobIdFromHash(const IdentifierHash& hash, const EventContext& ctx) const = 0; /// return the online Id, given an offlineId virtual SCT_OnlineId getOnlineIdFromOfflineId(const Identifier& offlineId) const = 0; + virtual SCT_OnlineId getOnlineIdFromOfflineId(const Identifier& offlineId, const EventContext& ctx) const = 0; /// return the rob/rod Id, given an offlineId (used by simulation encoders) virtual std::uint32_t getRobIdFromOfflineId(const Identifier& offlineId) const = 0; + virtual std::uint32_t getRobIdFromOfflineId(const Identifier& offlineId, const EventContext& ctx) const = 0; /// size of the data structure (for the SCT should be 8176, one for each module side) virtual unsigned int size() const = 0; + virtual unsigned int size(const EventContext& ctx) const = 0; /// is the data structure empty? virtual bool empty() const = 0; + virtual bool empty(const EventContext& ctx) const = 0; /// get hash from a module serial number, needed in the conditions service because configurations are stored by module s/n virtual IdentifierHash getHashFromSerialNumber(const SCT_SerialNumber& sn) const = 0; + virtual IdentifierHash getHashFromSerialNumber(const SCT_SerialNumber& sn, const EventContext& ctx) const = 0; /// get module serial number from hash, needed during filling of data structure virtual SCT_SerialNumber getSerialNumberFromHash(const IdentifierHash& hash) const = 0; + virtual SCT_SerialNumber getSerialNumberFromHash(const IdentifierHash& hash, const EventContext& ctx) const = 0; /// fill a users vector with all the RodIds virtual void getAllRods(std::vector<std::uint32_t>& usersVector) const = 0; + virtual void getAllRods(std::vector<std::uint32_t>& usersVector, const EventContext& ctx) const = 0; /// fill a user's vector with all the hash ids which belong to a given rod virtual void getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId) const = 0; + virtual void getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId, const EventContext& ctx) const = 0; }; #endif // ISCT_CablingTool_h diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingTool.cxx b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingTool.cxx index 4062118a51331b894dc2effa35c26b6b338e2c42..38c5c554382beb815cfb43f3b374ae8d34bb800b 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingTool.cxx +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -71,8 +71,8 @@ SCT_CablingTool::finalize() { // unsigned int -SCT_CablingTool::size() const { - const SCT_CablingData* data{getData()}; +SCT_CablingTool::size(const EventContext& ctx) const { + const SCT_CablingData* data{getData(ctx)}; if (data==nullptr) { ATH_MSG_FATAL("Filling the cabling FAILED"); return 0; @@ -81,15 +81,27 @@ SCT_CablingTool::size() const { return data->getHashEntries(); } +unsigned int +SCT_CablingTool::size() const { + const EventContext& ctx{Gaudi::Hive::currentContext()}; + return size(ctx); +} + // +bool +SCT_CablingTool::empty(const EventContext& ctx) const { + return (size(ctx)==0); +} + bool SCT_CablingTool::empty() const { - return (size()==0); + const EventContext& ctx{Gaudi::Hive::currentContext()}; + return empty(ctx); } // IdentifierHash -SCT_CablingTool::getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool withWarnings) const { +SCT_CablingTool::getHashFromOnlineId(const SCT_OnlineId& onlineId, const EventContext& ctx, const bool withWarnings) const { //is it valid at all? if (not onlineId.is_valid()) { if (withWarnings) ATH_MSG_WARNING("Invalid online id ("<<std::hex<<onlineId<<") "<<std::dec); @@ -102,7 +114,7 @@ SCT_CablingTool::getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool wi return invalidHash; } - const SCT_CablingData* data{getData()}; + const SCT_CablingData* data{getData(ctx)}; if (data==nullptr) { ATH_MSG_FATAL("Filling the cabling FAILED"); return invalidHash; @@ -111,10 +123,16 @@ SCT_CablingTool::getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool wi return data->getHashFromOnlineId(onlineId); } +IdentifierHash +SCT_CablingTool::getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool withWarnings) const { + const EventContext& ctx{Gaudi::Hive::currentContext()}; + return getHashFromOnlineId(onlineId, ctx, withWarnings); +} + // SCT_OnlineId -SCT_CablingTool::getOnlineIdFromHash(const IdentifierHash& hash) const { - const SCT_CablingData* data{getData()}; +SCT_CablingTool::getOnlineIdFromHash(const IdentifierHash& hash, const EventContext& ctx) const { + const SCT_CablingData* data{getData(ctx)}; if (data==nullptr) { ATH_MSG_FATAL("Filling the cabling FAILED"); return invalidId; @@ -123,20 +141,56 @@ SCT_CablingTool::getOnlineIdFromHash(const IdentifierHash& hash) const { return data->getOnlineIdFromHash(hash); } +SCT_OnlineId +SCT_CablingTool::getOnlineIdFromHash(const IdentifierHash& hash) const { + const EventContext& ctx{Gaudi::Hive::currentContext()}; + return getOnlineIdFromHash(hash, ctx); +} + // SCT_OnlineId -SCT_CablingTool::getOnlineIdFromOfflineId(const Identifier& offlineId) const { +SCT_CablingTool::getOnlineIdFromOfflineId(const Identifier& offlineId, const EventContext& ctx) const { if (not offlineId.is_valid()) return invalidId; IdentifierHash hash(m_idHelper->wafer_hash(offlineId)); - return getOnlineIdFromHash(hash); + return getOnlineIdFromHash(hash, ctx); +} + +SCT_OnlineId +SCT_CablingTool::getOnlineIdFromOfflineId(const Identifier& offlineId) const { + const EventContext& ctx{Gaudi::Hive::currentContext()}; + return getOnlineIdFromOfflineId(offlineId, ctx); +} + +// +std::uint32_t +SCT_CablingTool::getRobIdFromHash(const IdentifierHash& hash, const EventContext& ctx) const { + return getOnlineIdFromHash(hash, ctx).rod(); +} + +std::uint32_t +SCT_CablingTool::getRobIdFromHash(const IdentifierHash& hash) const { + const EventContext& ctx{Gaudi::Hive::currentContext()}; + return getRobIdFromHash(hash, ctx); +} + +// +std::uint32_t +SCT_CablingTool::getRobIdFromOfflineId(const Identifier& offlineId, const EventContext& ctx) const { + return getOnlineIdFromOfflineId(offlineId, ctx).rod(); +} + +std::uint32_t +SCT_CablingTool::getRobIdFromOfflineId(const Identifier& offlineId) const { + const EventContext& ctx{Gaudi::Hive::currentContext()}; + return getRobIdFromOfflineId(offlineId, ctx); } // IdentifierHash -SCT_CablingTool::getHashFromSerialNumber(const SCT_SerialNumber& sn) const { +SCT_CablingTool::getHashFromSerialNumber(const SCT_SerialNumber& sn, const EventContext& ctx) const { if (not sn.isWellFormed()) return invalidHash; - const SCT_CablingData* data{getData()}; + const SCT_CablingData* data{getData(ctx)}; if (data==nullptr) { ATH_MSG_FATAL("Filling the cabling FAILED"); return invalidHash; @@ -145,13 +199,19 @@ SCT_CablingTool::getHashFromSerialNumber(const SCT_SerialNumber& sn) const { return data->getHashFromSerialNumber(sn); } +IdentifierHash +SCT_CablingTool::getHashFromSerialNumber(const SCT_SerialNumber& sn) const { + const EventContext& ctx{Gaudi::Hive::currentContext()}; + return getHashFromSerialNumber(sn, ctx); +} + SCT_SerialNumber -SCT_CablingTool::getSerialNumberFromHash(const IdentifierHash& hash) const { +SCT_CablingTool::getSerialNumberFromHash(const IdentifierHash& hash, const EventContext& ctx) const { if (not hash.is_valid()) return invalidSn; //hash must be even IdentifierHash evenHash{even(hash)}; - const SCT_CablingData* data{getData()}; + const SCT_CablingData* data{getData(ctx)}; if (data==nullptr) { ATH_MSG_FATAL("Filling the cabling FAILED"); return invalidSn; @@ -160,9 +220,15 @@ SCT_CablingTool::getSerialNumberFromHash(const IdentifierHash& hash) const { return data->getSerialNumberFromHash(evenHash); } +SCT_SerialNumber +SCT_CablingTool::getSerialNumberFromHash(const IdentifierHash& hash) const { + const EventContext& ctx{Gaudi::Hive::currentContext()}; + return getSerialNumberFromHash(hash, ctx); +} + void -SCT_CablingTool::getAllRods(std::vector<std::uint32_t>& usersVector) const { - const SCT_CablingData* data{getData()}; +SCT_CablingTool::getAllRods(std::vector<std::uint32_t>& usersVector, const EventContext& ctx) const { + const SCT_CablingData* data{getData(ctx)}; if (data==nullptr) { ATH_MSG_FATAL("Filling the cabling FAILED"); return; @@ -172,21 +238,32 @@ SCT_CablingTool::getAllRods(std::vector<std::uint32_t>& usersVector) const { } void -SCT_CablingTool::getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId) const { - SCT_OnlineId firstPossibleId(rodId,SCT_OnlineId::FIRST_FIBRE); - const bool withWarnings(false); - for (SCT_OnlineId i(firstPossibleId);i!=SCT_OnlineId::INVALID_ONLINE_ID;++i) { - IdentifierHash thisHash(getHashFromOnlineId(i, withWarnings)); +SCT_CablingTool::getAllRods(std::vector<std::uint32_t>& usersVector) const { + const EventContext& ctx{Gaudi::Hive::currentContext()}; + getAllRods(usersVector, ctx); +} + +void +SCT_CablingTool::getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId, const EventContext& ctx) const { + SCT_OnlineId firstPossibleId{rodId, SCT_OnlineId::FIRST_FIBRE}; + const bool withWarnings{false}; + for (SCT_OnlineId i{firstPossibleId}; i!=SCT_OnlineId::INVALID_ONLINE_ID; ++i) { + IdentifierHash thisHash(getHashFromOnlineId(i, ctx, withWarnings)); if (thisHash != invalidHash) { usersVector.push_back(thisHash); } } } +void +SCT_CablingTool::getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId) const { + const EventContext& ctx{Gaudi::Hive::currentContext()}; + getHashesForRod(usersVector, rodId, ctx); +} + const SCT_CablingData* -SCT_CablingTool::getData() const { +SCT_CablingTool::getData(const EventContext& ctx) const { static const EventContext::ContextEvt_t invalidValue{EventContext::INVALID_CONTEXT_EVT}; - const EventContext& ctx{Gaudi::Hive::currentContext()}; const EventContext::ContextID_t slot{ctx.slot()}; const EventContext::ContextEvt_t evt{ctx.evt()}; if (slot>=m_cache.size()) { diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingTool.h b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingTool.h index 0cd29cac31cc6a800dda5f38455c9b20f5e6f995..e6cdf40689268152704f8e4ddccdef75afa530e1 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingTool.h +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_CablingTool_h @@ -49,41 +49,48 @@ class SCT_CablingTool: public extends<AthAlgTool, ISCT_CablingTool> { //@name ISCT_CablingTool methods implemented, these are visible to clients //@{ + /// size of the data structure (for the SCT should be 8176, one for each module side) + virtual unsigned int size(const EventContext& ctx) const override; + virtual unsigned int size() const override; + + /// is the data structure empty? + virtual bool empty(const EventContext& ctx) const override; + virtual bool empty() const override; + /// return offline hash, given the online Id (used by decoders) + virtual IdentifierHash getHashFromOnlineId(const SCT_OnlineId& onlineId, const EventContext& ctx, const bool withWarnings=true) const override; virtual IdentifierHash getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool withWarnings=true) const override; /// return the online Id, given a hash (used by simulation encoders) + virtual SCT_OnlineId getOnlineIdFromHash(const IdentifierHash& hash, const EventContext& ctx) const override; virtual SCT_OnlineId getOnlineIdFromHash(const IdentifierHash& hash) const override; /// return the online Id, given an offlineId + virtual SCT_OnlineId getOnlineIdFromOfflineId(const Identifier& offlineId, const EventContext& ctx) const override; virtual SCT_OnlineId getOnlineIdFromOfflineId(const Identifier& offlineId) const override; /// return the rob/rod Id, given a hash (used by simulation encoders) - virtual std::uint32_t getRobIdFromHash(const IdentifierHash& hash) const override { - return getOnlineIdFromHash(hash).rod(); - } + virtual std::uint32_t getRobIdFromHash(const IdentifierHash& hash, const EventContext& ctx) const override; + virtual std::uint32_t getRobIdFromHash(const IdentifierHash& hash) const override; /// return the rob/rod Id, given an offlineId (used by simulation encoders) - virtual std::uint32_t getRobIdFromOfflineId(const Identifier& offlineId) const override { - return getOnlineIdFromOfflineId(offlineId).rod(); - } + virtual std::uint32_t getRobIdFromOfflineId(const Identifier& offlineId, const EventContext& ctx) const override; + virtual std::uint32_t getRobIdFromOfflineId(const Identifier& offlineId) const override; - /// size of the data structure (for the SCT should be 8176, one for each module side) - virtual unsigned int size() const override; - - /// is the data structure empty? - virtual bool empty() const override; - /// get hash from a module serial number, needed in the conditions service because configurations are stored by module s/n + virtual IdentifierHash getHashFromSerialNumber(const SCT_SerialNumber& sn, const EventContext& ctx) const override; virtual IdentifierHash getHashFromSerialNumber(const SCT_SerialNumber& sn) const override; /// get module serial number from hash, needed during filling of data structure + virtual SCT_SerialNumber getSerialNumberFromHash(const IdentifierHash& hash, const EventContext& ctx) const override; virtual SCT_SerialNumber getSerialNumberFromHash(const IdentifierHash& hash) const override; /// fill a users vector with all the RodIds + virtual void getAllRods(std::vector<std::uint32_t>& usersVector, const EventContext& ctx) const override; virtual void getAllRods(std::vector<std::uint32_t>& usersVector) const override; /// fill a user's vector with all the hash ids which belong to a given rod + virtual void getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId, const EventContext& ctx) const override; virtual void getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId) const override; //@} @@ -100,7 +107,7 @@ class SCT_CablingTool: public extends<AthAlgTool, ISCT_CablingTool> { // Pointer of SCT_CablingData mutable Gaudi::Hive::ContextSpecificPtr<const SCT_CablingData> m_condData; - const SCT_CablingData* getData() const; + const SCT_CablingData* getData(const EventContext& ctx) const; }; #endif // SCT_CablingTool_h diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolCB.cxx b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolCB.cxx index a92a00198e48d9b1f8bf598758ff697b646c81e8..c99cb35312fde597a15e3a2f93769a0776277827 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolCB.cxx +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolCB.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -118,12 +118,22 @@ SCT_CablingToolCB::size() const { return m_data.getHashEntries(); } +unsigned int +SCT_CablingToolCB::size(const EventContext& /*ctx*/) const { + return size(); +} + // bool SCT_CablingToolCB::empty() const { return (size()==0); } +bool +SCT_CablingToolCB::empty(const EventContext& /*ctx*/) const { + return empty(); +} + // IdentifierHash SCT_CablingToolCB::getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool withWarnings) const { @@ -142,12 +152,22 @@ SCT_CablingToolCB::getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool return m_data.getHashFromOnlineId(onlineId); } +IdentifierHash +SCT_CablingToolCB::getHashFromOnlineId(const SCT_OnlineId& onlineId, const EventContext& /*ctx*/, const bool withWarnings) const { + return getHashFromOnlineId(onlineId, withWarnings); +} + // SCT_OnlineId SCT_CablingToolCB::getOnlineIdFromHash(const IdentifierHash& hash) const { return m_data.getOnlineIdFromHash(hash); } +SCT_OnlineId +SCT_CablingToolCB::getOnlineIdFromHash(const IdentifierHash& hash, const EventContext& /*ctx*/) const { + return getOnlineIdFromHash(hash); +} + // SCT_OnlineId SCT_CablingToolCB::getOnlineIdFromOfflineId(const Identifier& offlineId) const { @@ -156,6 +176,33 @@ SCT_CablingToolCB::getOnlineIdFromOfflineId(const Identifier& offlineId) const { return getOnlineIdFromHash(hash); } +SCT_OnlineId +SCT_CablingToolCB::getOnlineIdFromOfflineId(const Identifier& offlineId, const EventContext& /*ctx*/) const { + return getOnlineIdFromOfflineId(offlineId); +} + +// +std::uint32_t +SCT_CablingToolCB::getRobIdFromHash(const IdentifierHash& hash) const { + return getOnlineIdFromHash(hash).rod(); +} + +std::uint32_t +SCT_CablingToolCB::getRobIdFromHash(const IdentifierHash& hash, const EventContext& /*ctx*/) const { + return getRobIdFromHash(hash); +} + +// +std::uint32_t +SCT_CablingToolCB::getRobIdFromOfflineId(const Identifier& offlineId) const { + return getOnlineIdFromOfflineId(offlineId).rod(); +} + +std::uint32_t +SCT_CablingToolCB::getRobIdFromOfflineId(const Identifier& offlineId, const EventContext& /*ctx*/) const { + return getRobIdFromOfflineId(offlineId); +} + // IdentifierHash SCT_CablingToolCB::getHashFromSerialNumber(const SCT_SerialNumber& sn) const { @@ -163,6 +210,11 @@ SCT_CablingToolCB::getHashFromSerialNumber(const SCT_SerialNumber& sn) const { return m_data.getHashFromSerialNumber(sn); } +IdentifierHash +SCT_CablingToolCB::getHashFromSerialNumber(const SCT_SerialNumber& sn, const EventContext& /*ctx*/) const { + return getHashFromSerialNumber(sn); +} + SCT_SerialNumber SCT_CablingToolCB::getSerialNumberFromHash(const IdentifierHash& hash) const { if (not hash.is_valid()) return invalidSn; @@ -171,6 +223,21 @@ SCT_CablingToolCB::getSerialNumberFromHash(const IdentifierHash& hash) const { return m_data.getSerialNumberFromHash(evenHash); } +SCT_SerialNumber +SCT_CablingToolCB::getSerialNumberFromHash(const IdentifierHash& hash, const EventContext& /*ctx*/) const { + return getSerialNumberFromHash(hash); +} + +void +SCT_CablingToolCB::getAllRods(std::vector<std::uint32_t>& usersVector) const { + m_data.getRods(usersVector); +} + +void +SCT_CablingToolCB::getAllRods(std::vector<std::uint32_t>& usersVector, const EventContext& /*ctx*/) const { + getAllRods(usersVector); +} + void SCT_CablingToolCB::getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId) const { SCT_OnlineId firstPossibleId(rodId,SCT_OnlineId::FIRST_FIBRE); @@ -182,3 +249,8 @@ SCT_CablingToolCB::getHashesForRod(std::vector<IdentifierHash>& usersVector, con } } } + +void +SCT_CablingToolCB::getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId, const EventContext& /*ctx*/) const { + getHashesForRod(usersVector, rodId); +} diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolCB.h b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolCB.h index 0987e56b41227db95753d74337f1abf390d72b65..73cf362bbc56eabcd8ba7038f15e6069215ace76 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolCB.h +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolCB.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_CablingToolCB_h @@ -53,41 +53,48 @@ class SCT_CablingToolCB: public extends<AthAlgTool, ISCT_CablingTool, IIncidentL //@name ISCT_CablingToolCB methods implemented, these are visible to clients //@{ + /// size of the data structure (for the SCT should be 8176, one for each module side) + virtual unsigned int size(const EventContext& ctx) const override; + virtual unsigned int size() const override; + + /// is the data structure empty? + virtual bool empty(const EventContext& ctx) const override; + virtual bool empty() const override; + /// return offline hash, given the online Id (used by decoders) + virtual IdentifierHash getHashFromOnlineId(const SCT_OnlineId& onlineId, const EventContext& ctx, const bool withWarnings=true) const override; virtual IdentifierHash getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool withWarnings=true) const override; /// return the online Id, given a hash (used by simulation encoders) + virtual SCT_OnlineId getOnlineIdFromHash(const IdentifierHash& hash, const EventContext& ctx) const override; virtual SCT_OnlineId getOnlineIdFromHash(const IdentifierHash& hash) const override; /// return the online Id, given an offlineId + virtual SCT_OnlineId getOnlineIdFromOfflineId(const Identifier& offlineId, const EventContext& ctx) const override; virtual SCT_OnlineId getOnlineIdFromOfflineId(const Identifier& offlineId) const override; /// return the rob/rod Id, given a hash (used by simulation encoders) - virtual std::uint32_t getRobIdFromHash(const IdentifierHash& hash) const override { - return getOnlineIdFromHash(hash).rod(); - } + virtual std::uint32_t getRobIdFromHash(const IdentifierHash& hash, const EventContext& ctx) const override; + virtual std::uint32_t getRobIdFromHash(const IdentifierHash& hash) const override; /// return the rob/rod Id, given an offlineId (used by simulation encoders) - virtual std::uint32_t getRobIdFromOfflineId(const Identifier& offlineId) const override { - return getOnlineIdFromOfflineId(offlineId).rod(); - } + virtual std::uint32_t getRobIdFromOfflineId(const Identifier& offlineId, const EventContext& ctx) const override; + virtual std::uint32_t getRobIdFromOfflineId(const Identifier& offlineId) const override; - /// size of the data structure (for the SCT should be 8176, one for each module side) - virtual unsigned int size() const override; - - /// is the data structure empty? - virtual bool empty() const override; - /// get hash from a module serial number, needed in the conditions service because configurations are stored by module s/n + virtual IdentifierHash getHashFromSerialNumber(const SCT_SerialNumber& sn, const EventContext& ctx) const override; virtual IdentifierHash getHashFromSerialNumber(const SCT_SerialNumber& sn) const override; /// get module serial number from hash, needed during filling of data structure + virtual SCT_SerialNumber getSerialNumberFromHash(const IdentifierHash& hash, const EventContext& ctx) const override; virtual SCT_SerialNumber getSerialNumberFromHash(const IdentifierHash& hash) const override; /// fill a users vector with all the RodIds - virtual void getAllRods(std::vector<std::uint32_t>& usersVector) const override { m_data.getRods(usersVector); } + virtual void getAllRods(std::vector<std::uint32_t>& usersVector, const EventContext& ctx) const override; + virtual void getAllRods(std::vector<std::uint32_t>& usersVector) const override; /// fill a user's vector with all the hash ids which belong to a given rod + virtual void getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId, const EventContext& ctx) const override; virtual void getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId) const override; //@} diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_TestCablingAlg.cxx b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_TestCablingAlg.cxx index a3b2bd66f4ae8e4c843309bd4dac3f5674149310..a879af5acf09ca96408d796f8951d38918dfe755 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_TestCablingAlg.cxx +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_TestCablingAlg.cxx @@ -63,43 +63,43 @@ SCT_TestCablingAlg::coordString(const Identifier& offlineId) const { } StatusCode -SCT_TestCablingAlg::execute(const EventContext& /*ctx*/) const { +SCT_TestCablingAlg::execute(const EventContext& ctx) const { const string testAreaPath{CoveritySafe::getenv("TestArea")}; string filename{testAreaPath+"/cabling.txt"}; ATH_MSG_INFO("Filename: " << filename << " will be written to your $TestArea."); ofstream opFile1{filename.c_str(), ios::out}; ATH_MSG_INFO("Executing..."); ATH_MSG_INFO("hash, offline Id, online Id(hex), serial number"); - const unsigned int nHashesInCabling{2*m_cablingTool->size()}; + const unsigned int nHashesInCabling{2*m_cablingTool->size(ctx)}; for (unsigned int i{0}; i!=nHashesInCabling; ++i) { IdentifierHash hash{i}; Identifier offlineId{m_idHelper->wafer_id(hash)}; - SCT_OnlineId onlineId{m_cablingTool->getOnlineIdFromHash(hash)}; - SCT_SerialNumber sn{m_cablingTool->getSerialNumberFromHash(hash)}; + SCT_OnlineId onlineId{m_cablingTool->getOnlineIdFromHash(hash, ctx)}; + SCT_SerialNumber sn{m_cablingTool->getSerialNumberFromHash(hash, ctx)}; ATH_MSG_INFO(i << " " << offlineId << " " << hex << onlineId << dec << " " << sn << " " << coordString(offlineId)); opFile1 << i << " " << offlineId << " " << hex << onlineId << dec << " " << sn << " " << coordString(offlineId) << std::endl; - if (m_cablingTool->getHashFromOnlineId(onlineId) != hash){ - ATH_MSG_ERROR("?? " << m_cablingTool->getHashFromOnlineId(onlineId)); + if (m_cablingTool->getHashFromOnlineId(onlineId, ctx) != hash){ + ATH_MSG_ERROR("?? " << m_cablingTool->getHashFromOnlineId(onlineId, ctx)); } } opFile1.close(); - ATH_MSG_INFO("Size: " << m_cablingTool->size()); + ATH_MSG_INFO("Size: " << m_cablingTool->size(ctx)); std::vector<unsigned int> rods; - m_cablingTool->getAllRods(rods); + m_cablingTool->getAllRods(rods, ctx); ATH_MSG_INFO("Num. of rods= " << rods.size()); ATH_MSG_INFO("First rod id " << std::hex << rods[0] << std::dec); string sn{"20220130000299"}; - ATH_MSG_INFO("Hash from serial number " << m_cablingTool->getHashFromSerialNumber(sn)); + ATH_MSG_INFO("Hash from serial number " << m_cablingTool->getHashFromSerialNumber(sn, ctx)); int tsn{130000299}; - ATH_MSG_INFO("Hash from truncated serial number " << m_cablingTool->getHashFromSerialNumber(tsn)); + ATH_MSG_INFO("Hash from truncated serial number " << m_cablingTool->getHashFromSerialNumber(tsn, ctx)); unsigned long long snll{20220130000299LL}; - ATH_MSG_INFO("Hash from truncated serial number " << m_cablingTool->getHashFromSerialNumber(snll)); - ATH_MSG_INFO("Hash from onlineid " << m_cablingTool->getHashFromOnlineId(0x3d230006)); - ATH_MSG_INFO("Hash from invalid onlineid " << m_cablingTool->getHashFromOnlineId(0x3d250006)); - ATH_MSG_INFO("Hash from textfile onlineid " << m_cablingTool->getHashFromOnlineId(0x3d220010)); - ATH_MSG_INFO("Hash from db onlineid " << m_cablingTool->getHashFromOnlineId(0x3d220105)); + ATH_MSG_INFO("Hash from truncated serial number " << m_cablingTool->getHashFromSerialNumber(snll, ctx)); + ATH_MSG_INFO("Hash from onlineid " << m_cablingTool->getHashFromOnlineId(0x3d230006, ctx)); + ATH_MSG_INFO("Hash from invalid onlineid " << m_cablingTool->getHashFromOnlineId(0x3d250006, ctx)); + ATH_MSG_INFO("Hash from textfile onlineid " << m_cablingTool->getHashFromOnlineId(0x3d220010, ctx)); + ATH_MSG_INFO("Hash from db onlineid " << m_cablingTool->getHashFromOnlineId(0x3d220105, ctx)); std::vector<IdentifierHash> hashVec; - m_cablingTool->getHashesForRod(hashVec, 0x220005); + m_cablingTool->getHashesForRod(hashVec, 0x220005, ctx); ATH_MSG_INFO("number of hashes for rod 0x220005: " << hashVec.size()); //new section December 2014 @@ -124,8 +124,8 @@ SCT_TestCablingAlg::execute(const EventContext& /*ctx*/) const { for (unsigned int i{0}; i!=nHashesInCabling; ++i) { IdentifierHash hash{i}; Identifier offlineId{m_idHelper->wafer_id(hash)}; - SCT_OnlineId onlineId{m_cablingTool->getOnlineIdFromHash(hash)}; - SCT_SerialNumber sn{m_cablingTool->getSerialNumberFromHash(hash)}; + SCT_OnlineId onlineId{m_cablingTool->getOnlineIdFromHash(hash, ctx)}; + SCT_SerialNumber sn{m_cablingTool->getSerialNumberFromHash(hash, ctx)}; //rod, fibre, bec, layerDisk, eta, phi, side, robId, sn const int bec{m_idHelper->barrel_ec(offlineId)}; const int layer{m_idHelper->layer_disk(offlineId)}; diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx index 25604d4d4ba59cac425c9674c46ef05db111e986..d1967ada521facbed9a4010cc0e34e5b8ad585f1 100644 --- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx +++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx @@ -90,7 +90,7 @@ StatusCode SCTRawDataProvider::execute(const EventContext& ctx) const std::vector<const ROBFragment*> vecROBFrags; if (not m_roiSeeded.value()) { std::vector<uint32_t> rodList; - m_cabling->getAllRods(rodList); + m_cabling->getAllRods(rodList, ctx); m_robDataProvider->getROBData(rodList , vecROBFrags); } else { diff --git a/PhysicsAnalysis/D3PDMaker/InDetD3PDMaker/CMakeLists.txt b/PhysicsAnalysis/D3PDMaker/InDetD3PDMaker/CMakeLists.txt index 4f90a5e19dbbf3c024f3ce3c87fdb47ac89b3b5a..1ee9db08366f95766b6ef6a9a28933e8180c0b53 100644 --- a/PhysicsAnalysis/D3PDMaker/InDetD3PDMaker/CMakeLists.txt +++ b/PhysicsAnalysis/D3PDMaker/InDetD3PDMaker/CMakeLists.txt @@ -60,7 +60,7 @@ atlas_add_component( InDetD3PDMaker src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} ${HEPPDT_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${HEPMC_LIBRARIES} ${HEPPDT_LIBRARIES} GaudiKernel CommissionEvent AthContainers AthenaKernel StoreGateLib AtlasDetDescr GeoAdaptors Identifier EventPrimitives xAODEventInfo xAODTracking InDetBeamSpotService SCT_ConditionsTools TRT_ConditionsServices InDetIdentifier InDetReadoutGeometry SCT_CablingLib InDetRawData InDetPrepRawData InDetRIO_OnTrack InDetSimEvent D3PDMakerUtils MCTruthClassifier ParticleTruth ITrackToVertex muonEvent Particle TrkCompetingRIOsOnTrack TrkEventPrimitives TrkParameters TrkParticleBase TrkPrepRawData TrkRIO_OnTrack TrkTrack TrkTrackSummary TrkTruthData TrkV0Vertex VxVertex TrkToolInterfaces TrkVertexFitterValidationUtils ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${HEPMC_LIBRARIES} ${HEPPDT_LIBRARIES} GaudiKernel CommissionEvent AthContainers AthenaKernel StoreGateLib AtlasDetDescr GeoAdaptors Identifier EventPrimitives xAODEventInfo xAODTracking InDetBeamSpotService SCT_ConditionsToolsLib TRT_ConditionsServices InDetIdentifier InDetReadoutGeometry SCT_CablingLib InDetRawData InDetPrepRawData InDetRIO_OnTrack InDetSimEvent D3PDMakerUtils MCTruthClassifier ParticleTruth ITrackToVertex muonEvent Particle TrkCompetingRIOsOnTrack TrkEventPrimitives TrkParameters TrkParticleBase TrkPrepRawData TrkRIO_OnTrack TrkTrack TrkTrackSummary TrkTruthData TrkV0Vertex VxVertex TrkToolInterfaces TrkVertexFitterValidationUtils ) # Install files from the package: atlas_install_headers( InDetD3PDMaker )