ATLAS Offline Software
Loading...
Searching...
No Matches
xAODShallowAuxContainerCnv Class Referenceabstract

POOL converter for the xAOD::ShallowAuxContainer class. More...

#include <xAODShallowAuxContainerCnv.h>

Inheritance diagram for xAODShallowAuxContainerCnv:
Collaboration diagram for xAODShallowAuxContainerCnv:

Public Types

typedef T_AthenaPoolCustCnv< xAOD::ShallowAuxContainer, xAOD::ShallowAuxContainer > BaseType

Public Member Functions

 xAODShallowAuxContainerCnv (ISvcLocator *svcLoc)
 Converter constructor.
virtual StatusCode finalize () override
virtual long repSvcType () const override
virtual StatusCode createObj (IOpaqueAddress *pAddr, DataObject *&pObj) override
 Create a transient object from a POOL persistent representation.
virtual StatusCode createRep (DataObject *pObj, IOpaqueAddress *&pAddr) override
 Create a POOL persistent representation for a transient object.
virtual StatusCode fillRepRefs (IOpaqueAddress *pAddr, DataObject *pObj) override
 Create a POOL persistent representation for a transient object.
const ServiceHandle< StoreGateSvc > & detStore () const
 Handle to DetectorStore.
bool msgLvl (const MSG::Level lvl) const
 Test the output level.
MsgStream & msg () const
 The standard message stream.
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream.
void setLevel (MSG::Level lvl)
 Change the current logging level.

Static Public Member Functions

static CLID classID ()
static long storageType ()

Protected Types

using PersObjCache_t
 Local cache for persistent objects created by this converter, grouped by processing slot These objects are deleted after a commit.
typedef std::mutex CallMutex

Protected Member Functions

virtual xAOD::ShallowAuxContainer * createPersistentWithKey (xAOD::ShallowAuxContainer *trans, const std::string &key) override
 Function preparing the container to be written out.
virtual xAOD::ShallowAuxContainer * createTransientWithKey (const Token *token, const std::string &key) override
 Function reading in the object from the input file.
P * poolReadObject (const Token *token)
 Read object of type P.
void poolReadObject (TopLevelTPCnvBase &tlp_converter, const Token *token)
 Read object of type P (plus all extending objects) using the indicated top-level TP converter.
void keepPoolObj (xAOD::ShallowAuxContainer *obj, const std::string &output)
 Remember the POOL object to be written out (will be deleted after commit).
virtual StatusCode transToPers (xAOD::ShallowAuxContainer *, xAOD::ShallowAuxContainer *&) override
 Obsolete methods replaced by createPersistent() and createTransient() obsolete.
virtual StatusCode transToPers (TRANS *obj, PERS *&persObj)=0
virtual StatusCode persToTrans (xAOD::ShallowAuxContainer *&, xAOD::ShallowAuxContainer *) override
 obsolete
virtual StatusCode persToTrans (TRANS *&transObj, PERS *obj)=0
virtual StatusCode DataObjectToPool (IOpaqueAddress *pAddr, DataObject *pObj) override
 Write an object into POOL.
virtual StatusCode PoolToDataObject (DataObject *&pObj, const Token *token, const std::string &key) override
 Read an object from POOL.
virtual StatusCode cleanUp (const std::string &output) override
 Callback from the CleanupSvc to delete persistent object in the local list.
virtual StatusCode initialize ()
 Gaudi Service Interface method implementations:
Placement setPlacementForP (P &p, const std::string &key, const std::string &output)
 Set POOL placement for type P.
StatusCode objectToPool (P *pObj, std::unique_ptr< Token > &token, const std::string &key, const std::string &output)
 Write an object into POOL returning its token.
StatusCode poolToObject (const Token *token, P *&pObj)
 Read an object from POOL.
virtual bool compareClassGuid (const Token *token, const Guid &clid) const
 Compare POOL class GUID with the one of the object being read.
virtual Placement setPlacement (const std::string &key, const std::string &output)
 Set POOL placement.
virtual Placement setPlacementWithType (const std::string &tname, const std::string &key, const std::string &output)
 Set POOL placement hint for a given type.

Protected Attributes

SG::SlotSpecificObj< PersObjCache_t, SG::InvalidSlot::Enabled > m_persObjLists
std::mutex m_pListMutex
 protection mutex for m_persObjLists
RootType m_classDesc
ServiceHandle< StoreGateSvc > m_detStore
ServiceHandle< IAthenaPoolCnvSvc > m_athenaPoolCnvSvc
CallMutex m_conv_mut

Private Types

typedef std::map< std::string, RootType > ClassMap

Private Member Functions

void initMessaging () const
 Initialize our message level and MessageSvc.

Private Attributes

std::string m_className
ClassMap m_classDescs
std::string m_nm
 Message source name.
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels).
std::atomic< IMessageSvc * > m_imsg
 MessageSvc pointer.
std::atomic< MSG::Level > m_lvl
 Current logging level.
std::atomic_flag m_initialized ATLAS_THREAD_SAFE
 Messaging initialized (initMessaging).

Detailed Description

POOL converter for the xAOD::ShallowAuxContainer class.

   This is the converter doing the actual schema evolution
   of the package... 
Author
Will Buttinger will@.nosp@m.cern.nosp@m..ch

Definition at line 28 of file xAODShallowAuxContainerCnv.h.

Member Typedef Documentation

◆ BaseType

◆ CallMutex

typedef std::mutex AthenaPoolConverter::CallMutex
protectedinherited

Definition at line 110 of file AthenaPoolConverter.h.

◆ ClassMap

typedef std::map<std::string, RootType> T_AthenaPoolCustCnv< xAOD::ShallowAuxContainer, xAOD::ShallowAuxContainer >::ClassMap
privateinherited

Definition at line 86 of file T_AthenaPoolCustCnv.h.

◆ PersObjCache_t

Local cache for persistent objects created by this converter, grouped by processing slot These objects are deleted after a commit.

Definition at line 116 of file T_AthenaPoolCustomCnv.h.

Constructor & Destructor Documentation

◆ xAODShallowAuxContainerCnv()

xAODShallowAuxContainerCnv::xAODShallowAuxContainerCnv ( ISvcLocator * svcLoc)

Converter constructor.

Definition at line 13 of file xAODShallowAuxContainerCnv.cxx.

13 :
15
16}
T_AthenaPoolCustomCnvWithKey< xAOD::ShallowAuxContainer, xAOD::ShallowAuxContainer > xAODShallowAuxContainerCnvBase
Base class for the converter.

Member Function Documentation

◆ classID()

Returns
class ID.

◆ cleanUp()

virtual StatusCode T_AthenaPoolCustomCnvWithKey< xAOD::ShallowAuxContainer, xAOD::ShallowAuxContainer >::cleanUp ( const std::string & output)
overrideprotectedvirtualinherited

Callback from the CleanupSvc to delete persistent object in the local list.

Reimplemented from AthenaPoolConverter.

◆ compareClassGuid()

virtual bool T_AthenaPoolCustCnv< xAOD::ShallowAuxContainer, xAOD::ShallowAuxContainer >::compareClassGuid ( const Token * token,
const Guid & clid ) const
protectedvirtualinherited

Compare POOL class GUID with the one of the object being read.

Parameters
clid[IN] GUID to compare
Returns
true if the type of the object about to be read matches the GUID

◆ createObj()

StatusCode AthenaPoolConverter::createObj ( IOpaqueAddress * pAddr,
DataObject *& pObj )
overridevirtualinherited

Create a transient object from a POOL persistent representation.

Parameters
pAddr[IN] IOpaqueAddress of POOL persistent representation.
pObj[OUT] pointer to the transient object.

Definition at line 55 of file AthenaPoolConverter.cxx.

52 {
53 TokenAddress* tokAddr = dynamic_cast<TokenAddress*>(pAddr);
54
55 bool ownTokAddr = false;
56 if (tokAddr == nullptr || tokAddr->getToken() == nullptr) {
57 ownTokAddr = true;
59 token->fromString(*(pAddr->par()));
60 GenericAddress* genAddr = dynamic_cast<GenericAddress*>(pAddr);
61 if (not genAddr){
62 ATH_MSG_ERROR("Dynamic cast failed in AthenaPoolConverter::createObj");
63 //clean up
65 }
67 }
68 if( tokAddr->ipar()[0] > 0 and tokAddr->getToken()->auxString().empty() ) {
69 tokAddr->getToken()->setAuxString(CxxUtils::HexString<"[CTXT={}]">(static_cast<int>(*(pAddr->ipar()))));
70 }
71 ATH_MSG_VERBOSE("createObj: " << tokAddr->getToken()->toString() << ", CTX=" << tokAddr->ipar()[0]
72 << ", auxStr=" << tokAddr->getToken()->auxString() );
73 try {
74 std::string key = pAddr->par()[1];
75 if (!PoolToDataObject(pObj, tokAddr->getToken(), key).isSuccess()) {
76 ATH_MSG_ERROR("createObj PoolToDataObject() failed, Token = " << (tokAddr->getToken() ? tokAddr->getToken()->toString() : "NULL"));
77 pObj = nullptr;
78 }
79 } catch (std::exception& e) {
80 ATH_MSG_ERROR("createObj - caught exception: " << e.what());
81 pObj = nullptr;
82 }
83 if (pObj == nullptr) {
84 ATH_MSG_ERROR("createObj failed to get DataObject, Token = " << (tokAddr->getToken() ? tokAddr->getToken()->toString() : "NULL"));
85 }
86 if (ownTokAddr) {
87 delete tokAddr; tokAddr = nullptr;
88 }
89 if (pObj == nullptr) {
91 }
93}
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_VERBOSE(x,...)
This templated class extends T_AthenaPoolCustCnv to provide management of the persistent objects crea...
virtual StatusCode PoolToDataObject(DataObject *&pObj, const Token *token, const std::string &key) override

◆ createPersistentWithKey()

xAOD::ShallowAuxContainer * xAODShallowAuxContainerCnv::createPersistentWithKey ( xAOD::ShallowAuxContainer * trans,
const std::string & key )
overrideprotectedvirtual

Function preparing the container to be written out.

Here follows a specialized version of the copyAuxStoreThinned method, with a few changes for shallow aux containers

End of specialized thinning

Implements T_AthenaPoolCustomCnvWithKey< xAOD::ShallowAuxContainer, xAOD::ShallowAuxContainer >.

Definition at line 19 of file xAODShallowAuxContainerCnv.cxx.

21{
22// std::cout << "Thinning shallow aux, size = " << trans->size() << std::endl;
23 if (trans->size() > 0) {
24
25
27 const xAOD::ShallowAuxContainer& orig = *trans; //need the 'const' version to ensure use the const methods!
28 size_t size = orig.size();
29 size_t nremaining = size;
30
31 std::string key2 = key;
32 if (key2.size() >= 4 && key2.substr (key2.size()-4, 4) == "Aux.")
33 {
34 key2.erase (key2.size()-4, 4);
35 }
36 const SG::ThinningInfo* info = SG::getThinningInfo (key2);
37 const SG::ThinningDecisionBase* dec = info ? info->m_decision : nullptr;
38 if (dec) {
39 nremaining = dec->thinnedSize();
40 }
41
42 //if there is no thinning to do, then just return a regular copy
43 // Be sure to also check for variable vetoes.
44 if(!dec) {
45 SG::auxid_set_t ids;
46 if (info) {
47 ids = orig.getSelectedAuxIDs();
48 ids &= info->m_vetoed;
49 }
50 if (ids.empty()) {
51 return new xAOD::ShallowAuxContainer(orig);
52 }
53 }
54 xAOD::ShallowAuxContainer* newcont = new xAOD::ShallowAuxContainer; //dont use copy constructor (like copyThinned.h), want it to have it's own internal store
55 newcont->setParent(trans->parent());
56
57 // newcont should be set for shallow IO regardless of the setting
58 // of the original container. Below we're going to copy all the
59 // variables that should be written. Any variables left in the
60 // parent that are not also in newcont are ones that were
61 // explicitly vetoed.
62 newcont->setShallowIO(true);
63
64 // Access the auxiliary type registry:
65 SG::AuxTypeRegistry& r = SG::AuxTypeRegistry::instance();
66 // The auxiliary IDs that the original container has:
67 SG::auxid_set_t auxids = orig.getDynamicAuxIDs(); //all ids of a shallow container are dynamic, don't look at the parents unless not in shallow IO mode //orig.getAuxIDs();
68 SG::auxid_set_t sel_auxids = orig.getSelectedAuxIDs();
69
70 newcont->getStore()->resize(nremaining); //had to access underlying store directly, can't call 'resize' on container
71
72 SG::AuxVectorInterface dstIface (*newcont->getStore());
73 SG::AuxVectorInterface srcIface (orig);
74
75 // Loop over all the variables of the original container:
76 for (SG::auxid_t auxid : auxids) {
77 // Skip null auxids (happens if we don't have the dictionary)
78 if(auxid == SG::null_auxid) continue;
79 // Skip non-selected dynamic variables.
80 if (info && info->vetoed (auxid)) continue;
81 if (sel_auxids.count(auxid) == 0) continue;
82 // Create the target variable:
83 (void)newcont->getStore()->getData (auxid, nremaining, nremaining); //use store's getData directly, not the container's getData ... saves on a copy!
84
85 // Access the source variable:
86 const void* src = orig.getData (auxid);
87
88 if (!src) continue;
89
90 // Copy over all elements.
91 if (nremaining == size) {
92 // No thinning.
93 r.copyForOutput (auxid, dstIface, 0, srcIface, 0, size);
94 }
95 else {
96 // Thinning
97 for (std::size_t isrc = 0, idst = 0; isrc < size; ++isrc) {
98 if ( ! (dec && dec->thinned(isrc)) ) {
99 r.copyForOutput (auxid, dstIface, idst, srcIface, isrc, 1);
100 ++idst;
101 }
102 }
103 }
104 }
106
107/* HERE is the old code which is non optimal, but functional if modification to 'resize' method of shallowauxcontainer is made
108 newcont->setShallowIO(false); //necessary so that branch selections work
109 copyAuxStoreThinned (*trans, *newcont, dec); //FIXME: In this methods call to 'getData' it ends up doing an unnecessary copy of the parent store's values!
110*/ // std::cout << " Thinned size = " << newcont->size() << std::endl;
111 return newcont;
112 }
113 return new xAOD::ShallowAuxContainer(*trans);
114}
size_t size() const
Number of registered mappings.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
virtual bool resize(size_t sz)=0
Change the size of all aux data vectors.
virtual void * getData(auxid_t auxid, size_t size, size_t capacity)=0
Return the data vector for one aux data item.
bool thinned(size_t ndx) const
Return true if element ndx should be thinned.
size_t thinnedSize() const
Return the size of the container being thinned after thinning.
virtual const void * getData(auxid_t auxid) const override
Get a pointer to a given array.
void setParent(const DataLink< SG::IConstAuxStore > &link)
Set the parent store.
virtual const auxid_set_t & getDynamicAuxIDs() const override
Get the types(names) of variables created dynamically.
virtual SG::IAuxStore * getStore() override
Get the currently used internal store object.
virtual size_t size() const override
Get the size of the container.
void setShallowIO(bool value)
Set whether only the overriden parameters should be written out.
virtual auxid_set_t getSelectedAuxIDs() const override
Get the IDs of the selected dynamic Aux variables (for writing).
TH1F * trans(TH1F *h, bool t=false)
int r
Definition globals.cxx:22
static const auxid_t null_auxid
To signal no aux data item.
Definition AuxTypes.h:30
const SG::ThinningInfo * getThinningInfo(const EventContext &ctx, const std::string &key)
Retrieve the current thinning information for key.
size_t auxid_t
Identifier for a particular aux data item.
Definition AuxTypes.h:27

◆ createRep()

StatusCode AthenaPoolConverter::createRep ( DataObject * pObj,
IOpaqueAddress *& pAddr )
overridevirtualinherited

Create a POOL persistent representation for a transient object.

Parameters
pObj[IN] pointer to the transient object.
pAddr[OUT] IOpaqueAddress of POOL persistent representation.

Definition at line 60 of file AthenaPoolConverter.cxx.

95 {
96 const SG::DataProxy* proxy = dynamic_cast<SG::DataProxy*>(pObj->registry());
97 if (proxy == nullptr) {
98 ATH_MSG_ERROR("AthenaPoolConverter CreateRep failed to cast DataProxy, key = " << pObj->name());
100 }
101 const CLID clid = proxy->clID();
102 if (pAddr == nullptr) {
103 // Create a IOpaqueAddress for this object.
104 pAddr = new TokenAddress(this->storageType(), clid, "", "", 0, 0);
105 } else {
106 GenericAddress* gAddr = dynamic_cast<GenericAddress*>(pAddr);
107 if (gAddr != nullptr) {
108 gAddr->setSvcType(this->storageType());
109 }
110 }
111 return StatusCode::SUCCESS;
112}

◆ createTransientWithKey()

xAOD::ShallowAuxContainer * xAODShallowAuxContainerCnv::createTransientWithKey ( const Token * token,
const std::string & key )
overrideprotectedvirtual

Function reading in the object from the input file.

Implements T_AthenaPoolCustomCnvWithKey< xAOD::ShallowAuxContainer, xAOD::ShallowAuxContainer >.

Definition at line 117 of file xAODShallowAuxContainerCnv.cxx.

117 {
118 xAOD::ShallowAuxContainer* o = poolReadObject<xAOD::ShallowAuxContainer>(token);
119 o->toTransient (Gaudi::Hive::currentContext());
120 return o;
121}
virtual void toTransient(const EventContext &ctx) override
Perform processing on aux variable objects just after reading to make them usable as transient object...

◆ DataObjectToPool()

virtual StatusCode T_AthenaPoolCustomCnvWithKey< xAOD::ShallowAuxContainer, xAOD::ShallowAuxContainer >::DataObjectToPool ( IOpaqueAddress * pAddr,
DataObject * pObj )
overrideprotectedvirtualinherited

Write an object into POOL.

Parameters
pObj[IN] pointer to the transient object.
key[IN] StoreGate key (string) - placement hint to generate POOL container name

Reimplemented from T_AthenaPoolCustCnv< TRANS, PERS >.

◆ detStore()

Handle to DetectorStore.

Definition at line 68 of file AthenaPoolConverter.h.

◆ fillRepRefs()

StatusCode AthenaPoolConverter::fillRepRefs ( IOpaqueAddress * pAddr,
DataObject * pObj )
overridevirtualinherited

Create a POOL persistent representation for a transient object.

Parameters
pAddr[IN] IOpaqueAddress of POOL persistent representation.
pObj[IN] pointer to the transient object.

Definition at line 65 of file AthenaPoolConverter.cxx.

114 {
115 try {
117 ATH_MSG_ERROR("FillRepRefs failed, key = " << pObj->name());
118 return StatusCode::FAILURE;
119 }
120 } catch (std::exception& e) {
121 ATH_MSG_ERROR("fillRepRefs - caught exception: " << e.what());
122 return StatusCode::FAILURE;
123 }
124 return StatusCode::SUCCESS;
125}
virtual StatusCode DataObjectToPool(IOpaqueAddress *pAddr, DataObject *pObj) override

◆ finalize()

StatusCode AthenaPoolConverter::finalize ( )
overridevirtualinherited

Definition at line 48 of file AthenaPoolConverter.cxx.

40 {
41 // Release AthenaPoolCnvSvc
42 if (!m_athenaPoolCnvSvc.release().isSuccess()) {
43 ATH_MSG_WARNING("Cannot release AthenaPoolCnvSvc.");
44 }
45 return(::Converter::finalize());
46}
#define ATH_MSG_WARNING(x,...)

◆ initialize()

virtual StatusCode T_AthenaPoolCustCnv< xAOD::ShallowAuxContainer, xAOD::ShallowAuxContainer >::initialize ( )
protectedvirtualinherited

Gaudi Service Interface method implementations:

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 121 of file AthMessaging.cxx.

40{
42 // If user did not set an explicit level, set a default
43 if (m_lvl == MSG::NIL) {
44 m_lvl = m_imsg ?
45 static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
46 MSG::INFO;
47 }
48}
IMessageSvc * getMessageSvc(bool quiet=false)

◆ keepPoolObj()

void T_AthenaPoolCustomCnvWithKey< xAOD::ShallowAuxContainer, xAOD::ShallowAuxContainer >::keepPoolObj ( xAOD::ShallowAuxContainer * obj,
const std::string & output )
protectedinherited

Remember the POOL object to be written out (will be deleted after commit).

Parameters
obj[IN] persistent object

◆ msg() [1/2]

MsgStream & AthMessaging::msg ( ) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 92 of file AthMessaging.h.

168{
169 MsgStream* ms = m_msg_tls.get();
170 if (!ms) {
171 if (!m_initialized.test_and_set()) initMessaging();
172 ms = new MsgStream(m_imsg,m_nm);
173 m_msg_tls.reset( ms );
174 }
175
176 ms->setLevel (m_lvl);
177 return *ms;
178}
void setLevel(MSG::Level lvl)
Change the current logging level.

◆ msg() [2/2]

MsgStream & AthMessaging::msg ( const MSG::Level lvl) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 99 of file AthMessaging.h.

◆ msgLvl()

bool AthMessaging::msgLvl ( const MSG::Level lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 86 of file AthMessaging.h.

152{
153 // If user did not set explicit message level we have to initialize
154 // the messaging and retrieve the default via the MessageSvc.
155 if (m_lvl==MSG::NIL && !m_initialized.test_and_set()) initMessaging();
156
157 if (m_lvl <= lvl) {
158 msg() << lvl;
159 return true;
160 } else {
161 return false;
162 }
163}

◆ objectToPool()

StatusCode T_AthenaPoolCustCnv< xAOD::ShallowAuxContainer, xAOD::ShallowAuxContainer >::objectToPool ( P * pObj,
std::unique_ptr< Token > & token,
const std::string & key,
const std::string & output )
protectedinherited

Write an object into POOL returning its token.

Parameters
pObj[IN] pointer to the object to be written.
token[OUT] POOL token of the persistent representation.
key[IN] StoreGate key (string) - placement hint to generate POOL container name

◆ persToTrans() [1/2]

template<class TRANS, class PERS>
virtual StatusCode T_AthenaPoolCustCnv< TRANS, PERS >::persToTrans ( TRANS *& transObj,
PERS * obj )
protectedpure virtualinherited

Implemented in CaloTTOnAttrIdMapCnv, CaloTTOnOffIdMapCnv, CaloTTPpmRxIdMapCnv, LArTTCellMapCnv, MuonRdoContainerCnv< T >, T_AthenaPoolCoolMultChanCnv< COLL_T, ELEM_T, ELEM_P >, T_AthenaPoolCoolMultChanCnv< LArHVScaleCorrComplete, LArConditionsSubset< LArSingleFloatP >, LArSingleFloatSubset_p1 >, T_AthenaPoolCustomCnvWithKey< TRANS, PERS >, T_AthenaPoolCustomCnvWithKey< AFP_SiDigiCollection, AFP_SiDigiCollection_PERS >, T_AthenaPoolCustomCnvWithKey< AFP_SIDLocRecoEvCollection, AFP_SIDLocRecoEvCollection_PERS >, T_AthenaPoolCustomCnvWithKey< AFP_SIDSimHitCollection, AFP_SIDSimHitCollection_PERS >, T_AthenaPoolCustomCnvWithKey< AFP_TDDigiCollection, AFP_TDDigiCollection_PERS >, T_AthenaPoolCustomCnvWithKey< AFP_TDLocRecoEvCollection, AFP_TDLocRecoEvCollection_PERS >, T_AthenaPoolCustomCnvWithKey< AFP_TDSimHitCollection, AFP_TDSimHitCollection_PERS >, T_AthenaPoolCustomCnvWithKey< ALFA_CLinkEvent, ALFA_CLinkEvent_PERS >, T_AthenaPoolCustomCnvWithKey< ALFA_DigitCollection, ALFA_DigitCollection_PERS >, T_AthenaPoolCustomCnvWithKey< ALFA_GloRecEvCollection, ALFA_GloRecEvCollection_PERS >, T_AthenaPoolCustomCnvWithKey< ALFA_HitCollection, ALFA_HitCollection_PERS >, T_AthenaPoolCustomCnvWithKey< ALFA_LocRecCorrEvCollection, ALFA_LocRecCorrEvCollection_PERS >, T_AthenaPoolCustomCnvWithKey< ALFA_LocRecCorrODEvCollection, ALFA_LocRecCorrODEvCollection_PERS >, T_AthenaPoolCustomCnvWithKey< ALFA_LocRecEvCollection, ALFA_LocRecEvCollection_PERS >, T_AthenaPoolCustomCnvWithKey< ALFA_LocRecODEvCollection, ALFA_LocRecODEvCollection_PERS >, T_AthenaPoolCustomCnvWithKey< ALFA_ODDigitCollection, ALFA_ODDigitCollection_PERS >, T_AthenaPoolCustomCnvWithKey< ALFA_ODHitCollection, ALFA_ODHitCollection_PERS >, T_AthenaPoolCustomCnvWithKey< AthExDecay, AthExDecay_PERS >, T_AthenaPoolCustomCnvWithKey< AthExElephantino, AthExElephantino_PERS >, T_AthenaPoolCustomCnvWithKey< AthExFatObject, AthExFatObject_PERS >, T_AthenaPoolCustomCnvWithKey< BCM_RDO_Container, BCM_RDO_Container_p0 >, T_AthenaPoolCustomCnvWithKey< CaloCalibrationHitContainer, CaloCalibrationHitContainer_PERS >, T_AthenaPoolCustomCnvWithKey< INav4MomAssocs, INav4MomAssocs_PERS >, T_AthenaPoolCustomCnvWithKey< INav4MomLinkContainer, INav4MomLinkContainer_PERS >, T_AthenaPoolCustomCnvWithKey< InDet::InDetLowBetaCandidate, InDetLowBetaCandidate_PERS >, T_AthenaPoolCustomCnvWithKey< IParticleLinkContainer, IParticleLinkContainer_PERS >, T_AthenaPoolCustomCnvWithKey< LArHitContainer, LArHitContainer_PERS >, T_AthenaPoolCustomCnvWithKey< LArHitFloatContainer, LArHitContainer_PERS >, T_AthenaPoolCustomCnvWithKey< LArTTL1Container, LArTTL1Container_PERS >, T_AthenaPoolCustomCnvWithKey< McEventCollection, McEventCollection_PERS >, T_AthenaPoolCustomCnvWithKey< MuonCaloEnergyContainer, MuonCaloEnergyContainer_PERS >, T_AthenaPoolCustomCnvWithKey< RingerRings, RingerRings_PERS >, T_AthenaPoolCustomCnvWithKey< SiHitCollection, SiHitCollection_PERS >, T_AthenaPoolCustomCnvWithKey< SimulationHitCollection, SimulationHitCollection_PERS >, T_AthenaPoolCustomCnvWithKey< SrCaloCalibrationHitContainer, SrCaloCalibrationHitContainer_PERS >, T_AthenaPoolCustomCnvWithKey< T, P >, T_AthenaPoolCustomCnvWithKey< TileBeamElemContainer, TileBeamElemContainer_PERS >, T_AthenaPoolCustomCnvWithKey< TileCosmicMuonContainer, TileCosmicMuonContainer_PERS >, T_AthenaPoolCustomCnvWithKey< TileDigitsContainer, TileDigitsContainer_PERS >, T_AthenaPoolCustomCnvWithKey< TileHitContainer, TileHitContainer_PERS >, T_AthenaPoolCustomCnvWithKey< TileHitVector, TileHitVector_PERS >, T_AthenaPoolCustomCnvWithKey< TileL2Container, TileL2Container_PERS >, T_AthenaPoolCustomCnvWithKey< TileMuContainer, TileMuContainer_PERS >, T_AthenaPoolCustomCnvWithKey< TileMuonReceiverContainer, TileMuonReceiverContainer_PERS >, T_AthenaPoolCustomCnvWithKey< TileRawChannelContainer, TileRawChannelContainer_PERS >, T_AthenaPoolCustomCnvWithKey< TileTTL1Container, TileTTL1Container_PERS >, T_AthenaPoolCustomCnvWithKey< TrackRecordCollection, TrackRecordCollection_PERS >, T_AthenaPoolCustomCnvWithKey< TRANS, TPCNV_CUR::Pers_t >, T_AthenaPoolCustomCnvWithKey< TrigEMCluster, TrigEMCluster_PERS >, T_AthenaPoolCustomCnvWithKey< TrigOperationalInfo, TrigOperationalInfo_PERS >, T_AthenaPoolCustomCnvWithKey< TrigOperationalInfoCollection, TrigOperationalInfoCollection_PERS >, T_AthenaPoolCustomCnvWithKey< TrigRNNOutput, TrigRNNOutput_PERS >, T_AthenaPoolCustomCnvWithKey< TrigRoiDescriptor, TrigRoiDescriptor_PERS >, T_AthenaPoolCustomCnvWithKey< TrigRoiDescriptorCollection, TrigRoiDescriptorCollection_PERS >, T_AthenaPoolCustomCnvWithKey< TrigTauCluster, TrigTauCluster_PERS >, T_AthenaPoolCustomCnvWithKey< TrigTauClusterDetails, TrigTauClusterDetails_PERS >, T_AthenaPoolCustomCnvWithKey< TRTUncompressedHitCollection, TRT_HitCollection_PERS >, T_AthenaPoolCustomCnvWithKey< TruthEtIsolationsContainer, TruthEtIsolationsContainer_PERS >, T_AthenaPoolCustomCnvWithKey< TruthParticleContainer, TruthParticleContainer_PERS >, T_AthenaPoolCustomCnvWithKey< ViewVector< DV >, ViewVector< DV > >, T_AthenaPoolCustomCnvWithKey< ZdcRawChannelCollection, ZdcRawChannelCollection_PERS >, and T_LArCondAthenaPoolCnv< T >.

◆ persToTrans() [2/2]

virtual StatusCode T_AthenaPoolCustomCnvWithKey< xAOD::ShallowAuxContainer, xAOD::ShallowAuxContainer >::persToTrans ( xAOD::ShallowAuxContainer *& ,
xAOD::ShallowAuxContainer *  )
inlineoverrideprotectedvirtualinherited

obsolete

Definition at line 97 of file T_AthenaPoolCustomCnv.h.

97{ return(StatusCode::FAILURE); }

◆ poolReadObject() [1/2]

Read object of type P.

This is an exception-throwing version of poolToObject() plus reading of all extending objects. Version 1 - (see createTransient() above)

Returns
object read from POOL (by pointer)

◆ poolReadObject() [2/2]

void T_AthenaPoolCustomCnvWithKey< xAOD::ShallowAuxContainer, xAOD::ShallowAuxContainer >::poolReadObject ( TopLevelTPCnvBase & tlp_converter,
const Token * token )
protectedinherited

Read object of type P (plus all extending objects) using the indicated top-level TP converter.

Version 2 - (see createTransient() above) NOTE: the TLP converter will delete the persistent object after createTransient()

Parameters
tlp_converter[IN] top-level TP converter to be used when reading

◆ PoolToDataObject()

virtual StatusCode T_AthenaPoolCustomCnvWithKey< xAOD::ShallowAuxContainer, xAOD::ShallowAuxContainer >::PoolToDataObject ( DataObject *& pObj,
const Token * token,
const std::string & key )
overrideprotectedvirtualinherited

Read an object from POOL.

Parameters
pObj[OUT] pointer to the transient object.
token[IN] POOL token of the persistent representation.
key[IN] SG key of the object being read.

Reimplemented from T_AthenaPoolCustCnv< TRANS, PERS >.

◆ poolToObject()

StatusCode T_AthenaPoolCustCnv< xAOD::ShallowAuxContainer, xAOD::ShallowAuxContainer >::poolToObject ( const Token * token,
P *& pObj )
protectedinherited

Read an object from POOL.

Parameters
token[IN] POOL token of the persistent representation.
pObj[OUT] pointer to the object read.

◆ repSvcType()

long AthenaPoolConverter::repSvcType ( ) const
overridevirtualinherited

Definition at line 50 of file AthenaPoolConverter.cxx.

48 {
49 return pool::POOL_StorageType.type();
50}

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 108 of file AthMessaging.cxx.

29{
30 m_lvl = lvl;
31}

◆ setPlacement()

virtual Placement T_AthenaPoolCnvBase< xAOD::ShallowAuxContainer >::setPlacement ( const std::string & key,
const std::string & output )
protectedvirtualinherited

Set POOL placement.

◆ setPlacementForP()

Placement T_AthenaPoolCustCnv< xAOD::ShallowAuxContainer, xAOD::ShallowAuxContainer >::setPlacementForP ( P & p,
const std::string & key,
const std::string & output )
protectedinherited

Set POOL placement for type P.

◆ setPlacementWithType()

Placement AthenaPoolConverter::setPlacementWithType ( const std::string & tname,
const std::string & key,
const std::string & output )
protectedvirtualinherited

Set POOL placement hint for a given type.

Parameters
tname[IN] type name.
key[IN] SG key.

Definition at line 100 of file AthenaPoolConverter.cxx.

140 {
141 // Resulting placement
143
144 // Extract the file name and global technology (if available)
147 placement.setFileName(outputConnectionSpec);
148
149 // Override streaming parameters from StreamTool if requested.
156 while (pos1 != std::string::npos) {
157 const std::string::size_type pos2 = output.find('=', pos1);
158 const std::string thisKey = output.substr(pos1 + 1, pos2 - pos1 - 1);
159 const std::string::size_type pos3 = output.find(']', pos2);
160 const std::string value = output.substr(pos2 + 1, pos3 - pos2 - 1);
161 if (thisKey == "OutputCollection") {
163 } else if (thisKey == "PoolContainerPrefix") {
165 } else if (thisKey == "TopLevelContainerName") {
167 } else if (thisKey == "SubLevelBranchName") {
169 } else if (thisKey == "PoolContainerFriendPostfix") {
171 }
172 pos1 = output.find('[', pos3);
173 }
174
175 // Extract the technology from the container prefix (if available)
176 if (auto colonPost = containerPrefix.find(':'); colonPost != std::string::npos) {
177 placement.setTechnology(pool::DbType::getType(containerPrefix.substr(0, colonPost)).type());
178 containerPrefix.erase(0, colonPost + 1); // Note that DataHeader and EventTag bypass this...
179 }
180
181 // --- Special types: DataHeader & Form
182 if ( tname.starts_with(APRDefaults::DataHeaderTypeName) ) {
183 containerName = std::format("{}{}({}{})",
185 tname.starts_with(APRDefaults::DataHeaderFormTypeName) ? "Form" : "",
186 key.back() == '/' ? key : "",
187 tname);
188 }
189 // AttributeList - writing attributes separately to EventTag container group
190 else if ( tname.starts_with(APRDefaults::EventTagTypeName) ) {
191 containerName = std::format("{}({})",
193 key);
194 }
195 // all other object types
196 else {
197 constexpr std::string_view typeTok = "<type>", keyTok = "<key>";
198 containerName = std::format("{}{}{}{}",
202 branchNameHint.empty() ? "" : std::format("({})", branchNameHint));
203 if (auto pos = containerName.find(typeTok); pos != std::string::npos) {
204 containerName.replace(pos, typeTok.size(), tname);
205 }
206 if (auto pos = containerName.find(keyTok); pos != std::string::npos) {
207 containerName.replace(pos, keyTok.size(), key.empty() ? tname : key);
208 }
209 }
210
211 // Set the container name
212 placement.setContainerName(containerName);
213 return(placement);
214}
const char * getEventDataName()
const char * getDataHeaderName()

◆ storageType()

long AthenaPoolConverter::storageType ( )
staticinherited
Returns
storage type.

Definition at line 71 of file AthenaPoolConverter.cxx.

127 {
128 return pool::POOL_StorageType.type();
129}

◆ transToPers() [1/2]

template<class TRANS, class PERS>
virtual StatusCode T_AthenaPoolCustCnv< TRANS, PERS >::transToPers ( TRANS * obj,
PERS *& persObj )
protectedpure virtualinherited

Implemented in CaloTTOnAttrIdMapCnv, CaloTTOnOffIdMapCnv, CaloTTPpmRxIdMapCnv, LArTTCellMapCnv, MuonRdoContainerCnv< T >, T_AthenaPoolCoolMultChanCnv< COLL_T, ELEM_T, ELEM_P >, T_AthenaPoolCoolMultChanCnv< LArHVScaleCorrComplete, LArConditionsSubset< LArSingleFloatP >, LArSingleFloatSubset_p1 >, T_AthenaPoolCustomCnvWithKey< TRANS, PERS >, T_AthenaPoolCustomCnvWithKey< AFP_SiDigiCollection, AFP_SiDigiCollection_PERS >, T_AthenaPoolCustomCnvWithKey< AFP_SIDLocRecoEvCollection, AFP_SIDLocRecoEvCollection_PERS >, T_AthenaPoolCustomCnvWithKey< AFP_SIDSimHitCollection, AFP_SIDSimHitCollection_PERS >, T_AthenaPoolCustomCnvWithKey< AFP_TDDigiCollection, AFP_TDDigiCollection_PERS >, T_AthenaPoolCustomCnvWithKey< AFP_TDLocRecoEvCollection, AFP_TDLocRecoEvCollection_PERS >, T_AthenaPoolCustomCnvWithKey< AFP_TDSimHitCollection, AFP_TDSimHitCollection_PERS >, T_AthenaPoolCustomCnvWithKey< ALFA_CLinkEvent, ALFA_CLinkEvent_PERS >, T_AthenaPoolCustomCnvWithKey< ALFA_DigitCollection, ALFA_DigitCollection_PERS >, T_AthenaPoolCustomCnvWithKey< ALFA_GloRecEvCollection, ALFA_GloRecEvCollection_PERS >, T_AthenaPoolCustomCnvWithKey< ALFA_HitCollection, ALFA_HitCollection_PERS >, T_AthenaPoolCustomCnvWithKey< ALFA_LocRecCorrEvCollection, ALFA_LocRecCorrEvCollection_PERS >, T_AthenaPoolCustomCnvWithKey< ALFA_LocRecCorrODEvCollection, ALFA_LocRecCorrODEvCollection_PERS >, T_AthenaPoolCustomCnvWithKey< ALFA_LocRecEvCollection, ALFA_LocRecEvCollection_PERS >, T_AthenaPoolCustomCnvWithKey< ALFA_LocRecODEvCollection, ALFA_LocRecODEvCollection_PERS >, T_AthenaPoolCustomCnvWithKey< ALFA_ODDigitCollection, ALFA_ODDigitCollection_PERS >, T_AthenaPoolCustomCnvWithKey< ALFA_ODHitCollection, ALFA_ODHitCollection_PERS >, T_AthenaPoolCustomCnvWithKey< AthExDecay, AthExDecay_PERS >, T_AthenaPoolCustomCnvWithKey< AthExElephantino, AthExElephantino_PERS >, T_AthenaPoolCustomCnvWithKey< AthExFatObject, AthExFatObject_PERS >, T_AthenaPoolCustomCnvWithKey< BCM_RDO_Container, BCM_RDO_Container_p0 >, T_AthenaPoolCustomCnvWithKey< CaloCalibrationHitContainer, CaloCalibrationHitContainer_PERS >, T_AthenaPoolCustomCnvWithKey< INav4MomAssocs, INav4MomAssocs_PERS >, T_AthenaPoolCustomCnvWithKey< INav4MomLinkContainer, INav4MomLinkContainer_PERS >, T_AthenaPoolCustomCnvWithKey< InDet::InDetLowBetaCandidate, InDetLowBetaCandidate_PERS >, T_AthenaPoolCustomCnvWithKey< IParticleLinkContainer, IParticleLinkContainer_PERS >, T_AthenaPoolCustomCnvWithKey< LArHitContainer, LArHitContainer_PERS >, T_AthenaPoolCustomCnvWithKey< LArHitFloatContainer, LArHitContainer_PERS >, T_AthenaPoolCustomCnvWithKey< LArTTL1Container, LArTTL1Container_PERS >, T_AthenaPoolCustomCnvWithKey< McEventCollection, McEventCollection_PERS >, T_AthenaPoolCustomCnvWithKey< MuonCaloEnergyContainer, MuonCaloEnergyContainer_PERS >, T_AthenaPoolCustomCnvWithKey< RingerRings, RingerRings_PERS >, T_AthenaPoolCustomCnvWithKey< SiHitCollection, SiHitCollection_PERS >, T_AthenaPoolCustomCnvWithKey< SimulationHitCollection, SimulationHitCollection_PERS >, T_AthenaPoolCustomCnvWithKey< SrCaloCalibrationHitContainer, SrCaloCalibrationHitContainer_PERS >, T_AthenaPoolCustomCnvWithKey< T, P >, T_AthenaPoolCustomCnvWithKey< TileBeamElemContainer, TileBeamElemContainer_PERS >, T_AthenaPoolCustomCnvWithKey< TileCosmicMuonContainer, TileCosmicMuonContainer_PERS >, T_AthenaPoolCustomCnvWithKey< TileDigitsContainer, TileDigitsContainer_PERS >, T_AthenaPoolCustomCnvWithKey< TileHitContainer, TileHitContainer_PERS >, T_AthenaPoolCustomCnvWithKey< TileHitVector, TileHitVector_PERS >, T_AthenaPoolCustomCnvWithKey< TileL2Container, TileL2Container_PERS >, T_AthenaPoolCustomCnvWithKey< TileMuContainer, TileMuContainer_PERS >, T_AthenaPoolCustomCnvWithKey< TileMuonReceiverContainer, TileMuonReceiverContainer_PERS >, T_AthenaPoolCustomCnvWithKey< TileRawChannelContainer, TileRawChannelContainer_PERS >, T_AthenaPoolCustomCnvWithKey< TileTTL1Container, TileTTL1Container_PERS >, T_AthenaPoolCustomCnvWithKey< TrackRecordCollection, TrackRecordCollection_PERS >, T_AthenaPoolCustomCnvWithKey< TRANS, TPCNV_CUR::Pers_t >, T_AthenaPoolCustomCnvWithKey< TrigEMCluster, TrigEMCluster_PERS >, T_AthenaPoolCustomCnvWithKey< TrigOperationalInfo, TrigOperationalInfo_PERS >, T_AthenaPoolCustomCnvWithKey< TrigOperationalInfoCollection, TrigOperationalInfoCollection_PERS >, T_AthenaPoolCustomCnvWithKey< TrigRNNOutput, TrigRNNOutput_PERS >, T_AthenaPoolCustomCnvWithKey< TrigRoiDescriptor, TrigRoiDescriptor_PERS >, T_AthenaPoolCustomCnvWithKey< TrigRoiDescriptorCollection, TrigRoiDescriptorCollection_PERS >, T_AthenaPoolCustomCnvWithKey< TrigTauCluster, TrigTauCluster_PERS >, T_AthenaPoolCustomCnvWithKey< TrigTauClusterDetails, TrigTauClusterDetails_PERS >, T_AthenaPoolCustomCnvWithKey< TRTUncompressedHitCollection, TRT_HitCollection_PERS >, T_AthenaPoolCustomCnvWithKey< TruthEtIsolationsContainer, TruthEtIsolationsContainer_PERS >, T_AthenaPoolCustomCnvWithKey< TruthParticleContainer, TruthParticleContainer_PERS >, T_AthenaPoolCustomCnvWithKey< ViewVector< DV >, ViewVector< DV > >, T_AthenaPoolCustomCnvWithKey< ZdcRawChannelCollection, ZdcRawChannelCollection_PERS >, and T_LArCondAthenaPoolCnv< T >.

◆ transToPers() [2/2]

virtual StatusCode T_AthenaPoolCustomCnvWithKey< xAOD::ShallowAuxContainer, xAOD::ShallowAuxContainer >::transToPers ( xAOD::ShallowAuxContainer * ,
xAOD::ShallowAuxContainer *&  )
inlineoverrideprotectedvirtualinherited

Obsolete methods replaced by createPersistent() and createTransient() obsolete.

Definition at line 95 of file T_AthenaPoolCustomCnv.h.

95{ return(StatusCode::FAILURE); }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE
mutableprivateinherited

Messaging initialized (initMessaging).

Definition at line 141 of file AthMessaging.h.

◆ m_athenaPoolCnvSvc

◆ m_classDesc

RootType T_AthenaPoolCnvBase< xAOD::ShallowAuxContainer >::m_classDesc
protectedinherited

Definition at line 58 of file T_AthenaPoolCnvBase.h.

◆ m_classDescs

Definition at line 87 of file T_AthenaPoolCustCnv.h.

◆ m_className

std::string T_AthenaPoolCustCnv< xAOD::ShallowAuxContainer, xAOD::ShallowAuxContainer >::m_className
privateinherited

Definition at line 84 of file T_AthenaPoolCustCnv.h.

◆ m_conv_mut

Definition at line 111 of file AthenaPoolConverter.h.

◆ m_detStore

Definition at line 107 of file AthenaPoolConverter.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

135{ nullptr };

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

138{ MSG::NIL };

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

MsgStream instance (a std::cout like with print-out levels).

Definition at line 132 of file AthMessaging.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_persObjLists

◆ m_pListMutex

std::mutex T_AthenaPoolCustomCnvWithKey< xAOD::ShallowAuxContainer, xAOD::ShallowAuxContainer >::m_pListMutex
protectedinherited

protection mutex for m_persObjLists

Definition at line 120 of file T_AthenaPoolCustomCnv.h.


The documentation for this class was generated from the following files: