ATLAS Offline Software
DataHandleBase.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // DataHandleBase.h
8 // Header file for class DataHandleBase
9 // Author: S.Binet<binet@cern.ch>
11 #ifndef SGTOOLS_DATAHANDLEBASE_H
12 #define SGTOOLS_DATAHANDLEBASE_H 1
13 
14 // STL includes
15 #include <string>
16 
17 // fwk includes
20 
21 // SGTools includes
22 #include "SGTools/DataProxy.h"
23 #include "SGTools/ProxyMap.h"
24 
26 
27 // Forward declaration
28 
29 
38 {
39 
41  // Public typedefs:
43 public:
44  typedef std::string ID_type;
45 
47  // Public methods:
49 public:
50 
53 
55  DataHandleBase( const DataHandleBase& rhs );
56 
58  DataHandleBase& operator=( const DataHandleBase& rhs );
59 
61 
64  const SG::ConstProxyIterator& itr2);
65 
67  virtual ~DataHandleBase();
68 
70  // Const methods:
72 
74 
75  bool isConst() const;
76  bool isInitialized() const;
77  bool isSet() const { return isInitialized(); }
79 
81  const std::string& key() const;
82 
83  StatusCode setState(SG::DataProxy* proxy) const;
84  StatusCode setState(IProxyDict* store, const ID_type& name) const;
85 
86  // Note: itr1 may be modified!
87  StatusCode setState(SG::ConstProxyIterator& itr1,
88  const SG::ConstProxyIterator& itr2) const;
89 
91  virtual CLID clid() const =0;
92 
94  ID_type ID() const { return isInitialized() ? m_proxy->name() : "NONE"; }
95 
97  // Non-const methods:
99 
100  StatusCode setState(SG::DataProxy* proxy);
101  StatusCode setState(IProxyDict* store, const ID_type& name);
102 
104  // Protected data:
106 protected:
107 
110 
113 
116 
118  mutable bool m_useItr;
119 
120 };
121 
123 // Inline methods:
125 //std::ostream& operator<<( std::ostream& out, const DataHandleBase& o );
126 
127 
128 
129 #endif //> !SGTOOLS_DATAHANDLEBASE_H
store
StoreGateSvc * store
Definition: fbtTestBasics.cxx:71
DataHandleBase
an iterator over instances of a given type in an IProxyDict (such as StoreGateSvc)....
Definition: DataHandleBase.h:38
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
DataHandleBase::clid
virtual CLID clid() const =0
the CLID of the object we are bound to
DataHandleBase::m_useItr
bool m_useItr
use the proxy-iterator or just the proxy ?
Definition: DataHandleBase.h:118
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
DataHandleBase::ID
ID_type ID() const
get the data object key (ID)
Definition: DataHandleBase.h:94
DataHandleBase::isSet
bool isSet() const
Definition: DataHandleBase.h:77
IProxyDict
A proxy dictionary.
Definition: AthenaKernel/AthenaKernel/IProxyDict.h:47
ProxyMap.h
DataHandleBase::m_itrEnd
SG::ConstProxyIterator m_itrEnd
iterator pointing at the end of the range of proxies
Definition: DataHandleBase.h:112
IResetable
a resetable object (e.g. a SG DataHandle)
Definition: IResetable.h:15
IResetable.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DataHandleBase::m_itr
SG::ConstProxyIterator m_itr
iterator pointing at the beginning of the range of proxies
Definition: DataHandleBase.h:109
DataHandleBase::m_proxy
SG::DataProxy * m_proxy
the proxy holding the object we are bound to
Definition: DataHandleBase.h:115
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
IProxyDict.h
IResetable::key
virtual const std::string & key() const =0
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
checker_macros.h
Define macros for attributes used to control the static checker.
SG::DataProxy
Definition: DataProxy.h:44
DataHandleBase::ID_type
std::string ID_type
Definition: DataHandleBase.h:44
SG::ConstProxyIterator
ProxyMap::const_iterator ConstProxyIterator
Definition: ProxyMap.h:28
DataProxy.h