21 enum { kESChannels = 137216 };
29 ESChannelStatusPlot() :
cond::payloadInspector::PlotImage<
ESChannelStatus>(
"ES channel status") {
32 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
33 TH2F*** esmap =
new TH2F**[2];
35 for (
int plane = 0; plane < 2; plane++) {
36 esmap[plane] =
new TH2F*[2];
37 for (
int side = 0; side < 2; side++)
38 esmap[plane][side] =
new TH2F(
43 auto iov = iovs.front();
45 run = std::get<0>(iov);
48 for (
int id = 0;
id < kESChannels;
id++)
51 int side = myESId.
zside();
56 int plane = myESId.
plane() - 1;
57 if (side < 0 || side > 1 || plane < 0 || plane > 1) {
58 std::cout <<
" channel " <<
id <<
" side " << myESId.
zside() <<
" plane " << myESId.
plane() << std::endl;
64 if (myESId.
strip() == 1) {
65 esmap[plane][side]->Fill(myESId.
six() - 1, myESId.
siy() - 1,
status);
75 gStyle->SetOptStat(0);
76 gStyle->SetPalette(1);
77 TCanvas
canvas(
"CC map",
"CC map", 1680, 1320);
82 t1.DrawLatex(0.5, 0.96, Form(
"ES Channel Status, IOV %i",
run));
83 t1.SetTextSize(0.025);
85 float xmi[2] = {0.0, 0.5};
86 float xma[2] = {0.5, 1.0};
87 TPad*** pad =
new TPad**[2];
88 for (
int plane = 0; plane < 2; plane++) {
89 pad[plane] =
new TPad*[2];
90 for (
int side = 0; side < 2; side++) {
91 float yma = 0.94 - (0.46 * plane);
92 float ymi = yma - 0.44;
94 new TPad(Form(
"p_%i_%i", plane, side), Form(
"p_%i_%i", plane, side), xmi[side], ymi, xma[side], yma);
95 pad[plane][side]->Draw();
99 for (
int side = 0; side < 2; side++) {
100 for (
int plane = 0; plane < 2; plane++) {
101 pad[plane][side]->cd();
102 esmap[plane][side]->Draw(
"colz1");
107 t1.SetTextSize(0.025);
108 int Nbdead = escount * 32;
112 t1.DrawLatex(0.5, 0.92, Form(
"Number of dead strips %i", Nbdead));
115 canvas.SaveAs(ImageName.c_str());
125 ESChannelStatusDiff() :
cond::payloadInspector::PlotImage<
ESChannelStatus>(
"ES channel status difference") {
128 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
129 TH2F*** esmap =
new TH2F**[2];
131 for (
int plane = 0; plane < 2; plane++) {
132 esmap[plane] =
new TH2F*[2];
133 for (
int side = 0; side < 2; side++)
134 esmap[plane][side] =
new TH2F(
138 unsigned int run[2], irun = 0;
139 int stat[kESChannels];
140 for (
auto const& iov : iovs) {
142 run[irun] = std::get<0>(iov);
145 for (
int id = 0;
id < kESChannels;
id++)
153 int side = myESId.
zside();
158 int plane = myESId.
plane() - 1;
159 if (side < 0 || side > 1 || plane < 0 || plane > 1) {
160 std::cout <<
" channel " <<
id <<
" side " << myESId.
zside() <<
" plane " << myESId.
plane()
166 if (myESId.
strip() == 1) {
167 esmap[plane][side]->Fill(myESId.
six() - 1, myESId.
siy() - 1,
diff);
177 gStyle->SetOptStat(0);
178 gStyle->SetPalette(1);
179 TCanvas
canvas(
"CC map",
"CC map", 1680, 1320);
183 t1.SetTextSize(0.05);
184 t1.DrawLatex(0.5, 0.96, Form(
"ES Channel Status, IOV %i - %i",
run[1],
run[0]));
185 t1.SetTextSize(0.025);
187 float xmi[2] = {0.0, 0.5};
188 float xma[2] = {0.5, 1.0};
189 TPad*** pad =
new TPad**[2];
190 for (
int plane = 0; plane < 2; plane++) {
191 pad[plane] =
new TPad*[2];
192 for (
int side = 0; side < 2; side++) {
193 float yma = 0.94 - (0.46 * plane);
194 float ymi = yma - 0.44;
196 new TPad(Form(
"p_%i_%i", plane, side), Form(
"p_%i_%i", plane, side), xmi[side], ymi, xma[side], yma);
197 pad[plane][side]->Draw();
201 for (
int side = 0; side < 2; side++) {
202 for (
int plane = 0; plane < 2; plane++) {
203 pad[plane][side]->cd();
204 esmap[plane][side]->Draw(
"colz1");
209 t1.SetTextSize(0.025);
210 int Nbdead = escount * 32;
214 t1.DrawLatex(0.5, 0.92, Form(
"Number of different strips %i", Nbdead));
217 canvas.SaveAs(ImageName.c_str());