27 ::ISvcLocator* svcLoc ) :
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." );
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;
67 names.push_back( tool.name() );
73 return StatusCode::FAILURE;
78 if (
msg().level() <= MSG::DEBUG ){
79 std::vector<std::string> toolNames;
82 toolNames.push_back( tool.name() );
106 if (
nullptr != c ) {
107 if (
msg().level() <= MSG::VERBOSE ) {
108 for (
const auto *
const r : *c ){
109 std::ostringstream
str;
124 return StatusCode::SUCCESS;
130 ATH_MSG_DEBUG(
"Checking if it is needed to copy RingSetConf "
131 "MetaData on input file.");
136 return StatusCode::SUCCESS;
140template<
class auxT,
class T >
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!" );
175 return StatusCode::SUCCESS;
180template <
class auxT,
class T >
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 ) {
201 if( msgLevel() <= MSG::VERBOSE ) {
202 std::ostringstream
str;
207 value_type objCopy =
new (base_value_type)( *obj );
210 if( msgLevel() <= MSG::VERBOSE ) {
211 std::ostringstream
str;
212 objCopy->print(
str );
216 contCopy->push_back( objCopy );
223 return StatusCode::SUCCESS;
231 " reader tools for " << name() );
235 return StatusCode::SUCCESS;
242 for (
size_t counter = 0; counter <
m_rsMetaNames.size(); ++counter)
247 rsCont->setStore( rsAux );
255 return StatusCode::SUCCESS;
269 crBuilder->rawConf(),
273 ATH_MSG_DEBUG(
"Got configuration for " << crBuilder->name() <<
"." );
277 return StatusCode::SUCCESS;
288 return StatusCode::SUCCESS;
294 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > m_metaStore
Private properties (python configurables):Connection to the (output)metadata store.
StatusCode allocateContainers()
Prepare containers to retrieve configurations.
std::vector< std::string > m_rsMetaNames
StoreGate keys for the RingSet configurations.
StatusCode execute()
Method executing the algorithm.
StatusCode copyKeyToStore(const std::string &key)
Retrieve a key and returns a copy of it to outputmeta.
StatusCode copyInputMetaStore()
Private methods:
StatusCode searchAndCopyCLID(const ClassID_traits< T > &classID)
Auxiliary method called by copyInputMetaStore.
StatusCode fillConfigurations()
Fill the containers with each CaloRingsBuilder tool configuration.
std::vector< xAOD::RingSetConfContainer * > m_rsConfContVec
Private properties (non python configurables):The CaloRings configuration container.
StatusCode initialize()
Method initialising the algorithm.
StatusCode retrieveCaloRingsBuilders()
Retrieve CaloRingsBuilder tools.
ServiceHandle< StoreGateSvc > m_inputMetaStore
Connection to the inputMetadata store.
ToolHandleArray< Ringer::ICaloRingsBuilder > m_crBuilderTools
Connection to the trigger configuration service.
xAODRingSetConfWriter(const std::string &name, ::ISvcLocator *svcLoc)
Regular Algorithm constructor.
StatusCode finalize()
Method executing the algorithm.
static void fillRingSetConfContainer(const RawConfCollection &rawConfCol, RingSetConfContainer_v1 &container)
Creates RingSetConfContainer from RawConfCollection.
Namespace dedicated for Ringer utilities.
RingSetConfContainer_v1 RingSetConfContainer
Definition of the current "RingSetConf container version".
RingSetConfAuxContainer_v1 RingSetConfAuxContainer
Definition of the current RingSetConf auxiliary container.
This specialization is used for classes deriving from DataObject.
static const CLID & ID()
the CLID of T
static const std::string & typeName()
the demangled type name of T
Default, invalid implementation of ClassID_traits.