 |
ATLAS Offline Software
|
Go to the documentation of this file.
27 ::ISvcLocator* svcLoc ) :
29 m_metaStore(
"StoreGateSvc/MetaDataStore",
name ),
30 m_inputMetaStore(
"StoreGateSvc/InputMetaDataStore",
name )
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;
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;
130 ATH_MSG_DEBUG(
"Checking if it is needed to copy RingSetConf "
131 "MetaData on input file.");
133 CHECK( searchAndCopyCLID< xAOD::RingSetConfAuxContainer >(
136 return StatusCode::SUCCESS;
140 template<
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!" );
171 CHECK( (copyKeyToStore<auxT, T>(
key )) );
175 return StatusCode::SUCCESS;
180 template <
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 ) {
202 std::ostringstream
str;
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;
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;
static void fillRingSetConfContainer(const RawConfCollection &rawConfCol, RingSetConfContainer_v1 &container)
Creates RingSetConfContainer from RawConfCollection.
StatusCode initialize()
Method initialising the algorithm.
StatusCode execute()
Method executing the algorithm.
StatusCode allocateContainers()
Prepare containers to retrieve configurations.
StatusCode finalize()
Method executing the algorithm.
StatusCode searchAndCopyCLID(const ClassID_traits< T > &classID)
Auxiliary method called by copyInputMetaStore.
#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.
std::vector< std::string > m_rsMetaNames
StoreGate keys for the RingSet configurations.
RingSetConfContainer_v1 RingSetConfContainer
Definition of the current "RingSetConf container version".
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
static const CLID & ID()
the CLID of T
Default, invalid implementation of ClassID_traits.
Auxiliary store for xAOD::RingSetConfContainer.
#define CHECK(...)
Evaluate an expression and check for errors.
Helpers for checking error return status codes and reporting errors.
StatusCode fillConfigurations()
Fill the containers with each CaloRingsBuilder tool configuration.
ServiceHandle< StoreGateSvc > m_metaStore
Private properties (python configurables):Connection to the (output)metadata store.
StatusCode copyKeyToStore(const std::string &key)
Retrieve a key and returns a copy of it to outputmeta.
#define ATH_MSG_WARNING(x)
ServiceHandle< StoreGateSvc > m_inputMetaStore
Connection to the inputMetadata store.
static const std::string & typeName()
the demangled type name of T
RingSetConfAuxContainer_v1 RingSetConfAuxContainer
Definition of the current RingSetConf auxiliary container.
ToolHandleArray< Ringer::ICaloRingsBuilder > m_crBuilderTools
Connection to the trigger configuration service.
xAODRingSetConfWriter(const std::string &name, ::ISvcLocator *svcLoc)
Regular Algorithm constructor.
StatusCode copyInputMetaStore()
Private methods:
Namespace dedicated for Ringer utilities.