22 TH1D* badchannels =
new TH1D(
"badchannels",
"Average Number of Bad Channels vs run",10,0.,10.);
23 badchannels->SetCanExtend(TH1::kXaxis);
26 std::sort(runs.begin(),runs.end());
29 for(
unsigned int i=0;
i<runs.size();++
i) {
32 sprintf(runlabel,
"%d",runs[
i]);
34 sprintf(runpath,
"run_%d",runs[i]);
38 TProfile* multvstime=
nullptr;
39 if(multvstime==
nullptr) multvstime = (TProfile*)camult.
getObject(histo);
44 int lastbin= multvstime->GetNbinsX()+1;
46 for(
int ibin=multvstime->GetNbinsX()+1;ibin>0;--ibin) {
47 if(multvstime->GetBinEntries(ibin)!=0) {
53 std::cout <<
"Restricted range: " << firstbin <<
" " << lastbin << std::endl;
54 multvstime->GetXaxis()->SetRangeUser(multvstime->GetBinLowEdge(firstbin),multvstime->GetBinLowEdge(lastbin-2));
57 badchannels->Fill(runlabel,multvstime->GetMean(2));
70 TCanvas* cc =
new TCanvas();
78 cabling->SetLineColor(kRed);
79 runinfo->SetLineColor(kMagenta);
80 badchannel->SetLineColor(kCyan);
81 dcs->SetLineColor(kGreen);
82 badfiber->SetLineColor(kBlue);
86 badchannel->Draw(
"same");
87 runinfo->Draw(
"same");
88 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