ATLAS Offline Software
Loading...
Searching...
No Matches
DataHandleBase.h
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2025 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:
43public:
44 typedef std::string ID_type;
45
47 // Public methods:
49public:
50
53
55 DataHandleBase( const DataHandleBase& rhs );
56
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 virtual bool isSet() const override { return isInitialized(); }
79
81 virtual const std::string& key() const override;
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:
106protected:
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
uint32_t CLID
The Class ID type.
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
std::string ID_type
SG::DataProxy * m_proxy
the proxy holding the object we are bound to
DataHandleBase()
Default constructor:
bool m_useItr
use the proxy-iterator or just the proxy ?
bool isConst() const
ID_type ID() const
get the data object key (ID)
SG::ConstProxyIterator m_itrEnd
iterator pointing at the end of the range of proxies
bool isInitialized() const
weaker test but it does not touch the disk!
virtual bool isSet() const override
DataHandleBase & operator=(const DataHandleBase &rhs)
Assignment operator:
SG::ConstProxyIterator m_itr
iterator pointing at the beginning of the range of proxies
virtual CLID clid() const =0
the CLID of the object we are bound to
a resetable object (e.g.
Definition IResetable.h:15
virtual const std::string & key() const =0
ProxyMap::const_iterator ConstProxyIterator
Definition ProxyMap.h:24