1 #ifndef root_container_hpp 2 #define root_container_hpp 4 #include "../filval/filval.hpp" 16 container->Fill(value->get_value());
27 ContainerTH1D(
const std::string& name,
const std::string& title,
28 int nbins,
double low,
double high,
GenValue* value)
30 this->container =
new TH1D(name.c_str(), title.c_str(), nbins, low, high);
36 ContainerTH1F(
const std::string& name,
const std::string& title,
37 int nbins,
float low,
float high,
GenValue* value)
39 this->container =
new TH1D(name.c_str(), title.c_str(), nbins, low, high);
45 ContainerTH1I(
const std::string& name,
const std::string& title,
46 int nbins,
int low,
int high,
GenValue* value)
48 this->container =
new TH1I(name.c_str(), title.c_str(), nbins, low, high);
57 std::pair<T, T> val = value->get_value();
58 container->Fill(val.first, val.second);
62 ContainerTH2(TH2* container,
const std::string &name,
Value<std::pair<T, T> > *value)
69 ContainerTH2D(
const std::string& name,
const std::string& title,
70 int nbins_x,
double low_x,
double high_x,
71 int nbins_y,
double low_y,
double high_y,
74 this->container =
new TH2D(name.c_str(), title.c_str(), nbins_x, low_x, high_x, nbins_y, low_y, high_y);
80 ContainerTH2I(
const std::string& name,
const std::string& title,
81 int nbins_x,
int low_x,
int high_x,
82 int nbins_y,
int low_y,
int high_y,
85 this->container =
new TH2I(name.c_str(), title.c_str(), nbins_x, low_x, high_x, nbins_y, low_y, high_y);
92 std::vector<int> x_data;
93 std::vector<int> y_data;
97 x_data.push_back(val.first);
98 y_data.push_back(val.second);
100 data_modified =
true;
106 data_modified(
false){ }
108 TGraph* get_container(){
111 container =
new TGraph(x_data.size(), x_data.data(), y_data.data());
112 data_modified =
false;
119 #endif // root_container_hpp Definition: container.hpp:25
virtual T & get_value()=0
Calculate, if necessary, and return the value held by this object.
A type-agnostic value.
Definition: value.hpp:64
Definition: container.hpp:10
Definition: container.hpp:78
Definition: container.hpp:54
Definition: container.hpp:39
Definition: container.hpp:67
Definition: container.hpp:34
Definition: container.hpp:13
A generic value.
Definition: value.hpp:124
Definition: container.hpp:43
Definition: container.hpp:89