20 #include "TPaveStats.h" 39 HcalGainsPlot() :
cond::payloadInspector::PlotImage<
HcalGains>(
"HCAL Gain Ratios - map ") {
43 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
46 auto iov = iovs.front();
47 std::shared_ptr<HcalGains>
payload = fetchPayload( std::get<1>(iov) );
49 HcalGainContainer* objContainer =
new HcalGainContainer(payload, std::get<0>(iov));
51 objContainer->getCanvasAll()->SaveAs(ImageName.c_str());
52 return true;}
else return false;
62 HcalGainsRatio() :
cond::payloadInspector::PlotImage<
HcalGains>(
"HCAL Gain Ratios difference") {
66 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
68 auto iov1 = iovs.front();
69 auto iov2 = iovs.back();
71 std::shared_ptr<HcalGains> payload1 = fetchPayload( std::get<1>(iov1) );
72 std::shared_ptr<HcalGains> payload2 = fetchPayload( std::get<1>(iov2) );
74 if(payload1.get() && payload2.get()) {
75 HcalGainContainer* objContainer1 =
new HcalGainContainer(payload1, std::get<0>(iov1));
76 HcalGainContainer* objContainer2 =
new HcalGainContainer(payload2, std::get<0>(iov2));
78 objContainer2->Divide(objContainer1);
82 objContainer2->getCanvasAll()->SaveAs(ImageName.c_str());
83 return true;}
else return false;
93 HcalGainsPhiPlot() :
cond::payloadInspector::PlotImage<
HcalGains>(
"HCAL Gain Ratios - map ") {
97 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
100 auto iov = iovs.front();
101 std::shared_ptr<HcalGains> payload = fetchPayload( std::get<1>(iov) );
103 HcalGainContainer* objContainer =
new HcalGainContainer(payload, std::get<0>(iov));
105 objContainer->getCanvasAll(
"PhiProfile")->SaveAs(ImageName.c_str());
106 return true;}
else return false;
116 HcalGainsPhiRatio() :
cond::payloadInspector::PlotImage<
HcalGains>(
"HCAL Gain Ratios difference") {
120 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
122 auto iov1 = iovs.front();
123 auto iov2 = iovs.back();
125 std::shared_ptr<HcalGains> payload1 = fetchPayload( std::get<1>(iov1) );
126 std::shared_ptr<HcalGains> payload2 = fetchPayload( std::get<1>(iov2) );
128 if(payload1.get() && payload2.get()) {
129 HcalGainContainer* objContainer1 =
new HcalGainContainer(payload1, std::get<0>(iov1));
130 HcalGainContainer* objContainer2 =
new HcalGainContainer(payload2, std::get<0>(iov2));
132 objContainer2->Divide(objContainer1);
136 objContainer2->getCanvasAll(
"PhiProfile")->SaveAs(ImageName.c_str());
137 return true;}
else return false;
147 HcalGainsEtaPlot() :
cond::payloadInspector::PlotImage<
HcalGains>(
"HCAL Gain Ratios - map ") {
148 setSingleIov(
true );
151 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
154 auto iov = iovs.front();
155 std::shared_ptr<HcalGains> payload = fetchPayload( std::get<1>(iov) );
157 HcalGainContainer* objContainer =
new HcalGainContainer(payload, std::get<0>(iov));
159 objContainer->getCanvasAll(
"EtaProfile")->SaveAs(ImageName.c_str());
160 return true;}
else return false;
170 HcalGainsEtaRatio() :
cond::payloadInspector::PlotImage<
HcalGains>(
"HCAL Gain Ratios difference") {
174 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
176 auto iov1 = iovs.front();
177 auto iov2 = iovs.back();
179 std::shared_ptr<HcalGains> payload1 = fetchPayload( std::get<1>(iov1) );
180 std::shared_ptr<HcalGains> payload2 = fetchPayload( std::get<1>(iov2) );
182 if(payload1.get() && payload2.get()) {
183 HcalGainContainer* objContainer1 =
new HcalGainContainer(payload1, std::get<0>(iov1));
184 HcalGainContainer* objContainer2 =
new HcalGainContainer(payload2, std::get<0>(iov2));
186 objContainer2->Divide(objContainer1);
190 objContainer2->getCanvasAll(
"EtaProfile")->SaveAs(ImageName.c_str());
191 return true;}
else return false;
virtual float getValue(Item *item)
float getValue(int fCapId) const
get value for capId = 0..3
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)