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< StoreGateSvcStoreGateSvc_t

Private Member Functions

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

Private Attributes

StringProperty m_source {this, "DataSource", "ITkPixelTestCabling.json", "a json file for the ITkPixel cabling"}
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::WriteCondHandleKey< ITkPixelCablingDatam_writeKey {this, "WriteKey", "ITkPixelCablingData", "Key of output (derived) conditions data"}
const PixelIDm_idHelper {nullptr}
const InDetDD::PixelDetectorManagerm_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 43 of file ITkPixelCablingAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ITkPixelCablingAlg()

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

Definition at line 46 of file ITkPixelCablingAlg.cxx.

46 :
47 AthCondAlgorithm(name, pSvcLocator)
48{
49}

◆ ~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 73 of file ITkPixelCablingAlg.cxx.

73 {
74 // Write Cond Handle
75 SG::WriteCondHandle<ITkPixelCablingData> writeHandle = SG::makeHandle(m_writeKey, ctx);
76 if (writeHandle.isValid()) {
77 ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid."
78 << ". In theory this should not be called, but may happen"
79 << " if multiple concurrent events are being processed out of order.");
80 return StatusCode::SUCCESS;
81 }
82
83 // Construct the output Cond Object and fill it in
84 std::unique_ptr<ITkPixelCablingData> pCabling = std::make_unique<ITkPixelCablingData>();
85
86 //For development purposes, generate a dummy cabling structure, using the existing
87 //offline IDs and dummy online ones. It's problematic to deal with quads easily, as
88 //they have one offline ID, but up to 4 online IDs. If there will be virtual elinks
89 //for merged quads or if there's no data merging, the situation is not mappable for
90 //the encoding offline -> online map. Once could at most map to certain bits that
91 //would be shared between the 4 online IDs. In the decoding direction, the
92 //online->offline will be always mappable, although it would be degenerate mapping.
94 ATH_MSG_DEBUG("Using test cabling generated with ITkPixelCablingAlg::generateTestCabling(...)");
96 pCabling->print();
97 if (writeHandle.record(EventIDRange(IOVInfiniteRange::infiniteRunLB()), std::move(pCabling)).isFailure()) {
98 return StatusCode::FAILURE;
99 }
100
101 return StatusCode::SUCCESS;
102 }
103
104
105
106 auto inputFile = std::ifstream(m_source.value());
107 if (not inputFile.good()){
108 ATH_MSG_ERROR("The itk cabling file "<<m_source.value()<<" could not be opened.");
109 return StatusCode::FAILURE;
110 }
111
112
113 ATH_CHECK(fillFromFile(inputFile, pCabling));
114 const int numEntries = pCabling->size();
115 ATH_MSG_DEBUG(numEntries << " entries were made to the identifier map.");
116
117 // Define validity of the output cond object and record it
118 const EventIDBase start{EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, 0, 0, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM};
119 const EventIDBase stop{EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM};
120 const EventIDRange rangeW{start, stop};
121 if (writeHandle.record(rangeW, std::move(pCabling)).isFailure()) {
122 ATH_MSG_FATAL("Could not record ITkPixelCablingData " << writeHandle.key()
123 << " with EventRange " << rangeW
124 << " into Conditions Store");
125 return StatusCode::FAILURE;
126 }
127 ATH_MSG_VERBOSE("recorded new conditions data object " << writeHandle.key() << " with range " << rangeW << " into Conditions Store");
128 return (numEntries==0) ? (StatusCode::FAILURE) : (StatusCode::SUCCESS);
129}
#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
StringProperty m_source
StatusCode generateTestCabling(std::unique_ptr< ITkPixelCablingData > &cabling) const
StatusCode fillFromFile(std::ifstream &file, 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.

◆ fillFromFile()

StatusCode ITkPixelCablingAlg::fillFromFile ( std::ifstream & file,
std::unique_ptr< ITkPixelCablingData > & cabling ) const
private

Definition at line 221 of file ITkPixelCablingAlg.cxx.

221 {
222
223 nlohmann::json config;
224 file >> config;
225
226 std::unordered_set<uint32_t> seen;
227
228 for (const auto& [side, groups] : config.items()) {
229
230 for (const auto& group : groups) {
231
232 for (const auto& entry : group) {
233
234 const uint32_t detectorResourceID = std::stoul(entry.at("DetectorResourceID").get<std::string>(), nullptr, 16);
235
236 const uint32_t trueDetectorResourceID = std::stoul(entry.at("TrueDetectorResourceID").get<std::string>(), nullptr, 16);
237
238 const uint32_t sourceID = std::stoul(entry.at("SourceID").get<std::string>(), nullptr, 16);
239
240 cabling->addEntryOffOn(detectorResourceID & ITkPixelCabling::OFFLINE_DRID_MASK, ITkPixelOnlineId(sourceID, detectorResourceID));
241
242 if (seen.insert(sourceID).second) cabling->addSourceID(sourceID);
243
244 uint64_t moduleID = (static_cast<uint64_t>(ITkPixelCabling::dridToModuleID(trueDetectorResourceID)) << 32);
245
246 Identifier id(static_cast<Identifier::value_type>(moduleID));
247 if (m_idHelper->barrel_ec(id) == 0 && m_idHelper->layer_disk(id) == 0) cabling->addTransformType(ITkPixelCabling::dridToModuleID(trueDetectorResourceID), ITkPixelCabling::TransformType::NominalIBTriplet);
248 else if (m_idHelper->barrel_ec(id) != 0 && m_idHelper->layer_disk(id) == 0) cabling->addTransformType(ITkPixelCabling::dridToModuleID(trueDetectorResourceID), ITkPixelCabling::TransformType::NominalIECTriplet);
249 else cabling->addTransformType(ITkPixelCabling::dridToModuleID(trueDetectorResourceID), ITkPixelCabling::TransformType::NominalQuad);
250
251 ATH_MSG_DEBUG(std::hex << " key " << (detectorResourceID & ITkPixelCabling::OFFLINE_DRID_MASK) << " detectorResourceID " << detectorResourceID << " trueDetectorResourceID " << trueDetectorResourceID << " sourceID " << sourceID);
252 }
253 }
254 }
255
256 return StatusCode::SUCCESS;
257}
const PixelID * m_idHelper
uint32_t dridToModuleID(const uint32_t &drid)
static constexpr uint32_t OFFLINE_DRID_MASK
setEventNumber uint32_t
TFile * file

◆ 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 131 of file ITkPixelCablingAlg.cxx.

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

53 {
54 m_source = PathResolver::find_file(m_source.value(), "DATAPATH");
55 if (m_source.empty()) {
56 ATH_MSG_FATAL("The ITkPixel data file for cabling, " << m_source.value() << ", was not found.");
57 return StatusCode::FAILURE;
58 }
59 ATH_MSG_INFO("Reading cabling from " << m_source.value());
60 // ITkPixelID
61 ATH_CHECK(detStore()->retrieve(m_idHelper, "PixelID"));
62 // det manager
63 if (m_useTestCabling) ATH_CHECK(detStore()->retrieve(m_detManager, "ITkPixel"));
64 // Write Cond Handle
65 ATH_CHECK(m_writeKey.initialize());
66
67 return StatusCode::SUCCESS;
68}
#define ATH_MSG_INFO(x,...)
const ServiceHandle< StoreGateSvc > & detStore() const
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)

◆ 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 50 of file ITkPixelCablingAlg.h.

50{ 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 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
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 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

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

Set filter decision:

Reimplemented in AthFilterAlgorithm.

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, AthFilterAlgorithm, 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 308 of file AthCommonDataStore.h.

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

Member Data Documentation

◆ m_detManager

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

Definition at line 62 of file ITkPixelCablingAlg.h.

62{};

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl 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 61 of file ITkPixelCablingAlg.h.

61{nullptr};

◆ m_source

StringProperty ITkPixelCablingAlg::m_source {this, "DataSource", "ITkPixelTestCabling.json", "a json file for the ITkPixel cabling"}
private

Definition at line 58 of file ITkPixelCablingAlg.h.

58{this, "DataSource", "ITkPixelTestCabling.json", "a json file for the ITkPixel cabling"};

◆ 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 59 of file ITkPixelCablingAlg.h.

59{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 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_writeKey

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

Definition at line 60 of file ITkPixelCablingAlg.h.

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

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