ATLAS Offline Software
Loading...
Searching...
No Matches
ITkPixelCablingAlg Class Reference

Conditions algorithm which fills the ITkPixelCablingData from plain text (a file). More...

#include <ITkPixelCablingAlg.h>

Inheritance diagram for ITkPixelCablingAlg:
Collaboration diagram for ITkPixelCablingAlg:

Public Member Functions

 ITkPixelCablingAlg (const std::string &name, ISvcLocator *svc)
virtual ~ITkPixelCablingAlg ()=default
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) const override
virtual bool isClonable () const override
 Make this algorithm clonable.
virtual bool isReEntrant () const override
 Avoid scheduling algorithm multiple times.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.

Private Types

typedef ServiceHandle< StoreGateSvc > StoreGateSvc_t

Private Member Functions

StatusCode generateTestCabling (std::unique_ptr< ITkPixelCablingData > &cabling) const
StatusCode fillFromCREST (std::unique_ptr< ITkPixelCablingData > &cabling, const std::string &c) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

Gaudi::Property< bool > m_useTestCabling {this, "UseTestCabling", false, "Generate a dummy cabling for testing/development purposes, as the online IDs don't exist yet"}
SG::ReadCondHandleKey< AthenaAttributeList > m_readKey {this,"ReadKey","/ITk/Pixel/Identifier"}
SG::WriteCondHandleKey< ITkPixelCablingData > m_writeKey {this, "WriteKey", "ITkPixelCablingData", "Key of output (derived) conditions data"}
const PixelID * m_idHelper {nullptr}
const InDetDD::PixelDetectorManager * m_detManager {}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Conditions algorithm which fills the ITkPixelCablingData from plain text (a file).

Definition at line 47 of file ITkPixelCablingAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 376 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ITkPixelCablingAlg()

ITkPixelCablingAlg::ITkPixelCablingAlg ( const std::string & name,
ISvcLocator * svc )

Definition at line 49 of file ITkPixelCablingAlg.cxx.

49 :
50 AthCondAlgorithm(name, pSvcLocator)
51{
52}

◆ ~ITkPixelCablingAlg()

virtual ITkPixelCablingAlg::~ITkPixelCablingAlg ( )
virtualdefault

Member Function Documentation

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

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

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ 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.

◆ evtStore()

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.

◆ execute()

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

Definition at line 72 of file ITkPixelCablingAlg.cxx.

72 {
73 // Write Cond Handle
74 SG::WriteCondHandle<ITkPixelCablingData> writeHandle = SG::makeHandle(m_writeKey, ctx);
75 if (writeHandle.isValid()) {
76 ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid."
77 << ". In theory this should not be called, but may happen"
78 << " if multiple concurrent events are being processed out of order.");
79 return StatusCode::SUCCESS;
80 }
81 SG::ReadCondHandle<AthenaAttributeList> readHandle{m_readKey, ctx};
82 const AthenaAttributeList* attr{*readHandle};
83
84 if (attr==nullptr) {
85 ATH_MSG_ERROR("Failed to retrieve AthenaAttributeList with key " << m_readKey.key());
86 return StatusCode::FAILURE;
87 }
88 const std::string& pl = (*attr)["cabling"].data<std::string>();
89
90 // Construct the output Cond Object and fill it in
91 std::unique_ptr<ITkPixelCablingData> pCabling = std::make_unique<ITkPixelCablingData>();
92
93 //For development purposes, generate a dummy cabling structure, using the existing
94 //offline IDs and dummy online ones. It's problematic to deal with quads easily, as
95 //they have one offline ID, but up to 4 online IDs. If there will be virtual elinks
96 //for merged quads or if there's no data merging, the situation is not mappable for
97 //the encoding offline -> online map. Once could at most map to certain bits that
98 //would be shared between the 4 online IDs. In the decoding direction, the
99 //online->offline will be always mappable, although it would be degenerate mapping.
100 if (m_useTestCabling){
101 ATH_MSG_DEBUG("Using test cabling generated with ITkPixelCablingAlg::generateTestCabling(...)");
103 pCabling->print();
104 if (writeHandle.record(EventIDRange(IOVInfiniteRange::infiniteRunLB()), std::move(pCabling)).isFailure()) {
105 return StatusCode::FAILURE;
106 }
107
108 return StatusCode::SUCCESS;
109 }
110
111 ATH_CHECK(fillFromCREST(pCabling, pl));
112 const int numEntries = pCabling->size();
113 ATH_MSG_DEBUG(numEntries << " entries were made to the identifier map.");
114
115 // Define validity of the output cond object and record it
116 const EventIDBase start{EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, 0, 0, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM};
117 const EventIDBase stop{EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM};
118 const EventIDRange rangeW{start, stop};
119 if (writeHandle.record(rangeW, std::move(pCabling)).isFailure()) {
120 ATH_MSG_FATAL("Could not record ITkPixelCablingData " << writeHandle.key()
121 << " with EventRange " << rangeW
122 << " into Conditions Store");
123 return StatusCode::FAILURE;
124 }
125 ATH_MSG_VERBOSE("recorded new conditions data object " << writeHandle.key() << " with range " << rangeW << " into Conditions Store");
126 return (numEntries==0) ? (StatusCode::FAILURE) : (StatusCode::SUCCESS);
127}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_VERBOSE(x,...)
#define ATH_MSG_FATAL(x,...)
static EventIDRange infiniteRunLB()
Produces an EventIDRange that is infinite in RunLumi and invalid in Time.
SG::WriteCondHandleKey< ITkPixelCablingData > m_writeKey
StatusCode fillFromCREST(std::unique_ptr< ITkPixelCablingData > &cabling, const std::string &c) const
SG::ReadCondHandleKey< AthenaAttributeList > m_readKey
StatusCode generateTestCabling(std::unique_ptr< ITkPixelCablingData > &cabling) const
Gaudi::Property< bool > m_useTestCabling
const std::string & key() const
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
const DataObjID & fullKey() const
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())

◆ 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 & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ fillFromCREST()

StatusCode ITkPixelCablingAlg::fillFromCREST ( std::unique_ptr< ITkPixelCablingData > & cabling,
const std::string & c ) const
private

Definition at line 219 of file ITkPixelCablingAlg.cxx.

219 {
220
221 // Remove Python bytes representation: b'...'
222 std::string s=c;
223 if (c.size() >= 3 &&
224 c.substr(0, 2) == "b'" &&
225 c.back() == '\''){
226 s = c.substr(2, c.size() - 3);
227 }
228 // Parse JSON
229 nlohmann::json config = nlohmann::json::parse(s);
230
231 std::unordered_set<uint32_t> seen;
232
233 for (const auto& entry : config) {
234
235 const uint32_t detectorResourceID = std::stoul(entry.at("DetectorResourceID").get<std::string>(), nullptr, 16);
236
237 const uint32_t trueDetectorResourceID = std::stoul(entry.at("TrueDetectorResourceID").get<std::string>(), nullptr, 16);
238
239 const uint32_t sourceID = std::stoul(entry.at("SourceID").get<std::string>(), nullptr, 16);
240
241 cabling->addEntryOffOn(detectorResourceID & ITkPixelCabling::OFFLINE_DRID_MASK, ITkPixelOnlineId(sourceID, detectorResourceID));
242
243 if (seen.insert(sourceID).second) cabling->addSourceID(sourceID);
244
245 uint64_t moduleID = (static_cast<uint64_t>(ITkPixelCabling::dridToModuleID(trueDetectorResourceID)) << 32);
246
247 Identifier id(static_cast<Identifier::value_type>(moduleID));
248 if (m_idHelper->barrel_ec(id) == 0 && m_idHelper->layer_disk(id) == 0) cabling->addTransformType(ITkPixelCabling::dridToModuleID(trueDetectorResourceID), ITkPixelCabling::TransformType::NominalIBTriplet);
249 else if (m_idHelper->barrel_ec(id) != 0 && (m_idHelper->layer_disk(id) == 0 || m_idHelper->layer_disk(id) == 1) ) cabling->addTransformType(ITkPixelCabling::dridToModuleID(trueDetectorResourceID), ITkPixelCabling::TransformType::NominalIECTriplet);
250 else cabling->addTransformType(ITkPixelCabling::dridToModuleID(trueDetectorResourceID), ITkPixelCabling::TransformType::NominalQuad);
251 ATH_MSG_DEBUG(std::hex << " key " << (detectorResourceID & ITkPixelCabling::OFFLINE_DRID_MASK) << " detectorResourceID " << detectorResourceID << " trueDetectorResourceID " << trueDetectorResourceID << " sourceID " << sourceID);
252 }
253
254 return StatusCode::SUCCESS;
255}
const PixelID * m_idHelper
uint32_t dridToModuleID(const uint32_t &drid)
static constexpr uint32_t OFFLINE_DRID_MASK
setEventNumber uint32_t

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ generateTestCabling()

StatusCode ITkPixelCablingAlg::generateTestCabling ( std::unique_ptr< ITkPixelCablingData > & cabling) const
private

Definition at line 129 of file ITkPixelCablingAlg.cxx.

129 {
130 //We'll loop over all known hashes, and create a sensible cabling situation
131 //for testing purposes, create online ID by shifting the wafer ID by two bits, allowing
132 //to accommodate the non-merged quads with 4 online links vs. one offline entity.
133 //What's used as the online "base" (32 bit) is just the offline ID (64bit) >> 32.
134 //Lowest two bits are always 0 in the base - in fact, at least 2 bytes are. Fine for testing.
135
136 std::unordered_set<uint32_t> seen;
137
138 for (size_t hash = 0; hash < m_idHelper->wafer_hash_max(); hash++){
139 Identifier id = m_idHelper->wafer_id(hash);
140 uint32_t onID = (id.get_identifier32().get_compact());
141
142 const InDetDD::SiDetectorElement *element = m_detManager->getDetectorElement(id);
143 const InDetDD::PixelModuleDesign *p_design = static_cast<const InDetDD::PixelModuleDesign *>(&element->design());
144
145 //a dummy sourceID - has nothing to do with reality, and is intended
146 //for testing purposes only
147
148 uint32_t sourceID = std::abs(m_idHelper->barrel_ec(id)) << 26 | m_idHelper->layer_disk(id) << 20;
149 if (seen.insert(sourceID).second) cabling->addSourceID(sourceID);
150
152 ITkPixelCabling::TransformType moduleTransform;
153 if (p_design->numberOfCircuits() == 4){
154 //it's a quad
155
156 //Let's make the entire layer 1 and 2 non-merged.
157 //We can experiment with this, but we're also after
158 //a proof-of-principle here.
159 if (m_idHelper->barrel_ec(id) == 0 && (m_idHelper->layer_disk(id) == 1 || m_idHelper->layer_disk(id) == 2)){
160 //Non-merged quad has 4 online IDs mappend onto 1 offline,
161 //differentiated by 2-bit chip ID
164 cabling->addEntryOnOff(onID | 0b00, ITkPixelCabling::ModuleInfo(id, moduleType, moduleTransform));
165 cabling->addEntryOnOff(onID | 0b01, ITkPixelCabling::ModuleInfo(id, moduleType, moduleTransform));
166 cabling->addEntryOnOff(onID | 0b10, ITkPixelCabling::ModuleInfo(id, moduleType, moduleTransform));
167 cabling->addEntryOnOff(onID | 0b11, ITkPixelCabling::ModuleInfo(id, moduleType, moduleTransform));
168
169 }
170 else{
171 //Merged quads have 1:1 online:offline correspondence.
172 //Don't need to invent any substructure, but keep it
173 //consistent with the quads
176 cabling->addEntryOnOff(onID, ITkPixelCabling::ModuleInfo(id, moduleType, moduleTransform));
177 }
178
179 //We can also fill in the offline->online map
180 //Were are creating the "base" online ID, i. e. without the chip ID
181 cabling->addEntryOffOn(id, ITkPixelCabling::ModuleInfo<ITkPixelOnlineId>(onID, moduleType, moduleTransform));
182
183
184 //Fill in also the updated ROB-structure-respecting map with some dummy values
185 cabling->addEntryOffOn((onID >> 8) | 0x00000000, ITkPixelOnlineId(sourceID, (onID >> 8) | 0x00000000));
186 cabling->addEntryOffOn((onID >> 8) | 0x40000000, ITkPixelOnlineId(sourceID, (onID >> 8) | 0x40000000));
187 cabling->addEntryOffOn((onID >> 8) | 0x80000000, ITkPixelOnlineId(sourceID, (onID >> 8) | 0x80000000));
188 cabling->addEntryOffOn((onID >> 8) | 0xC0000000, ITkPixelOnlineId(sourceID, (onID >> 8) | 0xC0000000));
190
191 }
192 else {
193
194 //All triplets map 1:1 to chips. Keeping the online
195 //"base" ID consistently shifted - we're dealing with chip 00
198 cabling->addEntryOnOff(onID, ITkPixelCabling::ModuleInfo(id, moduleType, moduleTransform));
199
200 //We can also fill in the offline->online map
201 //Were are creating the "base" online ID, i. e. without the chip ID
202 cabling->addEntryOffOn(id, ITkPixelCabling::ModuleInfo<ITkPixelOnlineId>(onID, moduleType, moduleTransform));
203
204 //Fill in also the updated ROB-structure-respecting map with some dummy values
205 cabling->addEntryOffOn((onID >> 8), ITkPixelOnlineId(sourceID, onID >> 8));
206 if (m_idHelper->barrel_ec(id) == 0){
208 }
209 else {
211 }
212 }
213
214 }
215
216 return StatusCode::SUCCESS;
217}
const InDetDD::PixelDetectorManager * m_detManager
int numberOfCircuits() const
Total number of circuits:
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):

◆ initialize()

StatusCode ITkPixelCablingAlg::initialize ( )
overridevirtual

Definition at line 56 of file ITkPixelCablingAlg.cxx.

56 {
57 // ITkPixelID
58 ATH_CHECK(detStore()->retrieve(m_idHelper, "PixelID"));
59 // det manager
60 if (m_useTestCabling) ATH_CHECK(detStore()->retrieve(m_detManager, "ITkPixel"));
61 // Read Cond Key
62 ATH_CHECK( m_readKey.initialize() );
63 // Write Cond Handle
64 ATH_CHECK(m_writeKey.initialize());
65
66 return StatusCode::SUCCESS;
67}
const ServiceHandle< StoreGateSvc > & detStore() const

◆ 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()

virtual bool ITkPixelCablingAlg::isClonable ( ) const
inlineoverridevirtual

Make this algorithm clonable.

Reimplemented from AthCommonAlgorithm< Gaudi::Algorithm >.

Definition at line 54 of file ITkPixelCablingAlg.h.

54{ return true; };

◆ isReEntrant()

virtual bool AthCondAlgorithm::isReEntrant ( ) const
inlineoverridevirtualinherited

Avoid scheduling algorithm multiple times.

With multiple concurrent events, conditions objects often expire simultaneously for all slots. To avoid that the scheduler runs the CondAlg in each slot, we declare it as "non-reentrant". This ensures that the conditions objects are only created once.

In case a particular CondAlg should behave differently, it can override this method again and return true.

See also
ATEAM-836

Definition at line 39 of file AthCondAlgorithm.h.

39{ return false; }

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ 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 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
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)

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 352 of file AthCommonDataStore.h.

352 {
354 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::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.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::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 AthAnalysisAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_WARNING(x,...)
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ 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 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }

Member Data Documentation

◆ m_detManager

const InDetDD::PixelDetectorManager* ITkPixelCablingAlg::m_detManager {}
private

Definition at line 68 of file ITkPixelCablingAlg.h.

68{};

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 381 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 378 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_idHelper

const PixelID* ITkPixelCablingAlg::m_idHelper {nullptr}
private

Definition at line 67 of file ITkPixelCablingAlg.h.

67{nullptr};

◆ m_readKey

SG::ReadCondHandleKey<AthenaAttributeList> ITkPixelCablingAlg::m_readKey {this,"ReadKey","/ITk/Pixel/Identifier"}
private

Definition at line 65 of file ITkPixelCablingAlg.h.

65{this,"ReadKey","/ITk/Pixel/Identifier"};

◆ m_useTestCabling

Gaudi::Property<bool> ITkPixelCablingAlg::m_useTestCabling {this, "UseTestCabling", false, "Generate a dummy cabling for testing/development purposes, as the online IDs don't exist yet"}
private

Definition at line 62 of file ITkPixelCablingAlg.h.

62{this, "UseTestCabling", false, "Generate a dummy cabling for testing/development purposes, as the online IDs don't exist yet"};

◆ m_varHandleArraysDeclared

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

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 386 of file AthCommonDataStore.h.

◆ m_writeKey

SG::WriteCondHandleKey<ITkPixelCablingData> ITkPixelCablingAlg::m_writeKey {this, "WriteKey", "ITkPixelCablingData", "Key of output (derived) conditions data"}
private

Definition at line 66 of file ITkPixelCablingAlg.h.

66{this, "WriteKey", "ITkPixelCablingData", "Key of output (derived) conditions data"};

The documentation for this class was generated from the following files: