|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef TRIGNAVIGATION_HOLDER_H
8 #define TRIGNAVIGATION_HOLDER_H
11 #include <type_traits>
13 #include "GaudiKernel/ClassID.h"
20 #include "AthLinks/ElementLinkVector.h"
32 #include "GaudiKernel/ToolHandle.h"
38 class AuxStoreInternal;
47 std::string
formatSGkey(
const std::string&
prefix,
const std::string& containername,
const std::string&
label);
95 virtual const std::string&
key()
const = 0;
124 std::vector<uint32_t>&
output,
125 size_t& payloadsize);
136 virtual void print(MsgStream&
m)
const;
193 std::vector<uint32_t>& dataBlob);
225 std::unique_ptr<SG::IAuxStore>
238 std::string& elementTypeName)
const;
258 template<
class STORED,
class CONTAINER,
bool is_same>
struct set_link;
260 template<
class STORED,
class CONTAINER>
270 template<
class STORED,
class CONTAINER>
288 template<
class STORED>
298 template<
class CONTAINER2>
301 template<
class CONTAINER2>
304 template<
class CONTAINER2>
327 template<
class STORED,
class CONTAINER>
372 virtual const std::string&
key()
const {
return m_key; }
399 typedef std::multimap<HLT::TriggerElement::ObjectIndex, MemoryMgr>
MemoryMgrMap;
409 template<
class T,
class C>
virtual CLID containerClid() const =0
Helper class for conversion from/to int stored in TE and pair of ints used in Navigation Object point...
virtual HLT::TriggerElement::ObjectIndex add(const STORED *f, bool inSG=false, const std::string &="")
adds object(s) to be holded
virtual CLID typeClid() const
virtual bool contains(const STORED *obj, HLT::TriggerElement::ObjectIndex &idx)
check if object(s) in dest are held by this holder
static type do_it(const STORED *el, const CONTAINER *src, HLT::TriggerElement::ObjectIndex idx)
virtual bool serialize(std::vector< uint32_t > &output) const
serializes this Holder
virtual const ITypeProxy & containerTypeProxy() const =0
Get the proxy for the container.
bool deserializeDynVars(const std::vector< uint32_t > &dataBlob, size_t offs, SG::IAuxStore &store)
Read dynamic auxiliary variables from a serialized buffer.
HolderImp(const std::string &prefix, const std::string &label, uint16_t idx)
HLTNavDetails::TypeProxy< CONTAINER > ContainerProxy
const std::string & label() const
returns the label of objects stores by this holder
virtual const std::string & typeName() const =0
returns the object's name stored by this holder
virtual bool get(const STORED *&dest, HLT::TriggerElement::ObjectIndex idx)
gets object(s) holded
convert to and from a SG storable
virtual CLID containerClid() const
MsgStream & msg(const MSG::Level lvl) const
bool getWithLink(typename set_link< STORED, CONTAINER, std::is_same< STORED, CONTAINER >::value >::type &link, HLT::TriggerElement::ObjectIndex &idx)
ToolHandle< ITrigSerializerToolBase > m_serializer
Serializer tool; used for dynamic variables.
ElementLink< CONTAINER > type
std::string m_label
label given to the objects in this holder (labels given at attachFeature)
virtual const std::string & key() const
virtual bool syncWithSG(SG::OwnershipPolicy policy=SG::OWN_ELEMENTS)
std::string formatSGkey(const std::string &prefix, const std::string &containername, const std::string &label)
declaration of formatting function.
virtual bool setAuxDataObject(DataObject *dobjaux)
virtual bool get(const STORED *&dest, HLT::TriggerElement::ObjectIndex idx)=0
virtual bool contains(const STORED *obj, HLT::TriggerElement::ObjectIndex &idx)=0
bool msgLvl(const MSG::Level lvl) const
Holder(const std::string &prefix, const std::string &label, uint16_t idx)
Holder< STORED > base_type
HLTNavDetails::TypeProxy< STORED > FeatureProxy
HLT::AccessProxy * m_storeGate
pointer to SG
virtual CLID auxClidOrZero() const
Interface providing I/O for a generic auxiliary store.
virtual DataObject * getDataObject()
bool get(ElementLinkVector< CONTAINER2 > &cont, HLT::TriggerElement::ObjectIndex idx)
OwnershipPolicy
describes the possible element ownership policies (see e.g. DataVector)
virtual const std::string & collectionName() const
virtual bool syncWithSG(SG::OwnershipPolicy policy=SG::OWN_ELEMENTS)=0
DataLink< CONTAINER > type
virtual std::string getUniqueKey()=0
static const CLID & ID()
the CLID of T
virtual void print(MsgStream &m) const
The Athena Transient Store API.
virtual bool checkAndSetOwnership(SG::OwnershipPolicy policy)
static const std::string & typeName()
the demangled type name of T
std::string m_prefix
prefix for key given to the objects
virtual bool setDataObject(DataObject *dobj)
@ OWN_ELEMENTS
this data object owns its elements
IConversionSvc * m_objectserializerSvc
pointer to object serializer
bool deserializePayload(const std::vector< uint32_t > &dataBlob, int version)
deserialization of holder payload
virtual IHolder * clone(const std::string &prefix, const std::string &label, uint16_t idx) const
Object reference supporting deferred reading from StoreGate.
virtual bool setAuxDataObject(DataObject *dobjaux)=0
virtual std::string getNextKey()
virtual DataObject * getAuxDataObject()=0
MsgStream & msg() const
The standard message stream.
ContainerProxy m_containerProxy
bool add(const std::string &hname, TKey *tobj)
virtual IHolder * clone(const std::string &prefix, const std::string &label, uint16_t idx) const =0
uint32_t CLID
The Class ID type.
const asg::AsgMessaging * m_logger
virtual std::string getNextKey()=0
MemoryMgr(const FeatureProxy &st, bool inSG)
virtual std::string getUniqueKey()
virtual bool checkAndSetOwnership(SG::OwnershipPolicy policy)=0
bool getWithLink(typename set_link< STORED, CONTAINER2, std::is_same< STORED, CONTAINER2 >::value >::type &link, HLT::TriggerElement::ObjectIndex &idx)
bool getElementLinks(ElementLinkVector< CONTAINER > &cont, HLT::TriggerElement::ObjectIndex idx)
virtual bool serialize(std::vector< uint32_t > &output) const
virtual bool setDataObject(DataObject *dobj)=0
ElementLinkVector implementation for standalone ROOT.
Class helping in dealing with dynamic branch selection.
virtual DataObject * getDataObject()=0
Class mimicking the AthMessaging class from the offline software.
virtual void print(MsgStream &m) const
bool serializePayload(std::vector< uint32_t > &dataBlob, const xAOD::AuxSelection &sel)
serializes the payload of this Holder
virtual const std::string & collectionName() const =0
returns the collection's name stored by this holder
MsgStream & operator<<(MsgStream &m, const HLTNavDetails::IHolder &nav)
This is an implementation class for all Holders It is templated with 2 arguments STORED which is type...
Interface for non-const operations on an auxiliary store.
virtual HLT::TriggerElement::ObjectIndex add ATLAS_NOT_THREAD_SAFE(const STORED *f, bool inSG, const std::string &="")=0
saved object in this holder
An STL vector of pointers that by default owns its pointed-to elements.
virtual DataObject * getAuxDataObject()
bool get(ElementLinkVector< CONTAINER2 > &cont)
virtual CLID typeClid() const =0
returns the CLID of objects stores by this holder
std::string generateAliasKey(CLID c, uint16_t sti, const std::string &label, unsigned size)
virtual void prepare(const asg::AsgMessaging &logger, HLT::AccessProxy *sg, IConversionSvc *objSerializer, bool readonly)
prepares this holder by setting messaging, StoreGate access and providing serializer
uint16_t subTypeIndex() const
returns the index (short number used when linking object to the TE) of objects stores by this holder
virtual CLID auxClidOrZero() const =0
std::multimap< HLT::TriggerElement::ObjectIndex, MemoryMgr > MemoryMgrMap
bool getElementLinks(ElementLinkVector< CONTAINER > &cont)
Helper struct to determine if persistable type is a DataLink<CONTAINER> (in case STORED and CONTAINER...
virtual const std::string & typeName() const
virtual const std::string & key() const =0
returns the containers StoreGate key
uint16_t m_subTypeIndex
index to notify how many objects of given type we have (we need to record it in case of slimming will...
Define macros for attributes used to control the static checker.
bool serializeDynVars(const SG::IAuxStoreIO &iio, const xAOD::AuxSelection &sel, std::vector< uint32_t > &dataBlob)
Serialize all selected dynamic variables for an xAOD object.
Interface to the TypeProxy<...> objects created at runtime.
virtual void prepare(const asg::AsgMessaging &logger, HLT::AccessProxy *sg, IConversionSvc *objSerializer, bool readonly=false)
const std::type_info * getElementType(const std::string &tname, std::string &elementTypeName) const
Find the type of an element of a vector.
virtual const ITypeProxy & containerTypeProxy() const
static type do_it(const STORED *el, const CONTAINER *src, HLT::TriggerElement::ObjectIndex idx)
virtual const std::string & prefix() const
returns the containers StoreGate prefix
bool serializeWithPayload(const xAOD::AuxSelection &sel, std::vector< uint32_t > &output, size_t &payloadsize)
serializes this Holder including payload