21 enum {kEBTotalTowers = 2448, kEETotalTowers = 1584};
30 EcalTPGTowerStatusPlot() :
cond::payloadInspector::PlotImage<
EcalTPGTowerStatus>(
"ECAL TPGTowerStatus - map ") {
34 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
36 int EBstat = 0, EEstat = 0;
38 auto iov = iovs.front();
40 unsigned int run = std::get<0>(iov);
45 for(it = towerMap.begin(); it != towerMap.end(); ++it) {
46 if((*it).second > 0) {
48 int ieta =
ttId.ieta();
50 int iphi =
ttId.iphi() - 1;
54 if(
ttId.subDet() == 1) {
55 barrel->Fill(iphi, ieta, (*it).second);
63 gStyle->SetPalette(1);
64 gStyle->SetOptStat(0);
68 TCanvas
canvas(
"c",
"c", w, h);
75 t1.DrawLatex(0.5, 0.96, Form(
"Ecal TPGTowerStatus, IOV %i", run));
77 TPad** pad =
new TPad*;
79 pad[
obj] =
new TPad(Form(
"p_%i",
obj),Form(
"p_%i",
obj), 0.0, 0.04, 1.0, 0.94);
83 t1.DrawLatex(0.2, 0.88, Form(
"%i towers", EBstat));
84 t1.DrawLatex(0.5, 0.02, Form(
"EE : %i tower(s)", EEstat));
89 TLine*
l =
new TLine(0., 0., 0., 0.);
92 Double_t
x = 4.+ (
i * 4);
93 l =
new TLine(x, -MAX_IETA, x, MAX_IETA);
96 l =
new TLine(0., 0., 72., 0.);
100 canvas.SaveAs(ImageName.c_str());
111 EcalTPGTowerStatusDiff() :
cond::payloadInspector::PlotImage<
EcalTPGTowerStatus>(
"ECAL TPGTowerStatus difference") {
115 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
116 TH2F* barrel =
new TH2F(
"EB",
"EB difference",
MAX_IPHI, 0,
MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA);
118 int EBstat = 0, EEstat = 0;
120 unsigned int run[2] = {0, 0}, irun = 0, vEB[kEBTotalTowers];
122 for (
auto const & iov: iovs) {
123 std::shared_ptr<EcalTPGTowerStatus> payload = fetchPayload( std::get<1>(iov) );
124 run[irun] = std::get<0>(iov);
129 for(it = towerMap.begin(); it != towerMap.end(); ++it) {
131 int ieta =
ttId.ieta();
133 int iphi =
ttId.iphi() - 1;
135 int stat = (*it).second;
137 if(
ttId.subDet() == 1) {
140 if(towerId >= kEBTotalTowers)
std::cout <<
" strange tower Id " << towerId << std::endl;
153 if(
ttId.subDet() == 1) {
155 if(towerId >= kEBTotalTowers)
std::cout <<
" strange tower Id " << towerId << std::endl;
161 if(diff != 0) barrel->Fill(iphi, ieta, diff);
189 gStyle->SetPalette(1);
190 gStyle->SetOptStat(0);
193 TCanvas
canvas(
"c",
"c", w, h);
199 t1.SetTextSize(0.05);
200 t1.DrawLatex(0.5, 0.96, Form(
"Ecal TPGTowerStatus, IOV %i - %i", run[1], run[0]));
202 TPad** pad =
new TPad*;
204 pad[
obj] =
new TPad(Form(
"p_%i",
obj),Form(
"p_%i",
obj), 0.0, 0.04, 1.0, 0.94);
207 t1.SetTextSize(0.03);
208 t1.DrawLatex(0.2, 0.88, Form(
"%i tower(s)", EBstat));
209 t1.DrawLatex(0.5, 0.02, Form(
"EE : %i tower(s)", EEstat));
214 TLine* l =
new TLine(0., 0., 0., 0.);
217 Double_t x = 4.+ (
i * 4);
218 l =
new TLine(x, -MAX_IETA, x, MAX_IETA);
221 l =
new TLine(0., 0., 72., 0.);
225 canvas.SaveAs(ImageName.c_str());
237 EcalTPGTowerStatusSummaryPlot() :
242 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
244 auto iov = iovs.front();
245 std::shared_ptr < EcalTPGTowerStatus > payload = fetchPayload(std::get < 1 > (iov));
246 unsigned int run = std::get < 0 > (iov);
256 align =
new TH2F(
"Ecal TPGTower Status Summary",
"Total NumberOfMasked",
257 NbColumns, 0, NbColumns, NbRows, 0, NbRows);
266 align->Fill(0.5, 0.5, towerMap.size());
267 align->Fill(1.5, 0.5, NbMaskedTT);
273 gStyle->SetPalette(1);
274 gStyle->SetOptStat(0);
275 TCanvas
canvas(
"CC map",
"CC map", 1000, 1000);
279 t1.SetTextSize(0.04);
281 t1.DrawLatex(0.5, 0.96,Form(
"Barrel masked Trigger Towers, IOV %i", run));
284 TPad* pad =
new TPad(
"pad",
"pad", 0.0, 0.0, 1.0, 0.94);
291 align->GetXaxis()->SetTickLength(0.);
292 align->GetXaxis()->SetLabelSize(0.);
293 align->GetYaxis()->SetTickLength(0.);
294 align->GetYaxis()->SetLabelSize(0.);
297 canvas.SaveAs(ImageName.c_str());
std::map< uint32_t, uint16_t >::const_iterator EcalTPGTowerStatusMapIterator
std::map< uint32_t, uint16_t > EcalTPGTowerStatusMap
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)
unsigned ttId(DetId const &)
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
virtual bool fill(const std::vector< std::tuple< cond::Time_t, cond::Hash > > &iovs)=0
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
void setSingleIov(bool flag)
void drawTable(int nbRows, int nbColumns)