Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef FAKEBKGTOOLS_DATABASE_H
6 #define FAKEBKGTOOLS_DATABASE_H
33 void importXML(std::string
filename);
34 void importDefaultROOT(std::string
filename);
37 bool needEventInfo()
const;
40 unsigned getXmlLineNumber(
const char*
pos)
const;
44 ELECTRON_REAL_EFFICIENCY = 0,
60 CENTRAL_VALUE, CORRECTION
64 GLOBAL, PER_BIN, NONE, UNSPECIFIED
71 unsigned short paramUID = 0, iMinBound = 0, nBounds = 0;
86 for(
auto&
dim : m_dimensions)
nBins *= (
dim.nBounds - 1);
97 const char*
ptr =
nullptr, *endptr =
nullptr;
98 operator bool()
const {
return ptr && endptr && (
ptr!=endptr); }
101 #if __cplusplus >= 201402L
102 return std::equal(ptr, endptr, s, s+std::strlen(s));
112 std::string
str()
const {
return std::string(
ptr, endptr); }
114 StringRef(
const char* newptr,
const char* newendptr) :
ptr(newptr), endptr(newendptr) {}
116 void set(
const char* newptr,
const char* newendptr) { *
this =
StringRef(newptr, newendptr); }
118 std::string
trim()
const;
132 virtual const char*
what()
const noexcept
override {
return reason.c_str(); }
141 virtual const char*
what()
const noexcept
override {
return reason.c_str(); }
148 PREDEFINED_INT, PREDEFINED_FLOAT, CUSTOM_INT, CUSTOM_FLOAT
165 SystDef(
const std::string&
n,
const std::bitset<N_EFFICIENCY_TYPES>&
a) :
name(
n), affects(
a) {}
170 const std::bitset<N_EFFICIENCY_TYPES>
affects;
178 void dropXmlComments(std::string&
buffer);
179 void dropRootTag(std::string&
buffer);
195 float getWeightedAverage(
const TH1*
hist,
const StringRef& xmlStream);
205 template<
typename ReturnValue,
typename...
Args>
207 static inline void assertNoLeftover(std::stringstream&
ss,
const StringRef&
pos);
209 static constexpr
unsigned short maxIndex() {
return 0x4000; }
210 static std::string getTypeAsString(EfficiencyType
type);
213 template<
typename ReturnValue>
214 static inline ReturnValue getAttribute(
const StringRef& attr,
const char*
ref, ReturnValue
rv);
215 template<
typename ReturnValue,
typename...
Args>
216 static inline ReturnValue getAttribute(
const StringRef& attr,
const char*
ref, ReturnValue
rv,
Args...
args);
219 static constexpr
unsigned short indexFromUID(
unsigned short uid) {
return uid&0x3FFF; }
222 static constexpr
bool isSystUID(
unsigned short uid) {
return ((uid&0xC000) == 0x4000); }
223 static constexpr
bool isStatUID(
unsigned short uid) {
return ((uid&0xC000) == 0x8000); }
228 if(!isSystUID(uid))
return nullptr;
229 unsigned index = indexFromUID(uid);
230 return (
index<m_systs.size())? &m_systs[
index] :
nullptr;
234 if(!isStatUID(uid))
return nullptr;
235 unsigned index = indexFromUID(uid);
236 return (
index<m_stats.size())? &m_stats[
index] :
nullptr;
243 static std::bitset<N_EFFICIENCY_TYPES> selectTypesToFill(
Client client);
245 bool m_storeAllUncertainties =
true;
251 std::map<int, std::vector<EfficiencyTable>>
m_tables;
bool operator==(const DataVector< T > &a, const DataVector< T > &b)
Vector equality comparison.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
bool const RAWDATA *ch2 const
Class providing the definition of the 4-vector interface.
void contents(std::vector< std::string > &keys, TDirectory *td, const std::string &directory, const std::string &pattern, const std::string &path)
std::string to_string(const DetectorType &type)
Class describing the basic event information.
const boost::regex ref(r_ef)
constexpr std::enable_if_t< is_bitmask_v< E >, E & > reset(E &lhs, E rhs)
Convenience function to clear bits in a class enum bitmask.
void trim(std::string &input)
setBGCode setTAP setLVL2ErrorBits bool