Go to the source code of this file.
◆ SG_GET_SCALAR
| #define SG_GET_SCALAR |
( |
| RETTYPE, |
|
|
| TRYTYPE ) |
Value: do { if (m_evtStore->contains<TRYTYPE>(varname)) { \
const TRYTYPE *val = nullptr; \
StatusCode
sc = m_evtStore->retrieve<TRYTYPE>((
const TRYTYPE*&)val, varname); \
throw std::runtime_error("Couldn't retrieve (" #TRYTYPE ") " + varname); \
} \
return (RETTYPE)(*val); \
} } while (0)
Definition at line 14 of file SGNTUPProxyLoader.cxx.
14#define SG_GET_SCALAR(RETTYPE, TRYTYPE) do { if (m_evtStore->contains<TRYTYPE>(varname)) { \
15 const TRYTYPE *val = nullptr; \
16 StatusCode sc = m_evtStore->retrieve<TRYTYPE>((const TRYTYPE*&)val, varname); \
17 if (sc.isFailure()) { \
18 throw std::runtime_error("Couldn't retrieve (" #TRYTYPE ") " + varname); \
19 } \
20 return (RETTYPE)(*val); \
21} } while (0)
◆ SG_GET_VECTOR
| #define SG_GET_VECTOR |
( |
| RETTYPE, |
|
|
| TRYTYPE ) |
Value: do { if (m_evtStore->contains<std::vector<TRYTYPE> >(varname)) { \
const std::vector<TRYTYPE> *val = nullptr; \
StatusCode
sc = m_evtStore->retrieve<std::vector<TRYTYPE> >(val, varname); \
throw std::runtime_error("Couldn't retrieve (std::vector<" #TRYTYPE ">) " + varname); \
} \
std::vector<RETTYPE> temp; \
for (std::vector<TRYTYPE>::const_iterator it = val->begin(); it != val->end(); ++it) { \
temp.push_back((RETTYPE)(*it)); \
} \
return temp; \
} } while (0)
Definition at line 23 of file SGNTUPProxyLoader.cxx.
23#define SG_GET_VECTOR(RETTYPE, TRYTYPE) do { if (m_evtStore->contains<std::vector<TRYTYPE> >(varname)) { \
24 const std::vector<TRYTYPE> *val = nullptr; \
25 StatusCode sc = m_evtStore->retrieve<std::vector<TRYTYPE> >(val, varname); \
26 if (sc.isFailure()) { \
27 throw std::runtime_error("Couldn't retrieve (std::vector<" #TRYTYPE ">) " + varname); \
28 } \
29 std::vector<RETTYPE> temp; \
30 for (std::vector<TRYTYPE>::const_iterator it = val->begin(); it != val->end(); ++it) { \
31 temp.push_back((RETTYPE)(*it)); \
32 } \
33 return temp; \
34} } while (0)