17 #include "TPaveStats.h" 36 HcalPedestalsPlot() :
cond::payloadInspector::PlotImage<
HcalPedestals>(
"HCAL Pedestal Ratios - map ") {
40 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
41 auto iov = iovs.front();
42 std::shared_ptr<HcalPedestals>
payload = fetchPayload( std::get<1>(iov) );
44 HcalPedestalContainer* objContainer =
new HcalPedestalContainer(payload, std::get<0>(iov));
46 objContainer->getCanvasAll()->SaveAs(ImageName.c_str());
47 return true;}
else return false;
57 HcalPedestalsDiff() :
cond::payloadInspector::PlotImage<
HcalPedestals>(
"HCAL Pedestal Ratios difference") {
61 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
63 auto iov1 = iovs.front();
64 auto iov2 = iovs.back();
66 std::shared_ptr<HcalPedestals> payload1 = fetchPayload( std::get<1>(iov1) );
67 std::shared_ptr<HcalPedestals> payload2 = fetchPayload( std::get<1>(iov2) );
69 if(payload1.get() && payload2.get()) {
70 HcalPedestalContainer* objContainer1 =
new HcalPedestalContainer(payload1, std::get<0>(iov1));
71 HcalPedestalContainer* objContainer2 =
new HcalPedestalContainer(payload2, std::get<0>(iov2));
72 objContainer2->Subtract(objContainer1);
74 objContainer2->getCanvasAll()->SaveAs(ImageName.c_str());
75 return true;}
else return false;
83 HcalPedestalsEtaPlot() :
cond::payloadInspector::PlotImage<
HcalPedestals>(
"HCAL Pedestal Ratios - map ") {
87 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
88 auto iov = iovs.front();
89 std::shared_ptr<HcalPedestals> payload = fetchPayload( std::get<1>(iov) );
91 HcalPedestalContainer* objContainer =
new HcalPedestalContainer(payload, std::get<0>(iov));
93 objContainer->getCanvasAll(
"EtaProfile")->SaveAs(ImageName.c_str());
94 return true;}
else return false;
104 HcalPedestalsEtaDiff() :
cond::payloadInspector::PlotImage<
HcalPedestals>(
"HCAL Pedestal Ratios difference") {
108 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
110 auto iov1 = iovs.front();
111 auto iov2 = iovs.back();
113 std::shared_ptr<HcalPedestals> payload1 = fetchPayload( std::get<1>(iov1) );
114 std::shared_ptr<HcalPedestals> payload2 = fetchPayload( std::get<1>(iov2) );
116 if(payload1.get() && payload2.get()) {
117 HcalPedestalContainer* objContainer1 =
new HcalPedestalContainer(payload1, std::get<0>(iov1));
118 HcalPedestalContainer* objContainer2 =
new HcalPedestalContainer(payload2, std::get<0>(iov2));
119 objContainer2->Subtract(objContainer1);
121 objContainer2->getCanvasAll(
"EtaProfile")->SaveAs(ImageName.c_str());
122 return true;}
else return false;
130 HcalPedestalsPhiPlot() :
cond::payloadInspector::PlotImage<
HcalPedestals>(
"HCAL Pedestal Ratios - map ") {
131 setSingleIov(
true );
134 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
135 auto iov = iovs.front();
136 std::shared_ptr<HcalPedestals> payload = fetchPayload( std::get<1>(iov) );
138 HcalPedestalContainer* objContainer =
new HcalPedestalContainer(payload, std::get<0>(iov));
140 objContainer->getCanvasAll(
"PhiProfile")->SaveAs(ImageName.c_str());
141 return true;}
else return false;
151 HcalPedestalsPhiDiff() :
cond::payloadInspector::PlotImage<
HcalPedestals>(
"HCAL Pedestal Ratios difference") {
155 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
157 auto iov1 = iovs.front();
158 auto iov2 = iovs.back();
160 std::shared_ptr<HcalPedestals> payload1 = fetchPayload( std::get<1>(iov1) );
161 std::shared_ptr<HcalPedestals> payload2 = fetchPayload( std::get<1>(iov2) );
163 if(payload1.get() && payload2.get()) {
164 HcalPedestalContainer* objContainer1 =
new HcalPedestalContainer(payload1, std::get<0>(iov1));
165 HcalPedestalContainer* objContainer2 =
new HcalPedestalContainer(payload2, std::get<0>(iov2));
166 objContainer2->Subtract(objContainer1);
168 objContainer2->getCanvasAll(
"PhiProfile")->SaveAs(ImageName.c_str());
169 return true;}
else return false;
virtual float getValue(Item *item)
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
float getValue(int fCapId) const
get value for capId = 0..3
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)