21 enum { kEBTotalTowers = 2448 };
29 EcalTPGTowerStatusPlot() :
cond::payloadInspector::PlotImage<
EcalTPGTowerStatus>(
"ECAL TPGTowerStatus - map ") {
33 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
37 auto iov = iovs.front();
39 unsigned int run = std::get<0>(iov);
44 for (it = towerMap.begin(); it != towerMap.end(); ++it) {
45 if ((*it).second > 0) {
53 if (
ttId.subDet() == 1) {
61 gStyle->SetPalette(1);
62 gStyle->SetOptStat(0);
73 t1.DrawLatex(0.5, 0.96, Form(
"Ecal TPGTowerStatus, IOV %i",
run));
75 TPad** pad =
new TPad*;
77 pad[
obj] =
new TPad(Form(
"p_%i",
obj), Form(
"p_%i",
obj), 0.0, 0.04, 1.0, 0.94);
81 t1.DrawLatex(0.2, 0.88, Form(
"%i towers", EBstat));
86 TLine*
l =
new TLine(0., 0., 0., 0.);
89 Double_t
x = 4. + (
i * 4);
93 l =
new TLine(0., 0., 72., 0.);
97 canvas.SaveAs(ImageName.c_str());
105 template <cond::payloadInspector::IOVMultiplicity nIOVs,
int ntags>
108 EcalTPGTowerStatusDiffBase()
109 :
cond::payloadInspector::PlotImage<
EcalTPGTowerStatus, nIOVs, ntags>(
"ECAL TPGTowerStatus difference") {}
111 bool fill()
override {
116 unsigned int run[2] = {0, 0}, vEB[kEBTotalTowers];
118 auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs;
119 l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().
name;
120 auto firstiov = iovs.front();
121 run[0] = std::get<0>(firstiov);
122 std::tuple<cond::Time_t, cond::Hash> lastiov;
124 auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs;
125 l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().
name;
126 lastiov = tag2iovs.front();
128 lastiov = iovs.back();
129 l_tagname[1] = l_tagname[0];
131 run[1] = std::get<0>(lastiov);
132 for (
int irun = 0; irun < nIOVs; irun++) {
133 std::shared_ptr<EcalTPGTowerStatus>
payload;
143 for (it = towerMap.begin(); it != towerMap.end(); ++it) {
150 int stat = (*it).second;
152 if (
ttId.subDet() == 1) {
161 if (
ttId.subDet() == 1) {
195 gStyle->SetPalette(1);
196 gStyle->SetOptStat(0);
205 int len = l_tagname[0].length() + l_tagname[1].length();
208 t1.SetTextSize(0.03);
209 t1.DrawLatex(0.5, 0.96, Form(
"%s %i - %s %i", l_tagname[1].c_str(),
run[1], l_tagname[0].c_str(),
run[0]));
211 t1.SetTextSize(0.05);
212 t1.DrawLatex(0.5, 0.96, Form(
"Ecal TPGTowerStatus, IOV %i - %i",
run[1],
run[0]));
215 t1.SetTextSize(0.05);
216 t1.DrawLatex(0.5, 0.96, Form(
"%s, IOV %i - %i", l_tagname[0].c_str(),
run[1],
run[0]));
218 t1.SetTextSize(0.05);
220 TPad** pad =
new TPad*;
222 pad[
obj] =
new TPad(Form(
"p_%i",
obj), Form(
"p_%i",
obj), 0.0, 0.04, 1.0, 0.94);
225 t1.SetTextSize(0.03);
226 t1.DrawLatex(0.2, 0.88, Form(
"%i tower(s)", EBstat));
231 TLine*
l =
new TLine(0., 0., 0., 0.);
234 Double_t
x = 4. + (
i * 4);
238 l =
new TLine(0., 0., 72., 0.);
242 canvas.SaveAs(ImageName.c_str());
246 using EcalTPGTowerStatusDiffOneTag = EcalTPGTowerStatusDiffBase<cond::payloadInspector::SINGLE_IOV, 1>;
247 using EcalTPGTowerStatusDiffTwoTags = EcalTPGTowerStatusDiffBase<cond::payloadInspector::SINGLE_IOV, 2>;
254 EcalTPGTowerStatusSummaryPlot()
259 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
260 auto iov = iovs.front();
261 std::shared_ptr<EcalTPGTowerStatus>
payload =
263 unsigned int run = std::get<0>(iov);
272 align =
new TH2F(
"Ecal TPGTower Status Summary",
273 "Total NumberOfMasked",
284 if ((*it).second > 0)
287 align->Fill(0.5, 0.5, towerMap.size());
288 align->Fill(1.5, 0.5, NbMaskedTT);
294 gStyle->SetPalette(1);
295 gStyle->SetOptStat(0);
296 TCanvas
canvas(
"CC map",
"CC map", 1000, 1000);
300 t1.SetTextSize(0.04);
302 t1.DrawLatex(0.5, 0.96, Form(
"Barrel masked Trigger Towers, IOV %i",
run));
304 TPad* pad =
new TPad(
"pad",
"pad", 0.0, 0.0, 1.0, 0.94);
311 align->GetXaxis()->SetTickLength(0.);
312 align->GetXaxis()->SetLabelSize(0.);
313 align->GetYaxis()->SetTickLength(0.);
314 align->GetYaxis()->SetLabelSize(0.);
317 canvas.SaveAs(ImageName.c_str());
std::map< uint32_t, uint16_t >::const_iterator EcalTPGTowerStatusMapIterator
std::map< uint32_t, uint16_t > EcalTPGTowerStatusMap
unsigned ttId(DetId const &, EcalElectronicsMapping const *)
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
unsigned towerId(DetId const &, EcalElectronicsMapping const *)
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
void drawTable(int nbRows, int nbColumns)
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)