|
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include "GaudiKernel/MsgStream.h"
29 MsgStream &
log )
const
34 <<
"Loading INav4MomAssocs from persistent state..."
38 <<
"NULL pointer to StoreGateSvc !!" <<
endmsg
39 <<
"Cannot do anything !!" <<
endmsg;
40 throw std::runtime_error(
"NULL pointer to StoreGateSvc !!");
44 for ( std::vector<std::string>::const_iterator itr = persObj->
m_assocStores.begin();
50 <<
"Could not build DataLink<INav4MomAssocs> from ["
59 std::map<std::string,const INavigable4MomentumCollection*> collections;
61 for ( INav4MomAssocs_p1::ElemLinkVect_t::const_iterator asso = persObj->
m_assocs.begin();
65 const std::pair<std::string,unsigned int>& objLink = asso->first;
66 const std::pair<std::string,unsigned int>& assLink = asso->second;
68 const std::string& objKey = objLink.first;
69 const std::string& assKey = assLink.first;
74 if ( collections.find(objKey) == collections.end() ) {
76 collections[objKey] = 0;
80 <<
"Could not retrieve INavigable4MomentumCollection at : "
83 throw std::runtime_error(
"Could not retrieve an INavigable4MomentumCollection");
86 <<
"Successfully retrieve INav4MomCollection at : "
90 collections[objKey] = coll;
93 if ( collections.find(assKey) == collections.end() ) {
98 <<
"Could not retrieve INavigable4MomentumCollection at : "
101 throw std::runtime_error(
"Could not retrieve an INavigable4MomentumCollection");
104 <<
"Successfully retrieve INav4MomCollection at : "
108 collections[assKey] = coll;
112 collections[assKey], assLink.second );
117 <<
"Loaded INav4MomAssocs from persistent state [OK]"
125 MsgStream &
log )
const
128 <<
"Creating persistent state of INav4MomAssocs..."
138 for (; begObj != endObj; ++begObj)
144 for (; begAsso != endAsso; ++begAsso) {
153 <<
"Created persistent state of INav4MomAssocs [OK]"
object_iterator beginObject() const
begin iterator for objects
const ID_type & dataID() const
Get the key that we reference, as a string.
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
object iterator for association maps (internal use only!)
object_iterator endObject() const
end iterator for objects
std::pair< Elem_t, Elem_t > ElemLink_t
StoreGateSvc * m_storeGate
Pointer to the StoreGateSvc: we need this as we'll have to fetch the INav4MomAssocs which is the pare...
bool isValid() const
Test to see if the link is dereferencable.
ElementLink implementation for ROOT usage.
virtual void transToPers(const INav4MomAssocs *transObj, INav4MomAssocs_p1 *persObj, MsgStream &log) const override
Method creating the persistent representation INav4MomAssocs_p1 from its transient representation INa...
void addAssocStore(const DataLink< INav4MomAssocs > &assocStore)
Retrieve all the associated-to objects which have been associated to the given.
std::vector< DataLink< INav4MomAssocs > > getAssocStores() const
Return links to all other association stores.
void addAssociation(const object_container_type *objectContainer, const object_index_type &objectIndex, const asso_container_type *assoContainer, const asso_index_type &assoIndex)
index_type index() const
Get the index of the element inside of its container.
INav4MomStores_t m_assocStores
AssociationVectorIterator asso_iterator
association iterator type
std::pair< std::string, unsigned int > Elem_t
virtual void persToTrans(const INav4MomAssocs_p1 *persObj, INav4MomAssocs *transObj, MsgStream &log) const override
Method creating the transient representation of INav4MomAssocs from its persistent representation INa...