79 TCanvas *
canvas =
new TCanvas(
"PXCanvas",
"PXCanvas", par.CWidth, par.CHeight);
81 gStyle->SetPalette(1,0);
82 gStyle->SetOptStat(111110);
83 canvas->SetBorderMode(0);
84 canvas->SetFillColor(0);
86 TPaveText * paveOnCanvas =
new TPaveText(0.57,0.79,0.77,0.99,
"NDCtr");
87 paveOnCanvas->SetFillColor(0);
95 { opt =
"COLZ"; gStyle->SetOptStat(10); }
99 string dopt = par.Option;
105 string var = (me->
getName()).substr((me->
getName()).find_last_of(
"/")+1);
109 string name = histo->GetName();
113 histo_ref->SetLineColor(4);
114 histo_ref->SetMarkerColor(4);
115 if (name.find(
"SUM") != string::npos) histo_ref->Draw(
"same");
116 else histo_ref->DrawNormalized(
"same", histo->GetEntries());
143 TLine* l_min =
new TLine();
144 TLine* l_max =
new TLine();
145 l_min->SetLineWidth(4);
146 l_max->SetLineWidth(4);
150 TText* statusOnCanvas = paveOnCanvas->AddText(tag.c_str());
151 statusOnCanvas->SetTextSize(0.08);
152 statusOnCanvas->SetTextFont(112);
153 statusOnCanvas->SetNDC(kTRUE);
154 statusOnCanvas->SetTextColor(icol);
160 double warning = -1.;
162 double channelFraction = -1.;
165 setLines(me,var,ymin,ymax,warning,error,channelFraction);
169 string textMessage =
"fraction of channels failing:";
170 TText* messageOnCanvas = paveOnCanvas->AddText(textMessage.c_str());
171 messageOnCanvas->SetTextSize(0.03);
172 messageOnCanvas->SetNDC(kTRUE);
174 sprintf(text,
"%.2f %%",channelFraction);
175 messageOnCanvas = paveOnCanvas->AddText(text);
176 messageOnCanvas->SetTextSize(0.035);
177 messageOnCanvas->SetNDC(kTRUE);
179 if(ymin!= -1. && ymax!=-1.){
181 l_min->SetLineColor(icol);
182 l_max->SetLineColor(icol);
183 if(var.find(
"SUM") != string::npos){
184 xmin = histo->GetXaxis()->GetXmin();
185 xmax = histo->GetXaxis()->GetXmax();
200 ymin = histo->GetYaxis()->GetBinLowEdge(1);
201 ymax = histo->GetMaximum();
217 paveOnCanvas->Draw(
"same");
219 if(((var.find(
"Barrel") != string::npos) && (var.find(
"SUM") != string::npos)) ||
220 ((var.find(
"Endcap") != string::npos) && (var.find(
"SUM") != string::npos)))
const std::string & getName(void) const
get name of ME
TH1 * getRefTH1(void) const
void setSubDetAxisDrawing(std::string detector, TH1F *histo)
void setLines(MonitorElement *me, std::string &meName, double &ymin, double &ymax, double &warning, double &error, double &channelFraction)
void createDummyImage(const std::string &name)
static void setDrawingOption(TH1 *hist, float xlow=-1., float xhigh=-1.)
static int getStatus(MonitorElement *me)
static void getStatusColor(int status, int &rval, int &gval, int &bval)
Kind kind(void) const
Get the type of the monitor element.
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
void fillNamedImageBuffer(TCanvas *c1, const std::string &name)
(Documentation under construction).
TObject * getRootObject(void) const
static const int STATUS_OK
TObject * getRefRootObject(void) const