ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Ringer::xAODRingSetConfWriter Class Reference

Algorithm used to write the RingSets configuration. More...

#include <xAODRingSetConfWriter.h>

Inheritance diagram for Ringer::xAODRingSetConfWriter:
Collaboration diagram for Ringer::xAODRingSetConfWriter:

Public Member Functions

 xAODRingSetConfWriter (const std::string &name, ::ISvcLocator *svcLoc)
 Regular Algorithm constructor. More...
 
StatusCode initialize ()
 Method initialising the algorithm. More...
 
StatusCode execute ()
 Method executing the algorithm. More...
 
StatusCode finalize ()
 Method executing the algorithm. More...
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

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

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 
StatusCode copyInputMetaStore ()
 Private methods: More...
 
template<class auxT , class T >
StatusCode searchAndCopyCLID (const ClassID_traits< T > &classID)
 Auxiliary method called by copyInputMetaStore. More...
 
template<class auxT , class T >
StatusCode copyKeyToStore (const std::string &key)
 Retrieve a key and returns a copy of it to outputmeta. More...
 
StatusCode retrieveCaloRingsBuilders ()
 Retrieve CaloRingsBuilder tools. More...
 
StatusCode allocateContainers ()
 Prepare containers to retrieve configurations. More...
 
StatusCode fillConfigurations ()
 Fill the containers with each CaloRingsBuilder tool configuration. More...
 

Private Attributes

DataObjIDColl m_extendedExtraObjects
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 
ServiceHandle< StoreGateSvcm_metaStore
 Private properties (python configurables):Connection to the (output)metadata store. More...
 
ServiceHandle< StoreGateSvcm_inputMetaStore
 Connection to the inputMetadata store. More...
 
ToolHandleArray< Ringer::ICaloRingsBuilderm_crBuilderTools
 Connection to the trigger configuration service. More...
 
std::vector< std::string > m_rsMetaNames
 StoreGate keys for the RingSet configurations. More...
 
std::vector< xAOD::RingSetConfContainer * > m_rsConfContVec
 Private properties (non python configurables):The CaloRings configuration container. More...
 

Detailed Description

Algorithm used to write the RingSets configuration.

   This algorithm needs to be scheduled in jobs that write xAOD files in
   Athena in order to write the RingSet configuration into the output
   file.

   It assembles the RingSet configuration that is written into
   the metadata TTree of the xAOD file at the end of the job.

This algorithm is based on TrigConfxAOD from Attila Krasznahorkay.

Author
Werner Freund wsfre.nosp@m.und@.nosp@m.cern..nosp@m.ch
Revision
713521
Date
2015-12-09 09:53:41 +0100 (Wed, 09 Dec 2015)

Definition at line 47 of file xAODRingSetConfWriter.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ xAODRingSetConfWriter()

Ringer::xAODRingSetConfWriter::xAODRingSetConfWriter ( const std::string &  name,
::ISvcLocator *  svcLoc 
)

Regular Algorithm constructor.

Definition at line 26 of file xAODRingSetConfWriter.cxx.

27  :
28  ::AthAlgorithm( name, svcLoc ),
29  m_metaStore( "MetaDataStore", name ),
30  m_inputMetaStore( "StoreGateSvc/InputMetaDataStore", name )
31 {
32 
33  declareProperty( "MetaDataStore", m_metaStore,
34  "The metadata Storage ServiceHandle. If empty, it will use "
35  "MetaDataStore service with same name as this algorithm.");
36 
37  declareProperty( "CaloRingsBuilderTools", m_crBuilderTools ,
38  "The CaloRingsBuilder tools handles array.");
39 
40  declareProperty( "RingSetConfContainerNames", m_rsMetaNames,
41  "The metadata RingSet Configuration container keys to write." );
42 
43 }

Member Function Documentation

◆ allocateContainers()

StatusCode Ringer::xAODRingSetConfWriter::allocateContainers ( )
private

Prepare containers to retrieve configurations.

Definition at line 239 of file xAODRingSetConfWriter.cxx.

240 {
241 
242  for (size_t counter = 0; counter < m_rsMetaNames.size(); ++counter)
243  {
244  // Create an empty RingSetConf container:
247  rsCont->setStore( rsAux );
248  m_rsConfContVec.push_back( rsCont );
249 
250  // Record the RingSet configuration metadata into output container:
251  CHECK( m_metaStore->record( rsAux, m_rsMetaNames[counter] + "Aux." ) );
252  CHECK( m_metaStore->record( rsCont, m_rsMetaNames[counter] ) );
253  }
254 
255  return StatusCode::SUCCESS;
256 }

◆ copyInputMetaStore()

StatusCode Ringer::xAODRingSetConfWriter::copyInputMetaStore ( )
private

Private methods:

Retrieve CaloRingsBuilder tools

Definition at line 128 of file xAODRingSetConfWriter.cxx.

129 {
130  ATH_MSG_DEBUG("Checking if it is needed to copy RingSetConf "
131  "MetaData on input file.");
132 
133  CHECK( searchAndCopyCLID< xAOD::RingSetConfAuxContainer >(
135 
136  return StatusCode::SUCCESS;
137 }

◆ copyKeyToStore()

template<class auxT , class T >
StatusCode Ringer::xAODRingSetConfWriter::copyKeyToStore ( const std::string &  key)
private

Retrieve a key and returns a copy of it to outputmeta.

Definition at line 181 of file xAODRingSetConfWriter.cxx.

182 {
183  typedef typename T::value_type value_type;
184  typedef typename T::base_value_type base_value_type;
185  // Retrieve container
186  const T* cont(nullptr);
187  CHECK( m_inputMetaStore->retrieve( cont, key ) );
188 
189  // Create new containers:
190  auxT* contAuxCopy = new auxT;
191  T* contCopy = new T;
192  contCopy->setStore( contAuxCopy );
193 
194  // Copy them:
195  contCopy->reserve( cont->size() );
196  contAuxCopy->reserve( cont->size() );
197  ATH_MSG_DEBUG("Copying object with key: " << key);
198  for ( const base_value_type* obj : *cont ) {
199  ATH_MSG_VERBOSE("Original object:");
200  // Print-out object:
201  if( msgLevel() <= MSG::VERBOSE ) {
202  std::ostringstream str;
203  obj->print( str );
204  ATH_MSG_VERBOSE( str.str() );
205  }
206  // Copy object
207  value_type objCopy = new (base_value_type)( *obj );
208  // Print-out object:
209  ATH_MSG_VERBOSE("Copied object:");
210  if( msgLevel() <= MSG::VERBOSE ) {
211  std::ostringstream str;
212  objCopy->print( str );
213  ATH_MSG_VERBOSE( str.str() );
214  }
215  // Add to container
216  contCopy->push_back( objCopy );
217  }
218 
219  // And record:
220  CHECK( m_metaStore->record( contAuxCopy, key + "Aux.") );
221  CHECK( m_metaStore->record( contCopy, key) );
222 
223  return StatusCode::SUCCESS;
224 }

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

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

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode Ringer::xAODRingSetConfWriter::execute ( )

Method executing the algorithm.

Definition at line 284 of file xAODRingSetConfWriter.cxx.

285 {
286  // Our execute don't do anything... we don't have any assyncronous change of
287  // configuration, so we don't need to keep track of what happens here.
288  // Return gracefully:
289  return StatusCode::SUCCESS;
290 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< 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 & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ fillConfigurations()

StatusCode Ringer::xAODRingSetConfWriter::fillConfigurations ( )
private

Fill the containers with each CaloRingsBuilder tool configuration.

Definition at line 259 of file xAODRingSetConfWriter.cxx.

260 {
261 
262  for (size_t counter = 0; counter < m_rsConfContVec.size(); ++counter)
263  {
264  auto& crBuilder = m_crBuilderTools[counter];
265  auto& rsCont = m_rsConfContVec[counter];
266 
267  // Create the xAOD configuration object (it will populate
268  // RingSetConfContainer for us):
270  crBuilder->rawConf(),
271  rsCont);
272 
273  // Inform what we did:
274  ATH_MSG_DEBUG( "Got configuration for " << crBuilder->name() << "." );
275 
276  }
277 
278  return StatusCode::SUCCESS;
279 
280 }

◆ finalize()

StatusCode Ringer::xAODRingSetConfWriter::finalize ( )

Method executing the algorithm.

Definition at line 293 of file xAODRingSetConfWriter.cxx.

294 {
295  return StatusCode::SUCCESS;
296 }

◆ initialize()

StatusCode Ringer::xAODRingSetConfWriter::initialize ( )

Method initialising the algorithm.

Definition at line 46 of file xAODRingSetConfWriter.cxx.

46  {
47 
48  // Greet the user:
49  ATH_MSG_INFO( "Initialising" );
50 
51  // Make sure that configuration param are equivalent in size:
52  if ( m_crBuilderTools.size() != m_rsMetaNames.size() )
53  {
54 
55  ATH_MSG_ERROR("Configuration error: every CaloRingsBuilder should "
56  "have its own RingSet/CaloRings names "
57  "set via the RingSetConfMetaNames "
58  "python configurable.");
59 
60  ATH_MSG_ERROR("The retrieven m_RingSet names are: " << m_rsMetaNames );
61  ATH_MSG_ERROR("The retrieven m_crBuilderTools names are: "
62  << [this]()
63  {
64  std::vector<std::string> names;
65  for ( const auto& tool : m_crBuilderTools )
66  {
67  names.push_back( tool.name() );
68  }
69  return names;
70  }()
71  );
72 
73  return StatusCode::FAILURE;
74  }
75 
76  // Display the configuration:
77  ATH_MSG_DEBUG( "RingSetConfMetaNames = " << m_rsMetaNames );
78  if ( msg().level() <= MSG::DEBUG ){ // Display
79  std::vector<std::string> toolNames;
80  toolNames.reserve( m_crBuilderTools.size() );
81  for ( const auto &tool : m_crBuilderTools ){
82  toolNames.push_back( tool.name() );
83  }
84  ATH_MSG_DEBUG( "CaloRingsBuilderTools = " << toolNames );
85  }
86 
87  ATH_MSG_VERBOSE( "inputMetaStore = " << m_inputMetaStore->dump() );
88 
89  // Retrieve the necessary service(s):
90  CHECK( m_metaStore.retrieve() );
91  CHECK( m_inputMetaStore.retrieve() );
92 
93  // Now work to set xAOD RingSet/CaloRings configuration metadata available on
94  // the output meta store:
98 
99  // NOTE: This must be called after fillConfigurations, otherwise it will
100  // attempt to fill those configurations retrieven from the builders.
102 
103  // Print-out configurations:
104  ATH_MSG_DEBUG("There are available a total of " << m_rsConfContVec.size() << " RingSetConfContainer(s).");
105  for ( const auto* c : m_rsConfContVec ) {
106  if ( nullptr != c ) {
107  if ( msg().level() <= MSG::VERBOSE ) {
108  for ( const auto *const r : *c ){
109  std::ostringstream str;
110  r->print( str );
111  ATH_MSG_VERBOSE( str.str() );
112  }
113  }
114  } else {
115  ATH_MSG_WARNING("Container " << c << "is empty!");
116  }
117  }
118 
119  ATH_MSG_DEBUG("Obtained configuration succesfully.");
120 
121  ATH_MSG_VERBOSE( "outputMetaStore = " << m_metaStore->dump() );
122 
123  // Return gracefully:
124  return StatusCode::SUCCESS;
125 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< 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.

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< 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< 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< Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ retrieveCaloRingsBuilders()

StatusCode Ringer::xAODRingSetConfWriter::retrieveCaloRingsBuilders ( )
private

Retrieve CaloRingsBuilder tools.

Definition at line 228 of file xAODRingSetConfWriter.cxx.

229 {
230  ATH_MSG_INFO("Retrieving " << m_crBuilderTools.size() <<
231  " reader tools for " << name() );
232 
233  ATH_CHECK(m_crBuilderTools.retrieve());
234 
235  return StatusCode::SUCCESS;
236 }

◆ searchAndCopyCLID()

template<class auxT , class T >
StatusCode Ringer::xAODRingSetConfWriter::searchAndCopyCLID ( const ClassID_traits< T > &  classID)
private

Auxiliary method called by copyInputMetaStore.

Definition at line 141 of file xAODRingSetConfWriter.cxx.

143 {
144  std::vector< std::string > ringConfKeys;
145 
146  // Retrieve our container keys:
147  m_inputMetaStore->keys( classID.ID() , ringConfKeys);
148 
149  ATH_MSG_DEBUG( "Available keys with type(" << classID.typeName() << ") are: "
150  << ringConfKeys );
151 
152  // Now loop retrieving them and recording on the outputContainer:
153  for ( const auto &key : ringConfKeys )
154  {
155  if (key[0] == ';' && key[3] == ';') continue; // ignore versioned keys
156  ATH_MSG_VERBOSE( "Attempting to copy " << key );
157 
158  // Check if this meta isn't already available in output, if so, do not copy it:
159  if ( std::any_of( m_rsMetaNames.begin(), m_rsMetaNames.end(),
160  [&key](std::string &builderKey){
161  return (builderKey == key) || ((builderKey + "Aux.") == key);
162  } ) )
163  {
164  ATH_MSG_VERBOSE( "This key is already going to be built "
165  "(outputMetaNames = " << m_rsMetaNames << ")"
166  ", it will NOT be copied!" );
167  continue;
168  }
169 
170  // Retrieve and record its copy in output store
171  CHECK( (copyKeyToStore<auxT, T>( key )) );
172  ATH_MSG_INFO( "Successfully copied key " << key );
173  }
174 
175  return StatusCode::SUCCESS;
176 
177 }

◆ sysInitialize()

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

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< 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< 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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_crBuilderTools

ToolHandleArray< Ringer::ICaloRingsBuilder > Ringer::xAODRingSetConfWriter::m_crBuilderTools
private

Connection to the trigger configuration service.

Definition at line 71 of file xAODRingSetConfWriter.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< 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< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_inputMetaStore

ServiceHandle< StoreGateSvc > Ringer::xAODRingSetConfWriter::m_inputMetaStore
private

Connection to the inputMetadata store.

Definition at line 69 of file xAODRingSetConfWriter.h.

◆ m_metaStore

ServiceHandle< StoreGateSvc > Ringer::xAODRingSetConfWriter::m_metaStore
private

Private properties (python configurables):Connection to the (output)metadata store.

Definition at line 67 of file xAODRingSetConfWriter.h.

◆ m_rsConfContVec

std::vector< xAOD::RingSetConfContainer* > Ringer::xAODRingSetConfWriter::m_rsConfContVec
private

Private properties (non python configurables):The CaloRings configuration container.

Definition at line 79 of file xAODRingSetConfWriter.h.

◆ m_rsMetaNames

std::vector<std::string> Ringer::xAODRingSetConfWriter::m_rsMetaNames
private

StoreGate keys for the RingSet configurations.

Definition at line 73 of file xAODRingSetConfWriter.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
beamspotman.r
def r
Definition: beamspotman.py:676
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Ringer::xAODRingSetConfWriter::allocateContainers
StatusCode allocateContainers()
Prepare containers to retrieve configurations.
Definition: xAODRingSetConfWriter.cxx:239
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Ringer::xAODRingSetConfWriter::retrieveCaloRingsBuilders
StatusCode retrieveCaloRingsBuilders()
Retrieve CaloRingsBuilder tools.
Definition: xAODRingSetConfWriter.cxx:228
Ringer::xAODRingSetConfWriter::m_rsConfContVec
std::vector< xAOD::RingSetConfContainer * > m_rsConfContVec
Private properties (non python configurables):The CaloRings configuration container.
Definition: xAODRingSetConfWriter.h:79
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
ClassID_traits::ID
static const CLID & ID()
the CLID of T
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:50
ClassID_traits::typeName
static const std::string & typeName()
the demangled type name of T
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:56
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
Ringer::xAODRingSetConfWriter::m_rsMetaNames
std::vector< std::string > m_rsMetaNames
StoreGate keys for the RingSet configurations.
Definition: xAODRingSetConfWriter.h:73
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
xAOD::RingSetConfContainer
RingSetConfContainer_v1 RingSetConfContainer
Definition of the current "RingSetConf container version".
Definition: RingSetConfContainer.h:21
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
python.subdetectors.mmg.names
names
Definition: mmg.py:8
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:40
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAOD::RingSetConfAuxContainer_v1
Auxiliary store for xAOD::RingSetConfContainer.
Definition: RingSetConfAuxContainer_v1.h:17
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
Ringer::xAODRingSetConfWriter::fillConfigurations
StatusCode fillConfigurations()
Fill the containers with each CaloRingsBuilder tool configuration.
Definition: xAODRingSetConfWriter.cxx:259
Ringer::xAODRingSetConfWriter::m_metaStore
ServiceHandle< StoreGateSvc > m_metaStore
Private properties (python configurables):Connection to the (output)metadata store.
Definition: xAODRingSetConfWriter.h:67
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
a
TList * a
Definition: liststreamerinfos.cxx:10
h
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Ringer::xAODRingSetConfWriter::m_inputMetaStore
ServiceHandle< StoreGateSvc > m_inputMetaStore
Connection to the inputMetadata store.
Definition: xAODRingSetConfWriter.h:69
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
xAOD::RingSetConfAuxContainer
RingSetConfAuxContainer_v1 RingSetConfAuxContainer
Definition of the current RingSetConf auxiliary container.
Definition: RingSetConfAuxContainer.h:20
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
Ringer::xAODRingSetConfWriter::m_crBuilderTools
ToolHandleArray< Ringer::ICaloRingsBuilder > m_crBuilderTools
Connection to the trigger configuration service.
Definition: xAODRingSetConfWriter.h:71
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
test_pyathena.counter
counter
Definition: test_pyathena.py:15
python.PyAthena.obj
obj
Definition: PyAthena.py:132
value_type
Definition: EDM_MasterSearch.h:11
python.compressB64.c
def c
Definition: compressB64.py:93
xAOD::RingSetConf_v1::fillRingSetConfContainer
static void fillRingSetConfContainer(const RawConfCollection &rawConfCol, RingSetConfContainer_v1 *container)
Creates RingSetConfContainer from RawConfCollection.
Definition: RingSetConf_v1.cxx:360
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
fitman.k
k
Definition: fitman.py:528
Ringer::xAODRingSetConfWriter::copyInputMetaStore
StatusCode copyInputMetaStore()
Private methods:
Definition: xAODRingSetConfWriter.cxx:128
ServiceHandle< ICondSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37