52 if( inputMEnames.size() != inputLabels.size() ){
53 LogDebug(
"HLTriggerOfflineHeavyFlavor") <<
"Number of labels must match the histos[0]ber of InputMEnames"<<endl;
58 for(
size_t i=0;
i<inputMEnames.size();
i++){
62 LogDebug(
"HLTriggerOfflineHeavyFlavor") <<
"Could not find ME: "<<MEname<<endl;
65 histos.push_back( ME->
getTH1() );
66 labels.push_back( inputLabels[
i] );
75 if ( string::npos != slashPos ) {
76 outputDir +=
"/"+outputMEname.substr(0, slashPos);
77 outputMEname.erase(0, slashPos+1);
82 if(histos[0]->GetXaxis()->GetXbins()->GetSize()==0){
83 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());
85 output =
new TH2F(outputMEname.c_str(),outputMEname.c_str(),histos[0]->GetXaxis()->GetNbins(),histos[0]->GetXaxis()->GetXbins()->GetArray(),histos.size(),0,histos.size());
87 output->SetTitle(outputMEname.c_str());
88 output->SetXTitle( histos[0]->GetXaxis()->GetTitle() );
89 output->SetStats(kFALSE);
90 output->SetOption(
"colztexte");
91 for(
size_t i=0;
i<histos.size();
i++){
92 for(
int j=1;
j<=histos[0]->GetNbinsX();
j++){
93 output->SetBinContent(
j,
i+1,histos[
i]->GetBinContent(
j));
94 output->SetBinError(
j,
i+1,histos[
i]->GetBinError(
j));
96 output->GetYaxis()->SetBinLabel(
i+1,labels[
i]);
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void setCurrentFolder(const std::string &fullpath)