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

#include <SiRegSelCondAlg.h>

Inheritance diagram for SiRegSelCondAlg:
Collaboration diagram for SiRegSelCondAlg:

Public Member Functions

 SiRegSelCondAlg (const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) const override
virtual bool isReEntrant () const override
 Avoid scheduling algorithm multiple times.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
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

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

std::string m_managerName
bool m_printTable {false}
bool m_useCabling {true}
SG::ReadCondHandleKey< SCT_CablingDatam_sctCablingKey {this, "SCT_CablingData", "", "SCT cabling key"}
 Sadly the PIxel and SCT cabling are different classes so need both, even if only one is to be used.
SG::ReadCondHandleKey< PixelCablingCondDatam_pixCablingKey {this, "PixelCablingCondData", "", "Pixel cabling key"}
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollectionm_detEleCollKey {this, "DetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel/SCT"}
SG::WriteCondHandleKey< IRegSelLUTCondDatam_tableKey { this, "RegSelLUT", "RegSelLUTCondData", "Region Selector lookup table" }
 Output conditions object.
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

Definition at line 32 of file SiRegSelCondAlg.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

◆ SiRegSelCondAlg()

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

Definition at line 32 of file SiRegSelCondAlg.cxx.

32 :
33 AthCondAlgorithm( name, pSvcLocator ),
34 m_managerName(""),
35 m_printTable(false)
36{
37 ATH_MSG_DEBUG( "SiRegSelCondAlg::SiRegSelCondAlg() " << name );
38 declareProperty( "PrintTable", m_printTable=false );
39 declareProperty( "ManagerName", m_managerName );
40}
#define ATH_MSG_DEBUG(x)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::string m_managerName

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 }

◆ 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 SiRegSelCondAlg::execute ( const EventContext & ctx) const
overridevirtual

do stuff here ...

inpractice, this should never be called, although i serial athena, because the implementation of the conditions behaviour is flawed in the framework, this routine will be called every event (!) regardless of whether it should be called or not so we need this check to prevent unecessary code execution on out our side

Need to get the SCT cabling conditions for the EventIDRange, but still need to use the SCT_CablingTool to get the rob ids

Definition at line 60 of file SiRegSelCondAlg.cxx.

61{
62 ATH_MSG_DEBUG("SiRegSelCondAlg::execute() -- enter -- ");
63
65 ATH_MSG_DEBUG( "Creating region selector table " << m_tableKey );
66
67 SG::WriteCondHandle<IRegSelLUTCondData> lutCondData( m_tableKey, ctx );
68 // Do we have a valid Write Cond Handle for current time?
69 if (lutCondData.isValid()) {
75 ATH_MSG_DEBUG("CondHandle " << lutCondData.fullKey() << " is already valid." );
76 return StatusCode::SUCCESS;
77 }
78
81
82 std::unique_ptr<SG::ReadCondHandle<PixelCablingCondData> > pixCabling;
83 std::unique_ptr<SG::ReadCondHandle<SCT_CablingData> > sctCabling;
84
85 EventIDRange id_range;
86
87 ATH_MSG_DEBUG( "RegSelCondAlg:" << name() );
88
89 if(m_useCabling){
90
91 if (m_managerName=="SCT") { // SCT
92 sctCabling = std::make_unique<SG::ReadCondHandle<SCT_CablingData> >( m_sctCablingKey, ctx );
93 if( !sctCabling->range( id_range ) ) {
94 ATH_MSG_ERROR("Failed to retrieve validity range for " << sctCabling->key());
95 return StatusCode::FAILURE;
96 }
97 }
98 else if(m_managerName=="Pixel"){ // PIXEL
99
100 ATH_MSG_DEBUG( "RegSelCondAlg: " << name() << "\t" << m_pixCablingKey );
101 ATH_MSG_DEBUG( "RegSelCondAlg: " << ctx );
102 ATH_MSG_DEBUG( "RegSelCondAlg: " << id_range << "( initial range )" );
103
104 pixCabling = std::make_unique<SG::ReadCondHandle<PixelCablingCondData> >( m_pixCablingKey, ctx );
105 if( !pixCabling->range( id_range ) ) {
106 ATH_MSG_ERROR("Failed to retrieve validity range for " << pixCabling->key() << " : " << id_range );
107 return StatusCode::FAILURE;
108 }
109 ATH_MSG_DEBUG( "RegSelCondAlg: " << id_range << "( final range )" );
110 }
111
112 }
113
114 ATH_MSG_DEBUG( "RegSelCondAlg:" << name() << " done" );
115
116
117 std::unique_ptr<RegSelSiLUT> rd;
118
119 const bool isPixelLikeManager = (m_managerName == "Pixel" || m_managerName == "PLR");
120 if (isPixelLikeManager) {
121 rd = std::make_unique<RegSelSiLUT>(RegSelSiLUT::PIXEL);
122 } else {
123 rd = std::make_unique<RegSelSiLUT>(RegSelSiLUT::SCT);
124 }
125
126 // Get detector elements (=alignment) in condition store
127 const InDetDD::SiDetectorElementCollection* elements = nullptr;
128 SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> detEle(m_detEleCollKey, ctx);
129 if (detEle.isValid()) {
130 elements = detEle.retrieve();
131 }
132 if (elements==nullptr) {
133 ATH_MSG_ERROR("Failed to retrieve InDetDD::SiDetectorElementCollection for " << m_managerName);
134 return StatusCode::FAILURE;
135 }
136 // Since this condition algorithm for HLT, we want to run this only at the first event of a run.
137 // We do not take the intersect of ranges of cabling and detector elements.
138 // We use the range of cabling.
139
140 if(!m_useCabling){
141 if( !detEle.range( id_range ) ) {
142 ATH_MSG_ERROR("Failed to retrieve validity range for " << detEle.key() << " : " << id_range );
143 return StatusCode::FAILURE;
144 }
145 ATH_MSG_DEBUG( "RegSelCondAlg: " << id_range << "( final range )" );
146 }
147
148 for (const InDetDD::SiDetectorElement* element : *elements) {
149
150 if (element) {
151
152 IdentifierHash hashId = element->identifyHash();
153
154 ATH_MSG_VERBOSE( "Found element with HashId = " << hashId );
155
156 // new region selector detector element extent
157
158 double rMin, rMax, zMin, zMax, phiMin, phiMax;
159
160 rMin = element->rMin();
161 rMax = element->rMax();
162 zMin = element->zMin();
163 zMax = element->zMax();
164 phiMin = element->phiMin();
165 phiMax = element->phiMax();
166
167
168 int barrelEC = 0;
169 int layerDisk = 0;
170 uint32_t robId = 0;
171
172 // PLR uses its own detector type flag, but its offline helper inherits
173 // from PixelID and should follow the pixel-like RegionSelector path.
174 if (element->isPixel() || element->isPLR() || m_managerName == "PLR") {
175
176 const PixelID* pixelId = dynamic_cast<const PixelID*>(element->getIdHelper());
177 if ( pixelId!=nullptr ) {
178 barrelEC = pixelId->barrel_ec(element->identify());
179 // DBM is pixel-only. PLR is pixel-like for RegionSelector purposes,
180 // but it must not be filtered out by the DBM-specific barrel_ec cut.
181 if ( m_managerName != "PLR" && std::fabs(barrelEC)>3 ) continue;
182 layerDisk = pixelId->layer_disk(element->identify());
183 if(m_useCabling && pixCabling) robId=(*pixCabling)->find_entry_offrob(element->identify());
184 else robId = 0;
185 }
186 else {
187 ATH_MSG_ERROR("Could not get PIXEL_ID for " << element->getIdHelper() );
188 }
189
190 } else { // it's an SCT element
191
192 const SCT_ID* sctId = dynamic_cast<const SCT_ID*>(element->getIdHelper());
193 if ( sctId!=nullptr ) {
194 barrelEC = sctId->barrel_ec(element->identify());
195 layerDisk = sctId->layer_disk(element->identify());
196 // Avoid use of SCT_CablingTool. Instead of
197 // robId=m_sctCablingTool->getRobIdFromOfflineId(element->identify());
198 if(m_useCabling && sctCabling) robId = ((*sctCabling)->getOnlineIdFromHash(element->identifyHash())).rod();
199 else robId = 0;
200 }
201 else {
202 ATH_MSG_ERROR("Could not get SCT_ID for " << element->getIdHelper() );
203 }
204
205 }
206
207
208 // create module for lookup table
209
210 RegSelModule smod( zMin, zMax, rMin, rMax, phiMin, phiMax, layerDisk, barrelEC, robId, hashId );
211
212 rd->addModule( smod );
213
214 ATH_MSG_DEBUG( smod );
215
216 ATH_MSG_VERBOSE( "\t robId = " << robId
217 << " barrelEC = " << barrelEC
218 << ", layerDisk = " << layerDisk
219 << ", phiMin, phiMax = " << phiMin/CLHEP::degree << " " << phiMax/CLHEP::degree
220 << ", rMin = " << rMin/CLHEP::mm << " mm, rMax = " << rMax/CLHEP::mm << " mm" );
221
222 }
223 }
224
225
226 ATH_MSG_DEBUG( " initialising new map " );
227
228 rd->initialise();
229
230 // write out new new LUT to a file if need be
231 if ( m_printTable ) rd->write( name()+".map" );
232
233 IRegSelLUTCondData* rcd = new IRegSelLUTCondData( std::move(rd) );
234
235 try {
236 if( lutCondData.record( id_range, rcd ).isFailure() ) {
237 ATH_MSG_ERROR( "Could not record " << m_tableKey
238 << " " << lutCondData.key()
239 << " with range " << id_range );
240 return StatusCode::FAILURE;
241 }
242 ATH_MSG_INFO( "RegSelCondAlg LUT recorded: " << m_tableKey);
243 }
244 catch (...) {
245 ATH_MSG_ERROR("SiRegSelCondAlg::execute() failed to record table: " << m_tableKey);
246 return StatusCode::FAILURE;
247 }
248
249
250 ATH_MSG_DEBUG("SiRegSelCondAlg::execute() -- exit -- ");
251
252 return StatusCode::SUCCESS;
253}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
RegSelCondData< IRegSelLUT > IRegSelLUTCondData
int layer_disk(const Identifier &id) const
Definition PixelID.h:602
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0).
Definition PixelID.h:595
int layer_disk(const Identifier &id) const
Definition SCT_ID.h:687
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0).
Definition SCT_ID.h:681
SG::ReadCondHandleKey< SCT_CablingData > m_sctCablingKey
Sadly the PIxel and SCT cabling are different classes so need both, even if only one is to be used.
SG::ReadCondHandleKey< PixelCablingCondData > m_pixCablingKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_detEleCollKey
SG::WriteCondHandleKey< IRegSelLUTCondData > m_tableKey
Output conditions object.
setEventNumber uint32_t

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

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

◆ initialize()

StatusCode SiRegSelCondAlg::initialize ( )
overridevirtual

Definition at line 45 of file SiRegSelCondAlg.cxx.

46{
47 ATH_MSG_DEBUG("SiRegSelCondAlg::initialize() ");
48 ATH_CHECK(m_pixCablingKey.initialize(!m_pixCablingKey.empty()));
49 ATH_CHECK(m_sctCablingKey.initialize(!m_sctCablingKey.empty()));
50 m_useCabling = !m_pixCablingKey.empty() || !m_sctCablingKey.empty();
51 ATH_CHECK(m_detEleCollKey.initialize());
52 ATH_CHECK(m_tableKey.initialize());
53 ATH_MSG_INFO("SiRegSelCondAlg::initialize() " << m_tableKey );
54 return StatusCode::SUCCESS;
55}
#define ATH_CHECK
Evaluate an expression and check for errors.

◆ 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 AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

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

SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> SiRegSelCondAlg::m_detEleCollKey {this, "DetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel/SCT"}
private

Definition at line 56 of file SiRegSelCondAlg.h.

57{this, "DetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel/SCT"};

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

std::string SiRegSelCondAlg::m_managerName
private

Definition at line 43 of file SiRegSelCondAlg.h.

◆ m_pixCablingKey

SG::ReadCondHandleKey<PixelCablingCondData> SiRegSelCondAlg::m_pixCablingKey {this, "PixelCablingCondData", "", "Pixel cabling key"}
private

Definition at line 53 of file SiRegSelCondAlg.h.

54{this, "PixelCablingCondData", "", "Pixel cabling key"};

◆ m_printTable

bool SiRegSelCondAlg::m_printTable {false}
private

Definition at line 44 of file SiRegSelCondAlg.h.

44{false};

◆ m_sctCablingKey

SG::ReadCondHandleKey<SCT_CablingData> SiRegSelCondAlg::m_sctCablingKey {this, "SCT_CablingData", "", "SCT cabling key"}
private

Sadly the PIxel and SCT cabling are different classes so need both, even if only one is to be used.

Definition at line 50 of file SiRegSelCondAlg.h.

51{this, "SCT_CablingData", "", "SCT cabling key"};

◆ m_tableKey

SG::WriteCondHandleKey<IRegSelLUTCondData> SiRegSelCondAlg::m_tableKey { this, "RegSelLUT", "RegSelLUTCondData", "Region Selector lookup table" }
private

Output conditions object.

Definition at line 60 of file SiRegSelCondAlg.h.

61{ this, "RegSelLUT", "RegSelLUTCondData", "Region Selector lookup table" };

◆ m_useCabling

bool SiRegSelCondAlg::m_useCabling {true}
private

Definition at line 45 of file SiRegSelCondAlg.h.

45{true};

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


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