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