1 #ifndef ValueQuantity_h 2 #define ValueQuantity_h 6 #include <unordered_map> 76 const std::map<ValueQuantityType, std::string>
name_value = {
138 {
fDiffRatio,
"(GPU energy - CPU energy)/CPU energy"},
353 }
else if (
x >
max()) {
364 }
else if (
x >
max()) {
404 double min()
override {
return 0; }
409 std::vector<std::string> vnames;
410 for (std::vector<flag::Flag>::const_iterator
it =
_flags.begin();
it !=
_flags.end(); ++
it)
411 vnames.push_back(
it->_name);
430 double min()
override {
return 1; }
431 double max()
override {
return _n + 1; }
453 double min()
override {
return 1; }
454 double max()
override {
return _n + 1; }
472 double min()
override {
return 0; }
476 std::vector<std::string>
labels;
477 for (uint32_t
i = 0;
i <
_runs.size();
i++) {
485 for (uint32_t
i = 0;
i <
_runs.size();
i++)
511 double min()
override {
return 0.5; }
524 virtual void setup(std::vector<uint32_t>
const &vtypes) {
525 std::cout <<
"SIZE = " << vtypes.size() << std::endl;
526 for (uint32_t
i = 0;
i < vtypes.size();
i++)
527 _types.insert(std::make_pair((uint32_t)vtypes[
i],
i));
533 double min()
override {
return 0; }
538 typedef std::unordered_map<uint32_t, int>
TypeMap;
551 std::vector<uint32_t> vtypes;
553 vtypes.push_back(
p.first);
ValueQuantity(ValueQuantityType type, bool isLog=false)
const std::map< ValueQuantityType, int > nbins_value
virtual void setBits(TH1 *o)
std::string name() override
int getValue(int l) override
LumiSectionCoarse(int n, int binning)
uint32_t getBin(int run) override
FlagQuantity(std::vector< flag::Flag > const &flags)
std::vector< std::string > getLabels() override
uint32_t getBin(int v) override
void setBits(TH1 *o) override
LumiSectionCoarse * makeCopy() override
virtual void setup(std::vector< uint32_t > const &vtypes)
virtual void setLS(TH1 *o)
int getValue(int run) override
const std::map< ValueQuantityType, double > min_value
uint32_t getBin(int l) override
~ValueQuantity() override
std::string name() override
int getValue(int f) override
FlagQuantity * makeCopy() override
std::vector< flag::Flag > _flags
std::string name() override
int getValue(int x) override
int getValue(int v) override
std::string ogtype2string(constants::OrbitGapType type)
std::unordered_map< uint32_t, int > TypeMap
void setMax(double x) override
std::vector< std::string > getLabels() override
const std::map< ValueQuantityType, std::string > name_value
EventType * makeCopy() override
void setMax(double x) override
std::string name() override
EventType(std::vector< uint32_t > const &vtypes)
QuantityType type() override
int getValue(int l) override
uint32_t getBin(int l) override
const std::map< ValueQuantityType, double > max_value
std::string name() override
LumiSection * makeCopy() override
~LumiSectionCoarse() override
RunNumber(std::vector< int > runs)
std::vector< std::string > getLabels() override
uint32_t getBin(int f) override
ValueQuantity * makeCopy() override
double getValue(double x) override
std::string name() override