20 TH1D* badchannels =
new TH1D(
"badchannels",
"Average Number of Bad Channels vs run", 10, 0., 10.);
21 badchannels->SetCanExtend(TH1::kXaxis);
24 std::sort(runs.begin(), runs.end());
27 for (
unsigned int i = 0;
i < runs.size(); ++
i) {
29 sprintf(runlabel,
"%d", runs[
i]);
31 sprintf(runpath,
"run_%d", runs[i]);
34 TProfile* multvstime =
nullptr;
35 if (multvstime ==
nullptr)
36 multvstime = (TProfile*)camult.
getObject(histo);
40 if (excludeLastBins) {
41 int lastbin = multvstime->GetNbinsX() + 1;
43 for (
int ibin = multvstime->GetNbinsX() + 1; ibin > 0; --ibin) {
44 if (multvstime->GetBinEntries(ibin) != 0) {
50 std::cout <<
"Restricted range: " << firstbin <<
" " << lastbin << std::endl;
51 multvstime->GetXaxis()->SetRangeUser(multvstime->GetBinLowEdge(firstbin),
52 multvstime->GetBinLowEdge(lastbin - 2));
55 badchannels->Fill(runlabel, multvstime->GetMean(2));
63 TCanvas* cc =
new TCanvas();
71 cabling->SetLineColor(kRed);
72 runinfo->SetLineColor(kMagenta);
73 badchannel->SetLineColor(kCyan);
74 dcs->SetLineColor(kGreen);
75 badfiber->SetLineColor(kBlue);
79 badchannel->Draw(
"same");
80 runinfo->Draw(
"same");
81 cabling->Draw(
"same");
TObject * getObject(const char *name) const
TCanvas * StripCompletePlot(TFile &ff, const char *module, const bool excludeLastBins)
TH1D * AverageRunBadChannels(TFile &ff, const char *module, const char *histo, const bool excludeLastBins)
void setPath(const char *path)
const std::vector< unsigned int > getRunList() const