|
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;
96 template <
class T,
class U>
107 template <
typename T>
109 for (
auto t : m_metaSet) {
117 template <
typename T>
119 T*
t =
static_cast<T*
>(
obj);
120 return insert(sid,
t);
125 template <
typename T>
127 std::lock_guard<std::mutex> lock(m_mut);
128 return m_metaSet.erase(sid);
133 template <
typename T>
135 std::lock_guard<std::mutex> lock(m_mut);
136 return m_metaSet.insert(std::make_pair(sid,
t)).second;
141 template <
typename T>
143 std::lock_guard<std::mutex> lock(m_mut);
144 return m_metaSet.find(sid)!=m_metaSet.end();
149 template <
typename T>
151 std::lock_guard<std::mutex> lock(m_mut);
153 typename MetaContSet::const_iterator itr = m_metaSet.find(sid);
154 if (itr != m_metaSet.end()) {
165 template <
typename T>
167 std::lock_guard<std::mutex> lock(m_mut);
169 typename MetaContSet::const_iterator itr = m_metaSet.find(sid);
170 if (itr != m_metaSet.end()) {
180 template <
typename T>
182 std::lock_guard<std::mutex> lock(m_mut);
184 stream <<
"MetaCont with size : [" << m_metaSet.size() <<
"]" << std::endl;
185 for(
const auto& mapel : m_metaSet) {
186 stream <<
"... Key : " << mapel.first << std::endl;
192 template <
typename T>
194 std::lock_guard<std::mutex> lock(m_mut);
195 return m_metaSet.size();
200 template <
typename T>
201 std::vector<MetaContBase::SourceID>
203 std::lock_guard<std::mutex> lock(m_mut);
205 std::vector<MetaContBase::SourceID>
r;
206 for (
auto ent : m_metaSet) {
207 r.push_back(ent.first);
221 #define METACONT_DEF(T, CLID) \
222 CLASS_DEF( MetaCont<T>, CLID, 1 ) \
223 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