ATLAS Offline Software
Loading...
Searching...
No Matches
xAODMaker::AuxStoreWrapper Class Reference

Algorithm preparing auxiliary store objects for slimming. More...

#include <AuxStoreWrapper.h>

Inheritance diagram for xAODMaker::AuxStoreWrapper:
Collaboration diagram for xAODMaker::AuxStoreWrapper:

Public Member Functions

 AuxStoreWrapper (const std::string &name, ISvcLocator *svcLoc)
 Regular Algorithm constructor.
virtual StatusCode initialize ()
 Function initialising the algorithm.
virtual StatusCode execute (const EventContext &ctx)
 Function executing the algorithm.
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

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
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 changeContainer (const SG::IAuxStore *store, const std::string &name)
 Create a new container store.
StatusCode changeElement (const SG::IAuxStore *store, const std::string &name)
 Create a new element store.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

std::vector< std::string > m_keys
 StoreGate keys of the store objects to be wrapped.
std::set< std::string > m_keysSet
 Keys of the objects to be wrapped, in a set container.
bool m_cachesSet
 Flag specifying whether the internal caches were set already.
std::set< std::string > m_toConvert
 Keys of the auxiliary stores that need to be converted in the end.
std::map< std::string, CLID > m_clids
 Keys and CLIDs of the interface containers touched.
ServiceHandle< ::IClassIDSvc > m_clidSvc
 Handle to the Class ID service.
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

Algorithm preparing auxiliary store objects for slimming.

   This algorithm can be used to update some or all of the auxiliary
   store objects in StoreGate to save all of their auxiliary
   variables as separate branches in the output TTree.
Author
Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h

Definition at line 41 of file AuxStoreWrapper.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

◆ AuxStoreWrapper()

xAODMaker::AuxStoreWrapper::AuxStoreWrapper ( const std::string & name,
ISvcLocator * svcLoc )

Regular Algorithm constructor.

Definition at line 49 of file AuxStoreWrapper.cxx.

51 : AthAlgorithm( name, svcLoc ), m_cachesSet( false ),
52 m_clidSvc( "ClassIDSvc", name ) {
53
54 declareProperty( "SGKeys", m_keys,
55 "StoreGate keys of the store objects to be wrapped" );
56 declareProperty( "ClassIDSvc", m_clidSvc, "Service providing CLID info" );
57 }
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
bool m_cachesSet
Flag specifying whether the internal caches were set already.
std::vector< std::string > m_keys
StoreGate keys of the store objects to be wrapped.
ServiceHandle< ::IClassIDSvc > m_clidSvc
Handle to the Class ID service.

Member Function Documentation

◆ changeContainer()

StatusCode xAODMaker::AuxStoreWrapper::changeContainer ( const SG::IAuxStore * store,
const std::string & name )
private

Create a new container store.

Definition at line 187 of file AuxStoreWrapper.cxx.

188 {
189
190 // Make StoreGate forget about this object:
191 auto aux_clid_itr = m_clids.find( name );
192 if( aux_clid_itr == m_clids.end() ) {
193 ATH_MSG_FATAL( "Didn't find a CLID for key: " << name );
194 ATH_MSG_FATAL( "This is an internal logic error" );
195 return StatusCode::FAILURE;
196 }
197 evtStore()->releaseObject( aux_clid_itr->second, name );
198 ATH_MSG_VERBOSE( "Released object with CLID " << aux_clid_itr->second
199 << " and name \"" << name << "\"" );
200
201 // Get the pointer for the proxy of the auxiliary store:
202 SG::DataProxy* storeProxy =
204 if( ! storeProxy ) {
205 ATH_MSG_FATAL( "Couldn't get proxy for the "
206 "SG::IAuxStore base class of: " << name );
207 return StatusCode::FAILURE;
208 }
209 // Now make StoreGate forget about this proxy completely:
210 CHECK( evtStore()->removeProxy( storeProxy, nullptr, true ) );
211
212 // Create the new object as a wrapper around the original:
213 auto holder_p = std::make_unique<xAOD::AuxContainerBase>();
214 holder_p->setStore( const_cast< SG::IAuxStore* >( store ) );
215
216 // Record the new container with the same key:
217 CHECK( evtStore()->overwrite( std::move(holder_p), name, false, true ) );
218
219 ATH_MSG_DEBUG( "Overwrote store object with key \""
220 << name << "\" with an xAOD::AuxContainerBase "
221 << "object" );
222
223 // Fetch it back from the store.
224 const xAOD::AuxContainerBase* holder = nullptr;
225 CHECK( evtStore()->retrieve( holder, name ) );
226
227 // The key of the interface container:
228 const std::string intName = name.substr( 0, name.size() - 4 );
229
230 // The CLID for the interface container:
231 CLID intId = 0;
232 auto clid_itr = m_clids.find( intName );
233 if( clid_itr == m_clids.end() ) {
234 ATH_MSG_WARNING( "Didn't cache a CLID for key: " << intName );
235 ATH_MSG_WARNING( "Interface container can't be updated, the job will "
236 "likely crash" );
237 return StatusCode::SUCCESS;
238 }
239 intId = clid_itr->second;
240
241 // Try to access the proxy for the interface container:
242 SG::DataProxy* proxy = evtStore()->proxy( intId, intName );
243 if( ! proxy ) {
244 // If there is none, return at this point:
245 ATH_MSG_VERBOSE( "Interface container with key \"" << intName
246 << "\" not available" );
247 return StatusCode::SUCCESS;
248 }
249
250 // Get the raw pointer to the object:
251 void* ptr = SG::DataProxy_cast( proxy, intId );
252 if( ! ptr ) {
253 REPORT_ERROR( StatusCode::FAILURE )
254 << "Couldn't retrieve raw pointer to interface container";
255 return StatusCode::FAILURE;
256 }
257
258 // Since all the "wrapped" objects should be xAOD objects, for which
259 // the interface containers all implement a straight inheritance tree
260 // back to SG::AuxVectorBase, the following ugly operation should be
261 // safe:
262 SG::AuxVectorBase* interface =
263 reinterpret_cast< SG::AuxVectorBase* >( ptr );
264
265 // And now connect the interface to the store depending on the const-ness
266 // of the interface:
267 if( proxy->isConst() ) {
268 interface->setConstStore( holder );
269 } else {
270 interface->setStore( holder );
271 }
272
273 ATH_MSG_DEBUG( "Interface container with key \"" << intName
274 << "\" updated" );
275
276 // Return gracefully:
277 return StatusCode::SUCCESS;
278 }
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_VERBOSE(x,...)
#define ATH_MSG_FATAL(x,...)
#define REPORT_ERROR(SC)
Report an error.
#define CHECK(...)
Evaluate an expression and check for errors.
uint32_t CLID
The Class ID type.
if(pathvar)
ServiceHandle< StoreGateSvc > & evtStore()
std::map< std::string, CLID > m_clids
Keys and CLIDs of the interface containers touched.
bool isConst() const
Get the const flag for this expression.
DATA * DataProxy_cast(DataProxy *proxy)
cast the proxy into the concrete data object it proxies
void * ptr(T *p)
Definition SGImplSvc.cxx:75

◆ changeElement()

StatusCode xAODMaker::AuxStoreWrapper::changeElement ( const SG::IAuxStore * store,
const std::string & name )
private

Create a new element store.

Definition at line 280 of file AuxStoreWrapper.cxx.

281 {
282
283 // Make StoreGate forget about this object:
284 auto aux_clid_itr = m_clids.find( name );
285 if( aux_clid_itr == m_clids.end() ) {
286 ATH_MSG_FATAL( "Didn't find a CLID for key: " << name );
287 ATH_MSG_FATAL( "This is an internal logic error" );
288 return StatusCode::FAILURE;
289 }
290 evtStore()->releaseObject( aux_clid_itr->second, name );
291 ATH_MSG_VERBOSE( "Released object with CLID " << aux_clid_itr->second
292 << " and name \"" << name << "\"" );
293
294 // Create the new as a wrapper around the original:
295 auto holder_p = std::make_unique<xAOD::AuxInfoBase>();
296 holder_p->setStore( const_cast< SG::IAuxStore* >( store ) );
297
298 // Record the new container with a different key:
299 CHECK( evtStore()->overwrite( std::move(holder_p), name, false, true ) );
300
301 ATH_MSG_DEBUG( "Wrapped store object with key \""
302 << name << "\" into xAOD::AuxInfoBase "
303 << "object" );
304
305 // Fetch it back from the store.
306 const xAOD::AuxContainerBase* holder = nullptr;
307 CHECK( evtStore()->retrieve( holder, name ) );
308
309 // The key of the interface object:
310 const std::string intName = name.substr( 0, name.size() - 4 );
311
312 // The CLID for the interface object:
313 CLID intId = 0;
314 auto clid_itr = m_clids.find( intName );
315 if( clid_itr == m_clids.end() ) {
316 ATH_MSG_WARNING( "Didn't cache a CLID for key: " << intName );
317 ATH_MSG_WARNING( "Interface object can't be updated, the job will "
318 "likely crash" );
319 return StatusCode::SUCCESS;
320 }
321 intId = clid_itr->second;
322
323 // Try to access the proxy for the interface object:
324 SG::DataProxy* proxy = evtStore()->proxy( intId, intName );
325 if( ! proxy ) {
326 // If there is none, return at this point:
327 ATH_MSG_VERBOSE( "Interface object with key \"" << intName
328 << "\" not available" );
329 return StatusCode::SUCCESS;
330 }
331
332 // Get the raw pointer to the object:
333 void* ptr = SG::DataProxy_cast( proxy, intId );
334 if( ! ptr ) {
335 REPORT_ERROR( StatusCode::FAILURE )
336 << "Couldn't retrieve raw pointer to interface object";
337 return StatusCode::FAILURE;
338 }
339
340 // Since all the "wrapped" objects should be xAOD objects, for which
341 // the interface objects all implement a straight inheritance tree
342 // back to SG::AuxElement, the following ugly operation should be
343 // safe:
344 SG::AuxElement* interface =
345 reinterpret_cast< SG::AuxElement* >( ptr );
346
347 // And now connect the interface to the store depending on the const-ness
348 // of the interface:
349 if( proxy->isConst() ) {
350 interface->setConstStore( holder );
351 } else {
352 interface->setStore( holder );
353 }
354
355 ATH_MSG_DEBUG( "Interface object with key \"" << intName
356 << "\" updated" );
357
358 // Return gracefully:
359 return StatusCode::SUCCESS;
360 }
AuxElement(SG::AuxVectorData *container, size_t index)
Base class for elements of a container that can have aux data.

◆ 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 xAODMaker::AuxStoreWrapper::execute ( const EventContext & ctx)
virtual

Function executing the algorithm.

Implements AthAlgorithm.

Definition at line 80 of file AuxStoreWrapper.cxx.

80 {
81
82 // The StoreGate content before the object wrapping:
83 ATH_MSG_VERBOSE( "Event store before wrapping:\n" << evtStore()->dump() );
84
85 // If we don't have a list of keys to be converted yet, get one now:
86 if( ! m_cachesSet ) {
87
88 // Ask StoreGate for all the objects that it's holding on to:
89 const std::vector< const SG::DataProxy* > proxies =
90 evtStore()->proxies();
91
92 // Loop over them:
93 for( const SG::DataProxy* proxy : proxies ) {
94
95 ATH_MSG_VERBOSE( "Evaluating object with name \"" << proxy->name()
96 << "\" and CLID " << proxy->clID() );
97
98 // Check if we need to worry about this object:
99 if( !m_keysSet.empty() ) {
100 if( m_keysSet.find( proxy->name() ) == m_keysSet.end() ) {
101 // This SG key was not mentioned in the jobOptions...
102 ATH_MSG_VERBOSE( "Conversion for this key was not "
103 "requested" );
104 // But if this is a proxy for an interface container for which
105 // we wrap the auxiliary container, then let's remember it.
106 if( m_keysSet.find( proxy->name() + "Aux." ) !=
107 m_keysSet.end() ) {
108 std::string typeName;
109 ATH_CHECK( m_clidSvc->getTypeNameOfID( proxy->clID(),
110 typeName ) );
111 if( typeName.compare( 0, 6, "xAOD::" ) == 0) {
112 m_clids[ proxy->name() ] = proxy->clID();
113 }
114 }
115 continue;
116 }
117 }
118 ATH_MSG_VERBOSE( "The wrapping of this object was requested" );
119
120 // Remember the CLID of this type, if it's an xAOD type:
121 std::string typeName;
122 ATH_CHECK( m_clidSvc->getTypeNameOfID( proxy->clID(),
123 typeName ) );
124 if( ( typeName.compare( 0, 6 , "xAOD::") == 0) &&
125 ( typeName != "xAOD::ByteStreamAuxContainer_v1" ) ) {
126 m_clids[ proxy->name() ] = proxy->clID();
127 }
128
129 // Check if the key of the object looks like it is an auxiliary
130 // store. (To try to avoid unnecessary warnings.)
131 if( proxy->name().find( "Aux." ) !=
132 ( proxy->name().size() - 4 ) ) {
133 ATH_MSG_VERBOSE( "Key doesn't look like that of an auxiliary "
134 << "store" );
135 continue;
136 }
137 ATH_MSG_VERBOSE( "StoreGate key looks like that of an auxiliary "
138 << "store..." );
139
140 // This object/container will be converted:
141 m_toConvert.insert( proxy->name() );
142 }
143
144 // The caches are now set:
145 m_cachesSet = true;
146 }
147
148 // Now do the wrapping on the selected objects/containers:
149 for( const std::string& name : m_toConvert ) {
150
151 // Tell the user what's happening:
152 ATH_MSG_VERBOSE( "Now wrapping object: " << name );
153
154 // Access the object with an SG::IAuxStore pointer:
155 const SG::IAuxStore* original = nullptr;
156 if( ! evtStore()->retrieve( original, name ).isSuccess() ) {
157 ATH_MSG_WARNING( "Couldn't retrieve object \"" << name << "\" "
158 << "with interface SG::IAuxStore" );
159 continue;
160 }
161
162 // Check if the object implements the IAuxStoreHolder interface
163 // as well.
164 const SG::IAuxStoreHolder* holder =
165 dynamic_cast< const SG::IAuxStoreHolder* >( original );
166 if( ! holder ) {
167 // If not, let's just assume that it describes a container.
168 CHECK( changeContainer( original, name ) );
169 continue;
170 }
171
172 // Decide how to replace it exactly:
174 CHECK( changeElement( original, name ) );
175 } else {
176 CHECK( changeContainer( original, name ) );
177 }
178 }
179
180 // The StoreGate content before the object wrapping:
181 ATH_MSG_VERBOSE( "Event store after wrapping:\n" << evtStore()->dump() );
182
183 // Return gracefully:
184 return StatusCode::SUCCESS;
185 }
#define ATH_CHECK
Evaluate an expression and check for errors.
void dump() const
Debugging dump.
@ AST_ObjectStore
The store describes a single object.
virtual AuxStoreType getStoreType() const =0
Return the type of the store object.
StatusCode changeContainer(const SG::IAuxStore *store, const std::string &name)
Create a new container store.
std::set< std::string > m_keysSet
Keys of the objects to be wrapped, in a set container.
std::set< std::string > m_toConvert
Keys of the auxiliary stores that need to be converted in the end.
StatusCode changeElement(const SG::IAuxStore *store, const std::string &name)
Create a new element store.

◆ 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 xAODMaker::AuxStoreWrapper::initialize ( )
virtual

Function initialising the algorithm.

Definition at line 59 of file AuxStoreWrapper.cxx.

59 {
60
61 ATH_MSG_INFO( "Initialising" );
62 ATH_MSG_DEBUG( " StoreGate keys: " << m_keys );
63
64 // Retrieve the needed component(s):
65 ATH_CHECK( m_clidSvc.retrieve() );
66
67 // Pack the SG keys into a structure that's more efficient during
68 // event processing:
69 m_keysSet.insert( m_keys.begin(), m_keys.end() );
70
71 // Reset the caches:
72 m_cachesSet = false;
73 m_toConvert.clear();
74 m_clids.clear();
75
76 // Return gracefully:
77 return StatusCode::SUCCESS;
78 }
#define ATH_MSG_INFO(x,...)

◆ 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 AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ 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:

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_ERROR(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_cachesSet

bool xAODMaker::AuxStoreWrapper::m_cachesSet
private

Flag specifying whether the internal caches were set already.

Definition at line 66 of file AuxStoreWrapper.h.

◆ m_clids

std::map< std::string, CLID > xAODMaker::AuxStoreWrapper::m_clids
private

Keys and CLIDs of the interface containers touched.

Definition at line 70 of file AuxStoreWrapper.h.

◆ m_clidSvc

ServiceHandle< ::IClassIDSvc > xAODMaker::AuxStoreWrapper::m_clidSvc
private

Handle to the Class ID service.

Definition at line 73 of file AuxStoreWrapper.h.

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

std::vector< std::string > xAODMaker::AuxStoreWrapper::m_keys
private

StoreGate keys of the store objects to be wrapped.

Definition at line 61 of file AuxStoreWrapper.h.

◆ m_keysSet

std::set< std::string > xAODMaker::AuxStoreWrapper::m_keysSet
private

Keys of the objects to be wrapped, in a set container.

Definition at line 63 of file AuxStoreWrapper.h.

◆ m_toConvert

std::set< std::string > xAODMaker::AuxStoreWrapper::m_toConvert
private

Keys of the auxiliary stores that need to be converted in the end.

Definition at line 68 of file AuxStoreWrapper.h.

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