17 #include "TPaveStats.h" 36 HcalPedestalWidthsPlot() :
cond::payloadInspector::PlotImage<
HcalPedestalWidths>(
"HCAL PedestalWidth 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<HcalPedestalWidths>
payload = fetchPayload( std::get<1>(iov) );
44 HcalPedestalWidthContainer* objContainer =
new HcalPedestalWidthContainer(payload, std::get<0>(iov));
46 objContainer->getCanvasAll()->SaveAs(ImageName.c_str());
47 return true;}
else return false;
57 HcalPedestalWidthsDiff() :
cond::payloadInspector::PlotImage<
HcalPedestalWidths>(
"HCAL PedestalWidth 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<HcalPedestalWidths> payload1 = fetchPayload( std::get<1>(iov1) );
67 std::shared_ptr<HcalPedestalWidths> payload2 = fetchPayload( std::get<1>(iov2) );
69 if(payload1.get() && payload2.get()) {
70 HcalPedestalWidthContainer* objContainer1 =
new HcalPedestalWidthContainer(payload1, std::get<0>(iov1));
71 HcalPedestalWidthContainer* objContainer2 =
new HcalPedestalWidthContainer(payload2, std::get<0>(iov2));
72 objContainer2->Subtract(objContainer1);
74 objContainer2->getCanvasAll()->SaveAs(ImageName.c_str());
75 return true;}
else return false;
83 HcalPedestalWidthsEtaPlot() :
cond::payloadInspector::PlotImage<
HcalPedestalWidths>(
"HCAL PedestalWidth 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<HcalPedestalWidths> payload = fetchPayload( std::get<1>(iov) );
91 HcalPedestalWidthContainer* objContainer =
new HcalPedestalWidthContainer(payload, std::get<0>(iov));
93 objContainer->getCanvasAll(
"EtaProfile")->SaveAs(ImageName.c_str());
94 return true;}
else return false;
104 HcalPedestalWidthsEtaDiff() :
cond::payloadInspector::PlotImage<
HcalPedestalWidths>(
"HCAL PedestalWidth 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<HcalPedestalWidths> payload1 = fetchPayload( std::get<1>(iov1) );
114 std::shared_ptr<HcalPedestalWidths> payload2 = fetchPayload( std::get<1>(iov2) );
116 if(payload1.get() && payload2.get()) {
117 HcalPedestalWidthContainer* objContainer1 =
new HcalPedestalWidthContainer(payload1, std::get<0>(iov1));
118 HcalPedestalWidthContainer* objContainer2 =
new HcalPedestalWidthContainer(payload2, std::get<0>(iov2));
119 objContainer2->Subtract(objContainer1);
121 objContainer2->getCanvasAll(
"EtaProfile")->SaveAs(ImageName.c_str());
122 return true;}
else return false;
130 HcalPedestalWidthsPhiPlot() :
cond::payloadInspector::PlotImage<
HcalPedestalWidths>(
"HCAL PedestalWidth 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<HcalPedestalWidths> payload = fetchPayload( std::get<1>(iov) );
138 HcalPedestalWidthContainer* objContainer =
new HcalPedestalWidthContainer(payload, std::get<0>(iov));
140 objContainer->getCanvasAll(
"PhiProfile")->SaveAs(ImageName.c_str());
141 return true;}
else return false;
151 HcalPedestalWidthsPhiDiff() :
cond::payloadInspector::PlotImage<
HcalPedestalWidths>(
"HCAL PedestalWidth 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<HcalPedestalWidths> payload1 = fetchPayload( std::get<1>(iov1) );
161 std::shared_ptr<HcalPedestalWidths> payload2 = fetchPayload( std::get<1>(iov2) );
163 if(payload1.get() && payload2.get()) {
164 HcalPedestalWidthContainer* objContainer1 =
new HcalPedestalWidthContainer(payload1, std::get<0>(iov1));
165 HcalPedestalWidthContainer* objContainer2 =
new HcalPedestalWidthContainer(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)
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
float getWidth(int fCapId) const
get width (sqrt(sigma_i_i)) for capId = 0..3