|
ATLAS Offline Software
|
Algorithm used to write the RingSets configuration.
More...
#include <xAODRingSetConfWriter.h>
|
| 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 |
|
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.
◆ StoreGateSvc_t
◆ xAODRingSetConfWriter()
Ringer::xAODRingSetConfWriter::xAODRingSetConfWriter |
( |
const std::string & |
name, |
|
|
::ISvcLocator * |
svcLoc |
|
) |
| |
Regular Algorithm constructor.
Definition at line 26 of file xAODRingSetConfWriter.cxx.
34 "The metadata Storage ServiceHandle. If empty, it will use "
35 "MetaDataStore service with same name as this algorithm.");
38 "The CaloRingsBuilder tools handles array.");
41 "The metadata RingSet Configuration container keys to write." );
◆ allocateContainers()
StatusCode Ringer::xAODRingSetConfWriter::allocateContainers |
( |
| ) |
|
|
private |
Prepare containers to retrieve configurations.
Definition at line 239 of file xAODRingSetConfWriter.cxx.
247 rsCont->setStore( rsAux );
255 return StatusCode::SUCCESS;
◆ copyInputMetaStore()
StatusCode Ringer::xAODRingSetConfWriter::copyInputMetaStore |
( |
| ) |
|
|
private |
◆ 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.
184 typedef typename T::base_value_type base_value_type;
186 const T* cont(
nullptr);
190 auxT* contAuxCopy =
new auxT;
192 contCopy->setStore( contAuxCopy );
195 contCopy->reserve( cont->size() );
196 contAuxCopy->reserve( cont->size() );
198 for (
const base_value_type*
obj : *cont ) {
202 std::ostringstream
str;
211 std::ostringstream
str;
212 objCopy->print(
str );
216 contCopy->push_back( objCopy );
223 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode Ringer::xAODRingSetConfWriter::execute |
( |
| ) |
|
◆ extraDeps_update_handler()
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.
57 return Algorithm::extraOutputDeps();
◆ fillConfigurations()
StatusCode Ringer::xAODRingSetConfWriter::fillConfigurations |
( |
| ) |
|
|
private |
◆ finalize()
StatusCode Ringer::xAODRingSetConfWriter::finalize |
( |
| ) |
|
◆ initialize()
StatusCode Ringer::xAODRingSetConfWriter::initialize |
( |
| ) |
|
Method initialising the algorithm.
Definition at line 46 of file xAODRingSetConfWriter.cxx.
55 ATH_MSG_ERROR(
"Configuration error: every CaloRingsBuilder should "
56 "have its own RingSet/CaloRings names "
57 "set via the RingSetConfMetaNames "
58 "python configurable.");
64 std::vector<std::string>
names;
73 return StatusCode::FAILURE;
79 std::vector<std::string> toolNames;
82 toolNames.push_back(
tool.name() );
106 if (
nullptr !=
c ) {
108 for (
const auto *
const r : *
c ){
109 std::ostringstream
str;
124 return StatusCode::SUCCESS;
◆ inputHandles()
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]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ retrieveCaloRingsBuilders()
StatusCode Ringer::xAODRingSetConfWriter::retrieveCaloRingsBuilders |
( |
| ) |
|
|
private |
◆ 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.
144 std::vector< std::string > ringConfKeys;
153 for (
const auto &
key : ringConfKeys )
155 if (
key[0] ==
';' &&
key[3] ==
';')
continue;
160 [&
key](std::string &builderKey){
161 return (builderKey == key) || ((builderKey +
"Aux.") == key);
166 ", it will NOT be copied!" );
171 CHECK( (copyKeyToStore<auxT, T>(
key )) );
175 return StatusCode::SUCCESS;
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_crBuilderTools
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_inputMetaStore
◆ m_metaStore
Private properties (python configurables):Connection to the (output)metadata store.
Definition at line 67 of file xAODRingSetConfWriter.h.
◆ m_rsConfContVec
◆ m_rsMetaNames
std::vector<std::string> Ringer::xAODRingSetConfWriter::m_rsMetaNames |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
StatusCode allocateContainers()
Prepare containers to retrieve configurations.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
#define ATH_MSG_VERBOSE(x)
StatusCode retrieveCaloRingsBuilders()
Retrieve CaloRingsBuilder tools.
std::vector< xAOD::RingSetConfContainer * > m_rsConfContVec
Private properties (non python configurables):The CaloRings configuration container.
virtual void setOwner(IDataHandleHolder *o)=0
static const CLID & ID()
the CLID of T
static const std::string & typeName()
the demangled type name of T
std::vector< std::string > m_rsMetaNames
StoreGate keys for the RingSet configurations.
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
RingSetConfContainer_v1 RingSetConfContainer
Definition of the current "RingSetConf container version".
::StatusCode StatusCode
StatusCode definition for legacy code.
Default, invalid implementation of ClassID_traits.
Auxiliary store for xAOD::RingSetConfContainer.
#define CHECK(...)
Evaluate an expression and check for errors.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
StatusCode fillConfigurations()
Fill the containers with each CaloRingsBuilder tool configuration.
ServiceHandle< StoreGateSvc > m_metaStore
Private properties (python configurables):Connection to the (output)metadata store.
DataObjIDColl m_extendedExtraObjects
#define ATH_MSG_WARNING(x)
ServiceHandle< StoreGateSvc > m_inputMetaStore
Connection to the inputMetadata store.
RingSetConfAuxContainer_v1 RingSetConfAuxContainer
Definition of the current RingSetConf auxiliary container.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
ToolHandleArray< Ringer::ICaloRingsBuilder > m_crBuilderTools
Connection to the trigger configuration service.
AthAlgorithm()
Default constructor:
static void fillRingSetConfContainer(const RawConfCollection &rawConfCol, RingSetConfContainer_v1 *container)
Creates RingSetConfContainer from RawConfCollection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
StatusCode copyInputMetaStore()
Private methods: