49 if( inputMEnames.size() != inputLabels.size() ){
50 LogDebug(
"HLTriggerOfflineHeavyFlavor") <<
"Number of labels must match the histos[0]ber of InputMEnames"<<endl;
55 for(
size_t i=0;
i<inputMEnames.size();
i++){
59 LogDebug(
"HLTriggerOfflineHeavyFlavor") <<
"Could not find ME: "<<MEname<<endl;
62 histos.push_back( ME->
getTH1() );
63 labels.push_back( inputLabels[
i] );
72 if ( string::npos != slashPos ) {
73 outputDir +=
"/"+outputMEname.substr(0, slashPos);
74 outputMEname.erase(0, slashPos+1);
79 if(histos[0]->GetXaxis()->GetXbins()->GetSize()==0){
80 output =
new TH2F(outputMEname.c_str(),outputMEname.c_str(),histos[0]->GetXaxis()->GetNbins(),histos[0]->GetXaxis()->GetXmin(),histos[0]->GetXaxis()->GetXmax(),histos.size(),0,histos.size());
82 output =
new TH2F(outputMEname.c_str(),outputMEname.c_str(),histos[0]->GetXaxis()->GetNbins(),histos[0]->GetXaxis()->GetXbins()->GetArray(),histos.size(),0,histos.size());
84 output->SetTitle(outputMEname.c_str());
85 output->SetXTitle( histos[0]->GetXaxis()->GetTitle() );
86 output->SetStats(kFALSE);
87 output->SetOption(
"colztexte");
88 for(
size_t i=0;
i<histos.size();
i++){
89 for(
int j=1; j<=histos[0]->GetNbinsX(); j++){
90 output->SetBinContent(j,
i+1,histos[
i]->GetBinContent(j));
91 output->SetBinError(j,
i+1,histos[
i]->GetBinError(j));
93 output->GetYaxis()->SetBinLabel(
i+1,labels[
i]);
95 ibooker_.
book2D(outputMEname,output);
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * get(const std::string &path)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)