Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef ATHENAKERNEL_METACONT_H
6 #define ATHENAKERNEL_METACONT_H
36 virtual std::vector<SourceID>
sources()
const = 0;
95 template <
class T,
class U>
106 template <
typename T>
108 for (
auto t : m_metaSet) {
116 template <
typename T>
118 T*
t =
static_cast<T*
>(
obj);
119 return insert(sid,
t);
124 template <
typename T>
126 std::lock_guard<std::mutex> lock(m_mut);
127 return m_metaSet.erase(sid);
132 template <
typename T>
134 std::lock_guard<std::mutex> lock(m_mut);
135 return m_metaSet.insert(std::make_pair(sid,
t)).second;
140 template <
typename T>
142 std::lock_guard<std::mutex> lock(m_mut);
143 return m_metaSet.find(sid)!=m_metaSet.end();
148 template <
typename T>
150 std::lock_guard<std::mutex> lock(m_mut);
152 typename MetaContSet::const_iterator itr = m_metaSet.find(sid);
153 if (itr != m_metaSet.end()) {
164 template <
typename T>
166 std::lock_guard<std::mutex> lock(m_mut);
168 typename MetaContSet::const_iterator itr = m_metaSet.find(sid);
169 if (itr != m_metaSet.end()) {
179 template <
typename T>
181 std::lock_guard<std::mutex> lock(m_mut);
183 stream <<
"MetaCont with size : [" << m_metaSet.size() <<
"]" << std::endl;
184 for(
const auto& mapel : m_metaSet) {
185 stream <<
"... Key : " << mapel.first << std::endl;
191 template <
typename T>
193 std::lock_guard<std::mutex> lock(m_mut);
194 return m_metaSet.size();
199 template <
typename T>
200 std::vector<MetaContBase::SourceID>
202 std::lock_guard<std::mutex> lock(m_mut);
204 std::vector<MetaContBase::SourceID>
r;
205 for (
auto ent : m_metaSet) {
206 r.push_back(ent.first);
220 #define METACONT_DEF(T, CLID) \
221 CLASS_DEF( MetaCont<T>, CLID, 1 ) \
222 SG_BASES( MetaCont<T>, MetaContBase )
bool const RAWDATA *ch2 const
Provide an interface for finding inheritance information at run time.
Type used to identify a metadata source.
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Metafunction to find the proper DataBucket class for T.
macros to associate a CLID to a type