ATLAS Offline Software
DataProxy.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 #include "SGTools/DataProxy.h"
10 
11 #include "GaudiKernel/DataObject.h"
12 #include "GaudiKernel/IConverter.h"
13 #include "GaudiKernel/GenericAddress.h"
14 #include "GaudiKernel/MsgStream.h"
15 #include "GaudiKernel/EventContext.h"
16 #include "GaudiKernel/GaudiException.h"
17 
19 #include "SGTools/T2pMap.h"
24 #include <algorithm>
25 #include <cassert>
26 #include <stdexcept>
27 
28 using SG::DataProxy;
30 using std::find;
31 
32 
33 namespace SG {
34  typedef IProxyDict** getDataSourcePointerFunc_t (const std::string&);
36 
37  class DataProxyHolder
38  {
39  public:
40  static void resetCachedSource();
41  };
42 }
43 
44 namespace {
45 
46 class PushStore
47 {
48 public:
49  PushStore (IProxyDict* store)
50  {
51  static std::string storeName = "StoreGateSvc";
52  m_storePtr = (*SG::getDataSourcePointerFunc) (storeName);
53  m_store = *m_storePtr;
54  if (store && store != m_store) {
55  *m_storePtr = store;
57  }
58  }
59 
60  ~PushStore()
61  {
62  if (*m_storePtr != m_store) {
63  *m_storePtr = m_store;
65  }
66  }
67 
68 private:
69  IProxyDict** m_storePtr;
70  IProxyDict* m_store;
71 };
72 
73 }
74 
75 
76 namespace {
78  template <class GAUDIREF>
79  void setGaudiRef(GAUDIREF* pgref, GAUDIREF*& pMember) {
80  if (0 != pgref) pgref->addRef();
81  if (0 != pMember) pMember->release();
82  pMember = pgref;
83  }
84 
86  template <class GAUDIREF>
87  void resetGaudiRef(GAUDIREF*& pMember) { setGaudiRef((GAUDIREF*)0, pMember); }
88 
89 } //end of unnamed namespace
90 
91 // Default Constructor
92 DataProxy::DataProxy():
93  m_refCount(0),
94  m_resetFlag(true),
95  m_boundHandles(false),
96  m_const(false),
97  m_origConst(false),
98  m_dObject(nullptr),
99  m_dataLoader(nullptr),
100  m_t2p(nullptr),
101  m_store(nullptr),
102  m_errno(ALLOK)
103 {
104 }
105 
106 // DataProxy constructor with Transient Address
107 // (typically called from Proxy Provider)
109  IConverter* svc,
110  bool constFlag, bool resetOnly)
111  : DataProxy (std::move(*tAddr),
112  svc, constFlag, resetOnly)
113 {
114  delete tAddr;
115 }
116 
117 // DataProxy constructor with Transient Address
118 // (typically called from Proxy Provider)
119 DataProxy::DataProxy(std::unique_ptr<TransientAddress> tAddr,
120  IConverter* svc,
121  bool constFlag, bool resetOnly)
122  : DataProxy (std::move(*tAddr), svc, constFlag, resetOnly)
123 {
124  //assert( tAddr->clID() != 0 );
125  if (svc) svc->addRef();
126 }
127 
129  IConverter* svc,
130  bool constFlag, bool resetOnly):
131  m_refCount(0),
132  m_resetFlag(resetOnly),
133  m_boundHandles(false),
134  m_const(constFlag),
135  m_origConst(constFlag),
136  m_dObject(0),
137  m_tAddress(std::move(tAddr)),
138  m_dataLoader(svc),
139  m_t2p(nullptr),
140  m_store(nullptr),
141  m_errno(ALLOK)
142 {
143  //assert( tAddr->clID() != 0 );
144  if (svc) svc->addRef();
145 }
146 
147 // with Data Object:
148 // (typically called from a StoreGate record
149 DataProxy::DataProxy(DataObject* dObject,
150  TransientAddress* tAddr,
151  bool constFlag, bool resetOnly):
152  m_refCount(0),
153  m_resetFlag(resetOnly),
154  m_boundHandles(false),
155  m_const(constFlag),
156  m_origConst(constFlag),
157  m_dObject(0),
158  m_tAddress(std::move(*tAddr)),
159  m_dataLoader(nullptr),
160  m_t2p(nullptr),
161  m_store(nullptr),
162  m_errno(ALLOK)
163 {
164  setObject(dObject);
165  delete tAddr;
166 }
167 
168 DataProxy::DataProxy(DataObject* dObject,
169  TransientAddress&& tAddr,
170  bool constFlag, bool resetOnly):
171  m_refCount(0),
172  m_resetFlag(resetOnly),
173  m_boundHandles(false),
174  m_const(constFlag),
175  m_origConst(constFlag),
176  m_dObject(0),
177  m_tAddress(std::move(tAddr)),
178  m_dataLoader(nullptr),
179  m_t2p(nullptr),
180  m_store(nullptr),
181  m_errno(ALLOK)
182 {
183  setObject(dObject);
184 }
185 
186 // Destructor
188 {
189  finalReset();
190 }
191 
193 {
194  lock_t lock (m_mutex);
195  m_t2p = t2p;
196 }
197 
198 
206 {
207  objLock_t objLock (m_objMutex);
208  lock_t lock (m_mutex);
209  if (!m_const) {
210  m_const = true;
211  this->lock (objLock);
212  }
213 }
214 
216  assert(ir);
217  lock_t lock (m_mutex);
218  if (ir->isSet()) {
219  return false;
220  } else {
221  m_handles.push_back(ir);
222  m_boundHandles = true;
223  if (IProxyDict* store = m_store)
224  store->boundHandle(ir);
225  return true;
226  }
227 }
228 
229 
232 {
233  DataObject* dobj = m_dObject;
234  resetGaudiRef(dobj);
235  m_dObject = dobj;
236  m_tAddress.reset();
238 }
239 
240 
241 void DataProxy::reset (bool hard /*= false*/)
242 {
243  resetBoundHandles (hard);
244 
245  objLock_t objLock (m_objMutex);
246  lock_t lock (m_mutex);
247  resetRef();
248 }
249 
250 
252 {
253  handleList_t handles;
254  {
255  objLock_t objLock (m_objMutex);
256  lock_t lock (m_mutex);
257  m_const=false; //hack to force the resetting of proxy ptr in VarHandleBase
258 
259  handles = m_handles;
260 
261  DataObject* dobj = m_dObject;
262  resetGaudiRef(dobj);
263  m_dObject = dobj;
264  resetGaudiRef(m_dataLoader);
265 
266  if (m_handles.empty()) {
267  m_boundHandles = false;
268  }
269  }
270 
271  for (auto ih: handles) {
272  if (0 != ih) ih->finalReset();
273  }
274 }
275 
278  handleList_t handles;
279  {
280  lock_t lock (m_mutex);
281  // Early exit if the list is empty.
282  if (!m_boundHandles) return;
283 
284  // Make a copy and drop the lock, so we're not holding the lock
285  // during the callback.
286  handles = m_handles;
287  }
288 
289  for (IResetable* h : handles) {
290  h->reset(hard);
291  }
292 }
293 
295  assert(ir);
296  lock_t lock (m_mutex);
297  auto ifr = find(m_handles.begin(), m_handles.end(), ir );
298  if (ifr != m_handles.end()) {
299  m_handles.erase(ifr);
300  if (IProxyDict* store = m_store)
302  }
303  m_boundHandles = !m_handles.empty();
304 }
305 
307 unsigned long DataProxy::refCount() const
308 {
309  lock_t lock (m_mutex);
310  return m_refCount;
311 }
312 
314 unsigned long DataProxy::addRef()
315 {
316  lock_t lock (m_mutex);
317  return ++m_refCount;
318 }
319 
321 unsigned long DataProxy::release()
322 {
323  unsigned long count;
324  {
325  lock_t lock (m_mutex);
326  count = --m_refCount;
327  }
328  if ( 0 == count ) delete this;
329  return count;
330 }
331 
332 
354 bool DataProxy::requestRelease(bool force, bool hard) {
355 
356  if (m_boundHandles) {
357  resetBoundHandles(hard);
358  }
359  bool canRelease = force;
360  if (!m_resetFlag) canRelease = true;
361 #ifndef NDEBUG
362  MsgStream gLog(m_ims, "DataProxy");
363  if (gLog.level() <= MSG::VERBOSE) {
364  gLog << MSG::VERBOSE << "requestRelease(): "
365  << (canRelease ? " release " : " reset")
366  <<" object "
367  << name() << " CLID " << clID() << " address " << MSG::hex
368  << object() << MSG::dec << endmsg;
369  }
370 #endif
371  if (!canRelease) {
372  resetRef();
373  }
374  return canRelease;
375 }
376 
380 void DataProxy::setObject(objLock_t& objLock, DataObject* dObject, bool doreg)
381 {
382  DataObject* dobj = m_dObject;
383  setGaudiRef(dObject, dobj);
384  m_dObject = dobj;
385  if (0 != dobj) {
386  if (doreg) dobj->setRegistry(this);
387  if (m_const) this->lock (objLock);
388  }
389 }
390 
391 
393 void DataProxy::setObject(DataObject* dObject, bool doreg /*= true*/)
394 {
395  objLock_t objLock (m_objMutex);
396  setObject (objLock, dObject, doreg);
397 }
398 
399 
400 // set IOpaqueAddress
401 void DataProxy::setAddress(IOpaqueAddress* address)
402 {
403  lock_t lock (m_mutex);
405 }
406 
407 // set IOpaqueAddress
409 {
410  lock_t lock (m_mutex);
411  m_tAddress.setAddress(std::move(address));
412 }
414 
415 
428 std::unique_ptr<DataObject> DataProxy::readData()
429 {
430  // Public wrapper for readData().
431  objLock_t objLock (m_objMutex);
432  return readData (objLock, nullptr);
433 }
434 
435 
447 std::unique_ptr<DataObject> DataProxy::readData (objLock_t&, ErrNo* errNo)
448 {
449  if (errNo) {
450  if (*errNo == RECURSIVEREAD) {
451  // This can end up being called from noexcept functions.
452  // Creating a MsgStream can throw an exception --- don't let
453  // it escape.
454  try {
455  MsgStream gLog(m_ims, "DataProxy");
456  gLog << MSG::ERROR
457  << "readData: ERROR recursive read for object"
458  <<m_tAddress.clID() << '/' << m_tAddress.name() << '\n'
459  <<" Returning NULL DataObject pointer " << endmsg;
460  }
461  catch (const GaudiException&) {
462  std::cerr << "DataProxy::readData: Problem creating MsgStream\n";
463  }
464  return nullptr;
465  }
466  *errNo = RECURSIVEREAD;
467  }
468 
469  IConverter* dataLoader;
470  IProxyDict* store;
471  IOpaqueAddress* address;
472  {
473  lock_t lock (m_mutex);
474  if (0 == m_dataLoader) {
475  //MsgStream gLog(m_ims, "DataProxy");
476  //gLog << MSG::WARNING
477  // << "accessData: IConverter ptr not set" <<endmsg;
478  if (errNo) *errNo=NOCNVSVC;
479  return nullptr;
480  }
481 
482  dataLoader = m_dataLoader;
483  store = m_store;
484  address = m_tAddress.address();
485  }
486 
487  if (!isValidAddress()) {
488  //MsgStream gLog(m_ims, "DataProxy");
489  //gLog << MSG::WARNING
490  // << "accessData: IOA pointer not set" <<endmsg;
491  if (errNo) *errNo=NOIOA;
492  return nullptr;
493  }
494 
496 
497  DataObject* obj = nullptr;
498  StatusCode sc;
499  if (store)
500  sc = store->createObj (dataLoader, address, obj);
501  else
502  sc = dataLoader->createObj (address, obj);
503  if (sc.isSuccess()) {
504  if (errNo && *errNo == RECURSIVEREAD) *errNo = ALLOK;
505  return std::unique_ptr<DataObject>(obj);
506  }
507  if (errNo) *errNo = CNVFAILED;
508  return nullptr;
509 }
510 
511 
514 {
515  // This is done in the inlined accessData().
516  //if (0 != m_dObject) return m_dObject; // cached object
517 
518  objLock_t objLock (m_objMutex);
519 
520  if (isValidAddress()) {
521  // An address provider called by isValidAddress may have set the object
522  // pointer directly, rather than filling in the address. So check
523  // the cached object pointer again.
524  if (0 != m_dObject) return m_dObject; // cached object
525  }
526 
527  std::unique_ptr<DataObject> obju = readData (objLock, &m_errno);
528  if (!obju) {
529  if (m_errno == NOIOA) {
530  MsgStream gLog(m_ims, "DataProxy");
531  gLog << MSG::WARNING
532  << "accessData: IOA pointer not set" <<endmsg;
533  }
534  else if (m_errno == CNVFAILED) {
535  MsgStream gLog(m_ims, "DataProxy");
536  gLog << MSG::WARNING
537  << "accessData: conversion failed for data object "
538  <<m_tAddress.clID() << '/' << m_tAddress.name() << '\n'
539  <<" Returning NULL DataObject pointer " << endmsg;
540  }
541  setObject(objLock, 0, true);
542  return 0;
543  }
544 
545  DataObject* obj = obju.release();
546  setObject(objLock, obj, true);
547  DataBucketBase* bucket = dynamic_cast<DataBucketBase*>(obj);
548  if (m_t2p) {
549  if (bucket) {
550  void* payload = bucket->object();
551  m_t2p->t2pRegister(payload, this);
552  m_errno=ALLOK;
553 
554  // Register bases as well.
556  if (bi) {
557  std::vector<CLID> base_clids = bi->get_bases();
558  for (unsigned i=0; i < base_clids.size(); ++i) {
559  void* bobj = SG::DataProxy_cast (this, base_clids[i]);
560  if (bobj && bobj != payload)
561  m_t2p->t2pRegister (bobj, this);
562  }
563  }
564  }
565  else {
566  MsgStream gLog(m_ims, "DataProxy");
567  gLog << MSG::ERROR
568  << "accessData: ERROR registering object in t2p map"
569  <<m_tAddress.clID() << '/' << m_tAddress.name() << '\n'
570  <<" Returning NULL DataObject pointer " << endmsg;
571  obj=0;
572  setObject(objLock, 0, true);
574  }
575  }
576 
577  return obj;
578 }
579 
580 
581 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
583 {
584  // Looking up the context is relatively expensive.
585  // So first try isValid() without the context.
586  {
587  lock_t lock (m_mutex);
588  if (const_cast<DataProxy*>(this)->m_tAddress.isValid(nullptr)) {
589  return true;
590  }
591  }
592  // Get the context. (Must not be holding m_mutex here.)
593  const EventContext& ctx = contextFromStore();
594  // Try again with the context.
595  lock_t lock (m_mutex);
596  return const_cast<DataProxy*>(this)->m_tAddress.isValid(&ctx);
597 }
598 
600 {
601  // Be sure to get the context before acquiring the lock.
602  const EventContext& ctx = contextFromStore();
603  lock_t lock (m_mutex);
604  return m_tAddress.isValid(&ctx, true);
605 }
606 
616 void* SG::DataProxy_cast (SG::DataProxy* proxy, CLID clid, const std::type_info* tinfo /*= nullptr*/)
617 {
618  if (nullptr == proxy || !proxy->isValid()) {
619  return nullptr;
620  }
621 
622  DataObject* pObject = proxy->accessData();
623  if (nullptr == pObject) {
624 #ifndef NDEBUG
625  MsgStream gLog(Athena::getMessageSvc(), "SG::DataProxy_cast");
626  gLog << MSG::WARNING
627  << "this proxy " << MSG::hex << proxy
628  << MSG::dec << " has a NULL data object ptr" << endmsg;
629 #endif
630  return nullptr;
631  }
632 
633  void* result = SG::Storable_cast (pObject, clid, tinfo, true, proxy, proxy->isConst());
634  if (nullptr == result) {
635  //if result is null, probably CLID is neither the type the object was
636  // stored with, nor it inherits from it.
637  // Before giving up let's check its transient CLIDs
638  DataBucketBase* db(0);
639  if (proxy->transientID(clid) &&
640  nullptr != (db = dynamic_cast<DataBucketBase*>(pObject)) )
641  {
642  //it is a symlink after all. Let's hard cast and keep our fingers Xed
643  // But first: if this is a non-const proxy, then the cast
644  // may have failed because it needed to go via a copying conversion
645  // that's not allowed for non-const objects. So try the conversion
646  // again as const; if that works, then don't do the hard cast.
647  if (!proxy->isConst() &&
648  SG::Storable_cast(pObject, clid, tinfo, true, proxy, true) != nullptr)
649  {
650 #ifndef NDEBUG
651  MsgStream gLog(Athena::getMessageSvc(), "SG::DataProxy_cast");
652  gLog << MSG::WARNING
653  << "Request for a non-const object via copying conversion; "
654  << "requested CLID = " << clid
655  << ", proxy primary ID is " << proxy->clID() << endmsg ;
656 #endif
657  }
658  else {
659  // ok, hard cast.
660  result = db->object();
661  }
662  }
663  else {
664 #ifndef NDEBUG
665  MsgStream gLog(Athena::getMessageSvc(), "SG::DataProxy_cast");
666  gLog << MSG::WARNING
667  << "Request for an invalid object; requested CLID = "
668  << clid
669  << ", proxy primary ID is " << proxy->clID() << endmsg ;
670 #endif
671  } //try symlink
672  } //result 0
673 
674  return result;
675 }
676 
677 
683 {
684  lock_t lock (m_mutex);
685  if (m_t2p)
686  m_t2p->t2pRegister (p, this);
687 }
688 
689 
696 {
697  DataObject* dobj = m_dObject;
698  DataBucketBase* bucket = dynamic_cast<DataBucketBase*>(dobj);
699  if (bucket)
700  bucket->lock();
701 }
702 
703 
713 const EventContext& DataProxy::contextFromStore() const
714 {
716  if (store) {
717  static const SG::sgkey_t ctxkey =
719  SG::DataProxy* proxy = store->proxy_exact (ctxkey);
720  if (proxy && proxy->object()) {
721  EventContext* ctx = SG::DataProxy_cast<EventContext> (proxy);
722  if (ctx) return *ctx;
723  }
724  }
725  static const EventContext emptyContext;
726  return emptyContext;
727 }
SG::DataProxy_cast
DATA * DataProxy_cast(DataProxy *proxy)
cast the proxy into the concrete data object it proxies
Definition: DataProxy_cast.h:53
SGTest::store
TestStore store
Definition: TestStore.cxx:23
CurrentEventStore.h
Hold a pointer to the current event store.
SG::DataProxy::handleList_t
std::vector< IResetable * > handleList_t
list of bound DataHandles
Definition: DataProxy.h:332
SG::DataProxy::m_boundHandles
bool m_boundHandles
True if there are any bound handles.
Definition: DataProxy.h:316
get_generator_info.result
result
Definition: get_generator_info.py:21
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:407
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
SG::DataProxy::m_store
std::atomic< IProxyDict * > m_store
The store of which we are a part.
Definition: DataProxy.h:347
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
DataBucketBase::lock
virtual void lock()=0
If the held object derives from ILockable, call lock() on it.
SG::DataProxy::resetBoundHandles
void resetBoundHandles(bool hard)
reset the bound DataHandles If HARD is true, then the bound objects should also clear any data that d...
Definition: DataProxy.cxx:277
calibdata.force
bool force
Definition: calibdata.py:18
DataBucketBase
A non-templated base class for DataBucket, allows to access the transient object address as a void*.
Definition: DataBucketBase.h:24
IStringPool::stringToKey
virtual sgkey_t stringToKey(const std::string &str, CLID clid)=0
Find the key for a string/CLID pair.
DataBucketBase.h
SG::DataProxy::registerTransient
virtual void registerTransient(void *p) override final
Register a transient object in a t2p map.
Definition: DataProxy.cxx:682
DataBucketBase::object
virtual void * object()=0
SG::DataProxy::m_t2p
T2pMap * m_t2p
Definition: DataProxy.h:329
CaloCondBlobAlgs_fillNoiseFromASCII.db
db
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:42
SG::DataProxy::m_ims
Athena::IMessageSvcHolder m_ims
Definition: DataProxy.h:344
SG::DataProxy::objLock_t
std::lock_guard< objMutex_t > objLock_t
Definition: DataProxy.h:355
SG::CurrentEventStore::Push
Temporarily change the current store.
Definition: SGTools/SGTools/CurrentEventStore.h:58
SG::TransientAddress
Definition: TransientAddress.h:34
CxxUtils::RefCountedPtr< IOpaqueAddress >
SG::DataProxy::RECURSIVEREAD
@ RECURSIVEREAD
Definition: DataProxy.h:49
SG::BaseInfoBase::get_bases
const std::vector< CLID > & get_bases() const
Return the class IDs of all known bases of T (that have class IDs).
Definition: BaseInfo.cxx:304
SG::DataProxy::NOCNVSVC
@ NOCNVSVC
Definition: DataProxy.h:48
SG::DataProxy::lock
void lock(objLock_t &)
Lock the data object we're holding, if any.
Definition: DataProxy.cxx:695
IProxyDict::createObj
virtual StatusCode createObj(IConverter *cvt, IOpaqueAddress *addr, DataObject *&refpObject)
Call converter to create an object, possibly with locking.
Definition: IProxyDict.cxx:70
IProxyDict
A proxy dictionary.
Definition: AthenaKernel/AthenaKernel/IProxyDict.h:47
EventContextClid.h
Assign a CLID to EventContext.
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
XMLtoHeader.count
count
Definition: XMLtoHeader.py:84
SG::DataProxy::NOIOA
@ NOIOA
Definition: DataProxy.h:48
SG::DataProxy::unbindHandle
void unbindHandle(IResetable *ir)
Definition: DataProxy.cxx:294
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::TransientAddress::name
const std::string & name() const
Get the primary (hashed) SG key.
Definition: TransientAddress.h:214
IProxyDict::proxy_exact
virtual SG::DataProxy * proxy_exact(SG::sgkey_t sgkey) const =0
Get proxy given a hashed key+clid.
IResetable
a resetable object (e.g. a SG DataHandle)
Definition: IResetable.h:15
SG::DataProxy::requestRelease
bool requestRelease(bool force, bool hard)
Reset/release a proxy at the end of an event.
Definition: DataProxy.cxx:354
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
SG::DataProxy::address
virtual IOpaqueAddress * address() const override final
Retrieve IOpaqueAddress.
SG::DataProxy::contextFromStore
const EventContext & contextFromStore() const
Retrieve the EventContext saved in the owning store.
Definition: DataProxy.cxx:713
IProxyDict::boundHandle
virtual void boundHandle(IResetable *handle)
Tell the store that a handle has been bound to a proxy.
Definition: IProxyDict.cxx:23
lumiFormat.i
int i
Definition: lumiFormat.py:85
SG::DataProxy::m_objMutex
objMutex_t m_objMutex
Definition: DataProxy.h:356
SG::DataProxyHolder
Manage DataProxy reference in ElementLink/DataLink.
Definition: DataProxyHolder.h:62
IResetable.h
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG::DataProxyHolder::resetCachedSource
static void resetCachedSource()
SG::DataProxy::m_dObject
std::atomic< DataObject * > m_dObject
Definition: DataProxy.h:323
SG::DataProxy::lock_t
std::lock_guard< mutex_t > lock_t
Definition: DataProxy.h:341
SG::TransientAddress::clID
CLID clID() const
Retrieve string key:
Definition: TransientAddress.h:207
SG::TransientAddress::isValid
bool isValid(const EventContext *ctx, bool forceUpdate=false)
cache the pointer to the Address provider which can update this transient address
Definition: TransientAddress.cxx:194
SG::getDataSourcePointerFunc
getDataSourcePointerFunc_t * getDataSourcePointerFunc
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:37
SG::T2pMap::t2pRegister
bool t2pRegister(const void *const pTrans, DataProxy *const pPers)
Definition: T2pMap.h:34
SG::DataProxy::m_origConst
bool m_origConst
Was the proxy created as const?
Definition: DataProxy.h:321
SG::DataProxy::m_const
std::atomic< bool > m_const
Is the proxy currently const?
Definition: DataProxy.h:319
SG::DataProxy::T2PREGFAILED
@ T2PREGFAILED
Definition: DataProxy.h:48
SG::DataProxy::store
IProxyDict * store()
Return the store of which we're a part.
SG::DataProxy::setT2p
void setT2p(T2pMap *t2p)
Definition: DataProxy.cxx:192
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
SG::DataProxy::bindHandle
bool bindHandle(IResetable *ir)
Definition: DataProxy.cxx:215
SG::TransientAddress::reset
void reset()
Retrieve IOpaqueAddress.
Definition: TransientAddress.cxx:183
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
SG::DataProxy::m_refCount
unsigned int m_refCount
Definition: DataProxy.h:306
SG::DataProxy::clID
CLID clID() const
Retrieve clid.
SG::DataProxy::~DataProxy
virtual ~DataProxy()
Definition: DataProxy.cxx:187
SG::DataProxy::release
virtual unsigned long release() override final
release reference to object
Definition: DataProxy.cxx:321
SG::DataProxy::ALLOK
@ ALLOK
Definition: DataProxy.h:48
SG::DataProxy::setObject
void setObject(DataObject *obj, bool doreg=true)
set DataObject If doreg is true, then call setRegistry to set the backpointer from obj to the proxt.
Definition: DataProxy.cxx:393
SG::DataProxy::DataProxy
DataProxy()
Definition: DataProxy.cxx:92
IProxyDict.h
IProxyDict::unboundHandle
virtual void unboundHandle(IResetable *handle)
Tell the store that a handle has been unbound from a proxy.
Definition: IProxyDict.cxx:33
SG::DataProxy::addRef
virtual unsigned long addRef() override final
Add reference to object.
Definition: DataProxy.cxx:314
SG::BaseInfoBase::find
static const BaseInfoBase * find(CLID clid)
Find the BaseInfoBase instance for clid.
Definition: BaseInfo.cxx:570
DataProxy_cast.h
Helpers for retrieving the payload held by a DataProxy.
SG::DataProxy::ErrNo
ErrNo
Definition: DataProxy.h:48
SG::getDataSourcePointerFunc_t
IProxyDict ** getDataSourcePointerFunc_t(const std::string &)
Definition: DataProxy.cxx:34
SG::DataProxy::updateAddress
bool updateAddress()
Definition: DataProxy.cxx:599
SG::sgkey_t
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition: sgkey_t.h:32
SG::DataProxy::name
virtual const name_type & name() const override final
Retrieve data object key == string.
RTTAlgmain.address
address
Definition: RTTAlgmain.py:55
SG::DataProxy::resetRef
void resetRef()
Drop the reference to the data object.
Definition: DataProxy.cxx:231
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
ir
int ir
counter of the current depth
Definition: fastadd.cxx:49
SG::DataProxy::reset
void reset(bool hard=false)
Other methods of DataProxy (not in Interface IRegistry):
Definition: DataProxy.cxx:241
SG::Storable_cast
T * Storable_cast(DataObject *pDObj, bool quiet=true, IRegisterTransient *irt=0, bool isConst=true)
Definition: StorableConversions.h:37
SG::DataProxy::setAddress
virtual void setAddress(IOpaqueAddress *ioa) override final
set an IOpaqueAddress
Definition: DataProxy.cxx:401
h
SG::DataProxy::accessDataOol
DataObject * accessDataOol()
Out-of-line part of accessData().
Definition: DataProxy.cxx:513
SG::DataProxy::m_resetFlag
bool m_resetFlag
reset and not delete: default is true
Definition: DataProxy.h:309
TransientAddress.h
SG::BaseInfoBase
The non-template portion of the BaseInfo implementation.
Definition: Control/AthenaKernel/AthenaKernel/BaseInfo.h:451
SG::DataProxy::setConst
void setConst()
Mark this object as const.
Definition: DataProxy.cxx:205
SG::DataProxy::CNVFAILED
@ CNVFAILED
Definition: DataProxy.h:48
SG::DataProxy::isValidAddress
bool isValidAddress() const
is the address valid?
Definition: DataProxy.cxx:582
pickleTool.object
object
Definition: pickleTool.py:29
SG::DataProxy::m_errno
enum ErrNo m_errno
errno-style error code for accessData
Definition: DataProxy.h:350
SG::TransientAddress::setAddress
void setAddress(CxxUtils::RefCountedPtr< IOpaqueAddress > pAddress)
Retrieve primary clid.
Definition: TransientAddress.cxx:189
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
SG::DataProxy::refCount
unsigned long refCount() const
return refCount
Definition: DataProxy.cxx:307
SG::DataProxy::finalReset
void finalReset()
Definition: DataProxy.cxx:251
SG::DataProxy::m_tAddress
TransientAddress m_tAddress
Definition: DataProxy.h:325
python.PyAthena.obj
obj
Definition: PyAthena.py:132
SG::DataProxy::errNo
ErrNo errNo() const
SG::DataProxy::m_mutex
mutex_t m_mutex
Definition: DataProxy.h:342
SG::DataProxy
Definition: DataProxy.h:45
SG::DataProxy::readData
std::unique_ptr< DataObject > readData()
Read in a new copy of the object referenced by this proxy.
Definition: DataProxy.cxx:428
SG::T2pMap
Definition: T2pMap.h:21
SG::DataProxy::m_dataLoader
IConverter * m_dataLoader
Definition: DataProxy.h:327
SG::DataProxy::m_handles
handleList_t m_handles
Definition: DataProxy.h:333
T2pMap.h
DataProxy.h