|
ATLAS Offline Software
|
Go to the documentation of this file.
27 : m_fm(fm), m_tmapOk(false) {
42 std::map<std::string, const std::type_info*>
56 std::map<std::string, std::string>
ms =
valuesS();
57 for (
auto it =
ms.begin();
it !=
ms.end(); ++
it ) {
58 str += Form(
"%-30s :S : %s\n",
it->first.c_str(),
it->second.c_str());
60 std::map<std::string, int> mi =
valuesI();
61 for (
auto it = mi.begin();
it != mi.end(); ++
it ) {
62 str += Form(
"%-30s :I : %d\n",
it->first.c_str(),
it->second);
64 std::map<std::string, float>
mf =
valuesF();
65 for (
auto it =
mf.begin();
it !=
mf.end(); ++
it ) {
66 str += Form(
"%-30s :F : %f\n",
it->first.c_str(),
it->second);
68 std::map<std::string, double> md =
valuesD();
69 for (
auto it = md.begin();
it != md.end(); ++
it ) {
70 str += Form(
"%-30s :D : %f\n",
it->first.c_str(),
it->second);
72 std::map<std::string, bool>
mb =
valuesB();
73 for (
auto it =
mb.begin();
it !=
mb.end(); ++
it ) {
74 str += Form(
"%-30s :B : %s\n",
it->first.c_str(),
75 (
it->second ?
"True" :
"False") );
77 std::map<std::string, std::vector<int> > mvi =
valuesVI();
78 for (
auto it = mvi.begin();
it != mvi.end(); ++
it ) {
80 for (
auto &ent :
it->second) {
81 strv += Form(
"%d,", ent);
83 strv.Remove(TString::kTrailing,
',');
84 str += Form(
"%-30s :VI: [%s]\n",
it->first.c_str(), strv.Data());
86 std::map<std::string, std::vector<float> > mvf =
valuesVF();
87 for (
auto it = mvf.begin();
it != mvf.end(); ++
it ) {
89 for (
auto &ent :
it->second) {
90 strv += Form(
"%f,", ent);
92 strv.Remove(TString::kTrailing,
',');
93 str += Form(
"%-30s :VF: [%s]\n",
it->first.c_str(), strv.Data());
95 std::map<std::string, std::vector<double> > mvd =
valuesVD();
96 for (
auto it = mvd.begin();
it != mvd.end(); ++
it ) {
98 for (
auto &ent :
it->second) {
99 strv += Form(
"%f,", ent);
101 strv.Remove(TString::kTrailing,
',');
102 str += Form(
"%-30s :VD: [%s]\n",
it->first.c_str(), strv.Data());
104 std::map<std::string, std::vector<bool> > mvb =
valuesVB();
105 for (
auto it = mvb.begin();
it != mvb.end(); ++
it ) {
108 for (
auto &&ent :
it->second) {
109 strv += Form(
"%s,", ent ?
"True" :
"False");
111 strv.Remove(TString::kTrailing,
',');
112 str += Form(
"%-30s :VB: [%s]\n",
it->first.c_str(), strv.Data());
114 std::map<std::string, std::vector<std::string> > mvs =
valuesVS();
115 for (
auto it = mvs.begin();
it != mvs.end(); ++
it ) {
117 for (
auto &ent :
it->second) {
118 strv += Form(
"%s,", ent.c_str());;
120 strv.Remove(TString::kTrailing,
',');
121 str += Form(
"%-30s :VS: [%s]\n",
it->first.c_str(), strv.Data());
123 str.Remove(TString::kTrailing,
'\n');
143 for (
auto &ent :
m_tmap) {
144 str += Form(
"%-30s : %s\n", ent.first.c_str(),
147 str.Remove(TString::kTrailing,
'\n');
154 #define GET_VALUE_IMP( TYPE ) \
155 bool BPhysMetaDataHelper::value(const std::string& name, TYPE & val) \
157 xAOD::FileMetaData::Accessor< TYPE > acc( m_prefix + name ); \
158 if ( ! acc.isAvailable( *m_fm ) ) { \
161 val = acc( *m_fm ); \
182 #define GET_VALUES_IMP( SYMBOL, TYPE ) \
183 std::map<std::string, TYPE> BPhysMetaDataHelper::values ## SYMBOL() const { \
184 std::map<std::string, TYPE > metaMap; \
185 const SG::auxid_set_t& auxids = m_fm->getAuxIDs(); \
186 for ( SG::auxid_t auxid : auxids ) { \
187 SG::AuxTypeRegistry& reg = SG::AuxTypeRegistry::instance(); \
188 const std::type_info* ti = reg.getType( auxid ); \
189 if ( ti != NULL && *ti == typeid( TYPE ) ) { \
190 SG::ConstAccessor< TYPE > acc( auxid ); \
191 const std::string name = reg.getName( auxid ); \
192 metaMap[name] = acc( *m_fm ); \
209 #undef GET_VALUES_IMP
static AuxTypeRegistry & instance()
Return the singleton registry instance.
std::string normalizedTypeinfoName(const std::type_info &info)
Convert a type_info to a normalized string representation (matching the names used in the root dictio...
std::string getName(SG::auxid_t auxid) const
Return the name of an aux data item.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Handle mappings between names and auxid_t.
size_t auxid_t
Identifier for a particular aux data item.
const std::type_info * getType(SG::auxid_t auxid) const
Return the type of an aux data item.
const SG::auxid_set_t & getAuxIDs() const
Return a set of identifiers for existing data items for this object.
std::string str(const TrigT2MbtsBits_v1 &trigT2MbtsBits)
Convert a type_info to a normalized string representation (matching the names used in the root dictio...
const double mb
1mb to cm2
Handle mappings between names and auxid_t.
A set of aux data identifiers.
Helper class to provide constant type-safe access to aux data.