|
ATLAS Offline Software
|
Algorithm preparing auxiliary store objects for slimming.
More...
#include <AuxStoreWrapper.h>
|
| AuxStoreWrapper (const std::string &name, ISvcLocator *svcLoc) |
| Regular Algorithm constructor. More...
|
|
virtual StatusCode | initialize () |
| Function initialising the algorithm. More...
|
|
virtual StatusCode | execute () |
| Function 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 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.
◆ StoreGateSvc_t
◆ AuxStoreWrapper()
xAODMaker::AuxStoreWrapper::AuxStoreWrapper |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svcLoc |
|
) |
| |
Regular Algorithm constructor.
Definition at line 49 of file AuxStoreWrapper.cxx.
55 "StoreGate keys of the store objects to be wrapped" );
◆ changeContainer()
Create a new container store.
Definition at line 187 of file AuxStoreWrapper.cxx.
192 if( aux_clid_itr ==
m_clids.end() ) {
195 return StatusCode::FAILURE;
197 evtStore()->releaseObject( aux_clid_itr->second,
name );
199 <<
" and name \"" <<
name <<
"\"" );
206 "SG::IAuxStore base class of: " <<
name );
207 return StatusCode::FAILURE;
210 CHECK(
evtStore()->removeProxy( storeProxy,
nullptr,
true ) );
220 <<
name <<
"\" with an xAOD::AuxContainerBase "
224 const std::string intName =
name.substr( 0,
name.size() - 4 );
228 auto clid_itr =
m_clids.find( intName );
229 if( clid_itr ==
m_clids.end() ) {
233 return StatusCode::SUCCESS;
235 intId = clid_itr->second;
242 <<
"\" not available" );
243 return StatusCode::SUCCESS;
250 <<
"Couldn't retrieve raw pointer to interface container";
251 return StatusCode::FAILURE;
259 reinterpret_cast<
SG::AuxVectorBase* >( ptr );
263 if( proxy->isConst() ) {
264 interface->setConstStore( holder );
266 interface->setStore( holder );
273 return StatusCode::SUCCESS;
◆ changeElement()
Create a new element store.
Definition at line 276 of file AuxStoreWrapper.cxx.
281 if( aux_clid_itr ==
m_clids.end() ) {
284 return StatusCode::FAILURE;
286 evtStore()->releaseObject( aux_clid_itr->second,
name );
288 <<
" and name \"" <<
name <<
"\"" );
298 <<
name <<
"\" into xAOD::AuxInfoBase "
302 const std::string intName =
name.substr( 0,
name.size() - 4 );
306 auto clid_itr =
m_clids.find( intName );
307 if( clid_itr ==
m_clids.end() ) {
311 return StatusCode::SUCCESS;
313 intId = clid_itr->second;
320 <<
"\" not available" );
321 return StatusCode::SUCCESS;
328 <<
"Couldn't retrieve raw pointer to interface object";
329 return StatusCode::FAILURE;
337 reinterpret_cast<
SG::AuxElement* >( ptr );
341 if( proxy->isConst() ) {
342 interface->setConstStore( holder );
344 interface->setStore( holder );
351 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 xAODMaker::AuxStoreWrapper::execute |
( |
| ) |
|
|
virtual |
Function executing the algorithm.
Definition at line 80 of file AuxStoreWrapper.cxx.
89 const std::vector< const SG::DataProxy* > proxies =
96 <<
"\" and CLID " <<
proxy->clID() );
111 if(
typeName.compare( 0, 6,
"xAOD::" ) == 0) {
124 if( (
typeName.compare( 0, 6 ,
"xAOD::") == 0) &&
125 (
typeName !=
"xAOD::ByteStreamAuxContainer_v1" ) ) {
131 if(
proxy->name().find(
"Aux." ) !=
132 (
proxy->name().size() - 4 ) ) {
158 <<
"with interface SG::IAuxStore" );
184 return StatusCode::SUCCESS;
◆ 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();
◆ initialize()
StatusCode xAODMaker::AuxStoreWrapper::initialize |
( |
| ) |
|
|
virtual |
Function initialising the algorithm.
Definition at line 59 of file AuxStoreWrapper.cxx.
77 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()
◆ 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_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 |
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ 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
◆ m_vhka
The documentation for this class was generated from the following files:
Common base class for auxiliary info objects.
def retrieve(aClass, aKey=None)
virtual void setStore(SG::IAuxStore *store) override
Set a different internal store object.
#define REPORT_ERROR(SC)
Report an error.
virtual AuxStoreType getStoreType() const =0
Return the type of the store object.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Base class for elements of a container that can have aux data.
Common base class for the auxiliary containers.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
#define ATH_MSG_VERBOSE(x)
std::set< std::string > m_keysSet
Keys of the objects to be wrapped, in a set container.
Manage index tracking and synchronization of auxiliary data.
StatusCode changeContainer(const SG::IAuxStore *store, const std::string &name)
Create a new container store.
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize() override
Override sysInitialize.
std::map< std::string, CLID > m_clids
Keys and CLIDs of the interface containers touched.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
Default, invalid implementation of ClassID_traits.
#define CHECK(...)
Evaluate an expression and check for errors.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
std::set< std::string > m_toConvert
Keys of the auxiliary stores that need to be converted in the end.
uint32_t CLID
The Class ID type.
StatusCode changeElement(const SG::IAuxStore *store, const std::string &name)
Create a new element store.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
virtual void setStore(SG::IAuxStore *store) override
Set a different internal store object.
DATA * DataProxy_cast(DataProxy *proxy)
cast the proxy into the concrete data object it proxies
ServiceHandle< ::IClassIDSvc > m_clidSvc
Handle to the Class ID service.
bool m_cachesSet
Flag specifying whether the internal caches were set already.
Interface for non-const operations on an auxiliary store.
DataObjIDColl m_extendedExtraObjects
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
AthAlgorithm()
Default constructor:
std::vector< std::string > m_keys
StoreGate keys of the store objects to be wrapped.
@ AST_ObjectStore
The store describes a single object.
Interface for objects taking part in direct ROOT I/O.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>