ATLAS Offline Software
Loading...
Searching...
No Matches
BPhysMetaDataHelper.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5//
32
33#ifndef XAOD_BPHYSMETADATAHELPER_H
34#define XAOD_BPHYSMETADATAHELPER_H
35
36// System include(s):
37#include <assert.h>
38#include <map>
39#include <iosfwd>
40#include <vector>
41
42// ROOT include(s):
43#include "TString.h"
44
45// EDM include(s):
47
49namespace xAOD {
50
59
60 public:
61
71
77 const xAOD::FileMetaData* metaObj() const;
78
80 void setPrefix(std::string prefix);
81
83 std::map<std::string, const std::type_info*> varTypes() const;
84
90 TString varTypesToString(TString header="") const;
91
98 TString metaDataToString(TString header="") const;
99
110 bool value(const std::string& name, int& val) const;
111 bool value(const std::string& name, float& val) const;
112 bool value(const std::string& name, double& val) const;
113 bool value(const std::string& name, bool& val) const;
114 bool value(const std::string& name, std::string& val) const;
115 bool value(const std::string& name, std::vector<int>& val) const;
116 bool value(const std::string& name, std::vector<float>& val) const;
117 bool value(const std::string& name, std::vector<double>& val) const;
118 bool value(const std::string& name, std::vector<bool>& val) const;
119 bool value(const std::string& name, std::vector<std::string>& val) const;
121
126 std::map<std::string, int> valuesI() const;
127 std::map<std::string, float> valuesF() const;
128 std::map<std::string, double> valuesD() const;
129 std::map<std::string, bool> valuesB() const;
130 std::map<std::string, std::string> valuesS() const;
131 std::map<std::string, std::vector<int> > valuesVI() const;
132 std::map<std::string, std::vector<float> > valuesVF() const;
133 std::map<std::string, std::vector<double> > valuesVD() const;
134 std::map<std::string, std::vector<bool> > valuesVB() const;
135 std::map<std::string, std::vector<std::string> > valuesVS() const;
137
138 protected:
140 void cacheVarTypes() const;
141
142 protected:
145
147 std::string m_prefix;
148
151
153 mutable std::map<std::string, const std::type_info*> m_tmap;
155 mutable bool m_tmapOk;
156
158
159 }; // BPhysMetaDataHelper
160
161} // namespace xAOD
162
163#endif // XAOD_BPHYSMETADATAHELPER_H
std::map< std::string, std::string > valuesS() const
bool value(const std::string &name, float &val) const
bool value(const std::string &name, std::vector< float > &val) const
bool value(const std::string &name, std::vector< int > &val) const
std::map< std::string, double > valuesD() const
std::map< std::string, const std::type_info * > m_tmap
map of metadata names and variable types
bool value(const std::string &name, int &val) const
bool value(const std::string &name, std::vector< std::string > &val) const
void setPrefix(std::string prefix)
Set prefix for variable names.
TString metaDataToString(TString header="") const
Complete metadata contents as TString.
TString varTypesToString(TString header="") const
List of metadata names and types as string.
std::map< std::string, std::vector< bool > > valuesVB() const
std::map< std::string, const std::type_info * > varTypes() const
Map of metadata names and types.
std::map< std::string, bool > valuesB() const
void cacheVarTypes() const
Updating internal variable-to-variable-type cache.
BPhysMetaDataHelper(const xAOD::FileMetaData *fm)
Main constructor.
bool value(const std::string &name, std::vector< bool > &val) const
std::map< std::string, std::vector< std::string > > valuesVS() const
std::map< std::string, float > valuesF() const
bool value(const std::string &name, std::vector< double > &val) const
std::map< std::string, int > valuesI() const
std::map< std::string, std::vector< int > > valuesVI() const
bool value(const std::string &name, double &val) const
const xAOD::FileMetaData * m_fm
FileMetaData object pointer.
std::map< std::string, std::vector< float > > valuesVF() const
std::string m_prefix
Prefix for variable names.
bool value(const std::string &name, bool &val) const
bool value(const std::string &name, std::string &val) const
bool m_tmapOk
flag indicating an up-to-date cache
const xAOD::FileMetaData * metaObj() const
Getter method for the cached xAOD::FileMetaData object.
std::map< std::string, std::vector< double > > valuesVD() const
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
void ErrorHandler ATLAS_NOT_THREAD_SAFE(Int_t level, Bool_t abort, const char *location, const char *message)
Function filtering the warnings coming from ROOT.
Definition Init.cxx:105
FileMetaData_v1 FileMetaData
Declare the latest version of the class.