1 #ifndef ValueQuantity_h
2 #define ValueQuantity_h
6 #include "boost/unordered_map.hpp"
7 #include "boost/foreach.hpp"
62 "N",
"Events",
"Energy",
"Timing",
"ADC (QIE8)",
"ADC (QIE8)",
"ADC QIE8()",
63 "fC (QIE8)",
"fC (QIE8)",
"fC (QIE8)",
"Timing",
"Timing",
"LS",
"Et",
"Et",
64 "FG",
"Ratio",
"DigiSize",
"Q",
"Ratio",
65 "dEtRatio",
"SumdEt",
"Timing",
"ADC (QIE10)",
"TDC",
"TDC",
66 "Q",
"Ratio",
"N",
"Energy",
"N",
"Et",
"ADC",
"BX",
67 "Energy",
"State",
"fC (QIE10)",
"FED Data Size (kB)",
"fC (QIE10)",
71 -0.05, 0, 0, -50, -0.5, -0.5, -0.5, 0, 0, 0, -0.5, 0, 0.5, 0,
72 0, 0, 0, -0.5, -1, 0.5, 0, 0, -0.5, -0.5, -0.5, -0.5,
73 0, 0, 0, 0, -0.05, -2, -2, -0.5, 0,
flag::fNA, 0, 0, 0, 0
76 1000, 1000, 200, 50, 127.5, 5, 15, 10000, 1000, 3000,
77 9.5, 9.5, 4000.5, 255.5, 255.5, 2, 1, 20.5, 1, 1.5,
78 1, 1000, 9.5, 255.5, 63.5, 15.5, 1, 2, 3000, 100000, 10000,
79 256, 128, 3600.5, 1000,
flag::nState, 300000, 100, 2000, 1000
82 200, 200, 100, 200, 128, 100, 300, 1000, 200, 600,
83 10, 200, 4000, 256, 128, 2, 100, 20, 100, 100, 100, 100, 10,
84 256, 64, 16, 200, 100, 3000, 500, 100, 258, 130, 3601, 200,
142 virtual double min() {
return 0;}
148 std::vector<std::string> vnames;
149 for (std::vector<flag::Flag>::const_iterator
151 vnames.push_back(it->_name);
175 virtual double min() {
return 1;}
197 virtual double min() {
return 0;}
202 std::vector<std::string>
labels;
203 for (uint32_t
i=0;
i<
_runs.size();
i++)
205 sprintf(name,
"%d",
_runs[
i]);
206 labels.push_back(name);
213 for (uint32_t
i=0;
i<
_runs.size();
i++)
222 <<
"run number doens't exist " <<
run;
247 virtual double min() {
return 0.5;}
260 {this->
setup(vtypes);}
263 virtual void setup(std::vector<uint32_t>
const& vtypes)
265 std::cout <<
"SIZE = " << vtypes.size() << std::endl;
266 for (uint32_t
i=0;
i<vtypes.size();
i++)
267 _types.insert(std::make_pair((uint32_t)vtypes[
i], i));
271 return _types[(uint32_t)v];
279 virtual double min() {
return 0;}
284 typedef boost::unordered_map<uint32_t, int>
TypeMap;
301 std::vector<uint32_t> vtypes;
304 vtypes.push_back(p.first);
307 std::sort(vtypes.begin(), vtypes.end());
ValueQuantity(ValueQuantityType type, bool isLog=false)
virtual void setBits(TH1 *o)
int const nbins_value[nValueQuantityType]
virtual int getValue(int x)
std::string const name_value[nValueQuantityType]
FlagQuantity(std::vector< flag::Flag > const &flags)
std::vector< Variable::Flags > flags
virtual std::string name()
virtual void setup(std::vector< uint32_t > const &vtypes)
std::string ogtype2string(OrbitGapType type)
virtual void setLS(TH1 *o)
virtual LumiSection * makeCopy()
virtual std::string name()
virtual EventType * makeCopy()
virtual std::string name()
virtual int getValue(int run)
virtual std::vector< std::string > getLabels()
virtual std::string name()
Container::value_type value_type
boost::unordered_map< uint32_t, int > TypeMap
double const max_value[nValueQuantityType]
virtual void setMax(double x)
virtual uint32_t getBin(int run)
std::vector< flag::Flag > _flags
virtual uint32_t getBin(int l)
virtual int getValue(int v)
virtual ValueQuantity * makeCopy()
virtual int getValue(int f)
virtual uint32_t getBin(int f)
virtual double getValue(double x)
virtual std::vector< std::string > getLabels()
virtual FlagQuantity * makeCopy()
virtual uint32_t getBin(int v)
virtual void setBits(TH1 *o)
EventType(std::vector< uint32_t > const &vtypes)
double const min_value[nValueQuantityType]
RunNumber(std::vector< int > runs)
virtual QuantityType type()
virtual std::string name()
virtual std::vector< std::string > getLabels()
virtual int getValue(int l)