#include <ElectronDqmAnalyzerBase.h>
Protected Member Functions | |
virtual void | analyze (const edm::Event &e, const edm::EventSetup &c) |
void | beginJob () |
virtual void | book () |
MonitorElement * | bookH1 (const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P") |
MonitorElement * | bookH1andDivide (const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="") |
MonitorElement * | bookH1andDivide (const std::string &name, const std::string &num, const std::string &denom, const std::string &titleX, const std::string &titleY, const std::string &title="") |
MonitorElement * | bookH1withSumw2 (const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P") |
MonitorElement * | bookH2 (const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ") |
MonitorElement * | bookH2andDivide (const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="") |
MonitorElement * | bookH2andDivide (const std::string &name, const std::string &num, const std::string &denom, const std::string &titleX, const std::string &titleY, const std::string &title="") |
MonitorElement * | bookH2withSumw2 (const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ") |
MonitorElement * | bookP1 (const std::string &name, const std::string &title, int nchX, double lowX, double highX, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="E1 P") |
MonitorElement * | cloneH1 (const std::string &name, MonitorElement *original, const std::string &title="") |
MonitorElement * | cloneH1 (const std::string &name, const std::string &original, const std::string &title="") |
ElectronDqmAnalyzerBase (const edm::ParameterSet &conf) | |
virtual void | endJob () |
virtual void | endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) |
virtual void | endRun (edm::Run const &, edm::EventSetup const &) |
virtual void | finalize () |
bool | finalStepDone () |
MonitorElement * | get (const std::string &name) |
MonitorElement * | profileX (MonitorElement *me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111) |
MonitorElement * | profileX (const std::string &me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111) |
MonitorElement * | profileY (MonitorElement *me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111) |
MonitorElement * | profileY (const std::string &me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111) |
void | remove (const std::string &name) |
void | remove_other_dirs () |
void | setBookIndex (short) |
void | setBookPrefix (const std::string &) |
int | verbosity () |
virtual | ~ElectronDqmAnalyzerBase () |
Private Member Functions | |
const std::string * | find (const std::string &name) |
std::string | newName (const std::string &name) |
Private Attributes | |
short | bookIndex_ |
std::string | bookPrefix_ |
bool | finalDone_ |
std::string | finalStep_ |
std::vector< std::string > | histoNames_ |
bool | histoNamesReady |
std::string | inputFile_ |
std::string | inputInternalPath_ |
std::string | outputFile_ |
std::string | outputInternalPath_ |
DQMStore * | store_ |
int | verbosity_ |
Definition at line 14 of file ElectronDqmAnalyzerBase.h.
ElectronDqmAnalyzerBase::ElectronDqmAnalyzerBase | ( | const edm::ParameterSet & | conf | ) | [explicit, protected] |
Definition at line 19 of file ElectronDqmAnalyzerBase.cc.
References finalStep_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), inputFile_, inputInternalPath_, outputFile_, outputInternalPath_, AlCaHLTBitMon_QueryRunRegistry::string, and verbosity_.
: bookPrefix_("ele"), bookIndex_(0), histoNamesReady(false), finalDone_(false) { verbosity_ = conf.getUntrackedParameter<int>("Verbosity") ; finalStep_ = conf.getParameter<std::string>("FinalStep") ; inputFile_ = conf.getParameter<std::string>("InputFile") ; outputFile_ = conf.getParameter<std::string>("OutputFile") ; inputInternalPath_ = conf.getParameter<std::string>("InputFolderName") ; outputInternalPath_ = conf.getParameter<std::string>("OutputFolderName") ; }
ElectronDqmAnalyzerBase::~ElectronDqmAnalyzerBase | ( | ) | [protected, virtual] |
Definition at line 30 of file ElectronDqmAnalyzerBase.cc.
{}
virtual void ElectronDqmAnalyzerBase::analyze | ( | const edm::Event & | e, |
const edm::EventSetup & | c | ||
) | [inline, protected, virtual] |
Implements edm::EDAnalyzer.
Reimplemented in ElectronAnalyzer, ElectronGeneralAnalyzer, ElectronTagProbeAnalyzer, ElectronMcFakeValidator, and ElectronMcSignalValidator.
Definition at line 30 of file ElectronDqmAnalyzerBase.h.
{}
void ElectronDqmAnalyzerBase::beginJob | ( | void | ) | [protected, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 99 of file ElectronDqmAnalyzerBase.cc.
References book(), inputFile_, DQMStore::open(), cppFunctionSkipper::operator, outputInternalPath_, DQMStore::setCurrentFolder(), DQMStore::setVerbose(), store_, and verbosity_.
{ store_ = edm::Service<DQMStore>().operator->() ; if (!store_) { edm::LogError("ElectronDqmAnalyzerBase::prepareStore")<<"No DQMStore found !" ; } store_->setVerbose(verbosity_) ; if (inputFile_!="") { store_->open(inputFile_) ; } store_->setCurrentFolder(outputInternalPath_) ; book() ; }
virtual void ElectronDqmAnalyzerBase::book | ( | ) | [inline, protected, virtual] |
Reimplemented in ElectronAnalyzer, ElectronGeneralAnalyzer, ElectronTagProbeAnalyzer, ElectronMcFakePostValidator, ElectronMcFakeValidator, ElectronMcSignalPostValidator, and ElectronMcSignalValidator.
Definition at line 29 of file ElectronDqmAnalyzerBase.h.
Referenced by beginJob().
{}
MonitorElement * ElectronDqmAnalyzerBase::bookH1 | ( | const std::string & | name, |
const std::string & | title, | ||
int | nchX, | ||
double | lowX, | ||
double | highX, | ||
const std::string & | titleX = "" , |
||
const std::string & | titleY = "Events" , |
||
Option_t * | option = "E1 P" |
||
) | [protected] |
Definition at line 230 of file ElectronDqmAnalyzerBase.cc.
References MonitorElement::getTH1F().
Referenced by ElectronTagProbeAnalyzer::book(), ElectronMcFakeValidator::book(), ElectronMcSignalValidator::book(), ElectronGeneralAnalyzer::book(), and ElectronAnalyzer::book().
{ MonitorElement * me = store_->book1D(newName(name),title,nchX,lowX,highX) ; if (titleX!="") { me->getTH1F()->GetXaxis()->SetTitle(titleX.c_str()) ; } if (titleY!="") { me->getTH1F()->GetYaxis()->SetTitle(titleY.c_str()) ; } if (TString(option)!="") { me->getTH1F()->SetOption(option) ; } return me ; }
MonitorElement * ElectronDqmAnalyzerBase::bookH1andDivide | ( | const std::string & | name, |
MonitorElement * | num, | ||
MonitorElement * | denom, | ||
const std::string & | titleX, | ||
const std::string & | titleY, | ||
const std::string & | title = "" |
||
) | [protected] |
Definition at line 300 of file ElectronDqmAnalyzerBase.cc.
References MonitorElement::getTH1(), MonitorElement::getTH1F(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by ElectronOfflineClient::finalize(), ElectronMcSignalPostValidator::finalize(), and ElectronMcFakePostValidator::finalize().
{ if ((!num)||(!denom)) return 0 ; std::string name2 = newName(name) ; TH1F * h_temp = (TH1F *)num->getTH1F()->Clone(name2.c_str()) ; h_temp->Reset() ; h_temp->Divide(num->getTH1(),denom->getTH1(),1,1,"b") ; h_temp->GetXaxis()->SetTitle(titleX.c_str()) ; h_temp->GetYaxis()->SetTitle(titleY.c_str()) ; if (title!="") { h_temp->SetTitle(title.c_str()) ; } if (verbosity_>0) { h_temp->Print() ; } MonitorElement * me = store_->book1D(name2,h_temp) ; delete h_temp ; return me ; }
MonitorElement * ElectronDqmAnalyzerBase::bookH1andDivide | ( | const std::string & | name, |
const std::string & | num, | ||
const std::string & | denom, | ||
const std::string & | titleX, | ||
const std::string & | titleY, | ||
const std::string & | title = "" |
||
) | [protected] |
Definition at line 202 of file ElectronDqmAnalyzerBase.cc.
{ return bookH1andDivide(name,get(num),get(denom),titleX,titleY,title) ; }
MonitorElement * ElectronDqmAnalyzerBase::bookH1withSumw2 | ( | const std::string & | name, |
const std::string & | title, | ||
int | nchX, | ||
double | lowX, | ||
double | highX, | ||
const std::string & | titleX = "" , |
||
const std::string & | titleY = "Events" , |
||
Option_t * | option = "E1 P" |
||
) | [protected] |
Definition at line 243 of file ElectronDqmAnalyzerBase.cc.
References MonitorElement::getTH1F().
Referenced by ElectronTagProbeAnalyzer::book(), ElectronMcFakeValidator::book(), ElectronMcSignalValidator::book(), ElectronAnalyzer::book(), ElectronMcSignalPostValidator::finalize(), and ElectronMcFakePostValidator::finalize().
{ MonitorElement * me = store_->book1D(newName(name),title,nchX,lowX,highX) ; me->getTH1F()->Sumw2() ; if (titleX!="") { me->getTH1F()->GetXaxis()->SetTitle(titleX.c_str()) ; } if (titleY!="") { me->getTH1F()->GetYaxis()->SetTitle(titleY.c_str()) ; } if (TString(option)!="") { me->getTH1F()->SetOption(option) ; } return me ; }
MonitorElement * ElectronDqmAnalyzerBase::bookH2 | ( | const std::string & | name, |
const std::string & | title, | ||
int | nchX, | ||
double | lowX, | ||
double | highX, | ||
int | nchY, | ||
double | lowY, | ||
double | highY, | ||
const std::string & | titleX = "" , |
||
const std::string & | titleY = "" , |
||
Option_t * | option = "COLZ" |
||
) | [protected] |
Definition at line 257 of file ElectronDqmAnalyzerBase.cc.
References MonitorElement::getTH2F().
Referenced by ElectronTagProbeAnalyzer::book(), ElectronMcFakeValidator::book(), ElectronMcSignalValidator::book(), ElectronGeneralAnalyzer::book(), and ElectronAnalyzer::book().
{ MonitorElement * me = store_->book2D(newName(name),title,nchX,lowX,highX,nchY,lowY,highY) ; if (titleX!="") { me->getTH2F()->GetXaxis()->SetTitle(titleX.c_str()) ; } if (titleY!="") { me->getTH2F()->GetYaxis()->SetTitle(titleY.c_str()) ; } if (TString(option)!="") { me->getTH2F()->SetOption(option) ; } return me ; }
MonitorElement * ElectronDqmAnalyzerBase::bookH2andDivide | ( | const std::string & | name, |
MonitorElement * | num, | ||
MonitorElement * | denom, | ||
const std::string & | titleX, | ||
const std::string & | titleY, | ||
const std::string & | title = "" |
||
) | [protected] |
Definition at line 319 of file ElectronDqmAnalyzerBase.cc.
References MonitorElement::getTH1(), MonitorElement::getTH2F(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by ElectronMcSignalPostValidator::finalize().
{ if ((!num)||(!denom)) return 0 ; std::string name2 = newName(name) ; TH2F * h_temp = (TH2F *)num->getTH2F()->Clone(name2.c_str()) ; h_temp->Reset() ; h_temp->Divide(num->getTH1(),denom->getTH1(),1,1,"b") ; h_temp->GetXaxis()->SetTitle(titleX.c_str()) ; h_temp->GetYaxis()->SetTitle(titleY.c_str()) ; if (title!="") { h_temp->SetTitle(title.c_str()) ; } if (verbosity_>0) { h_temp->Print() ; } MonitorElement * me = store_->book2D(name2,h_temp) ; delete h_temp ; return me ; }
MonitorElement * ElectronDqmAnalyzerBase::bookH2andDivide | ( | const std::string & | name, |
const std::string & | num, | ||
const std::string & | denom, | ||
const std::string & | titleX, | ||
const std::string & | titleY, | ||
const std::string & | title = "" |
||
) | [protected] |
Definition at line 208 of file ElectronDqmAnalyzerBase.cc.
{ return bookH2andDivide(name,get(num),get(denom),titleX,titleY,title) ; }
MonitorElement * ElectronDqmAnalyzerBase::bookH2withSumw2 | ( | const std::string & | name, |
const std::string & | title, | ||
int | nchX, | ||
double | lowX, | ||
double | highX, | ||
int | nchY, | ||
double | lowY, | ||
double | highY, | ||
const std::string & | titleX = "" , |
||
const std::string & | titleY = "" , |
||
Option_t * | option = "COLZ" |
||
) | [protected] |
Definition at line 271 of file ElectronDqmAnalyzerBase.cc.
References MonitorElement::getTH2F().
Referenced by ElectronMcSignalValidator::book().
{ MonitorElement * me = store_->book2D(newName(name),title,nchX,lowX,highX,nchY,lowY,highY) ; me->getTH2F()->Sumw2() ; if (titleX!="") { me->getTH2F()->GetXaxis()->SetTitle(titleX.c_str()) ; } if (titleY!="") { me->getTH2F()->GetYaxis()->SetTitle(titleY.c_str()) ; } if (TString(option)!="") { me->getTH2F()->SetOption(option) ; } return me ; }
MonitorElement * ElectronDqmAnalyzerBase::bookP1 | ( | const std::string & | name, |
const std::string & | title, | ||
int | nchX, | ||
double | lowX, | ||
double | highX, | ||
double | lowY, | ||
double | highY, | ||
const std::string & | titleX = "" , |
||
const std::string & | titleY = "" , |
||
Option_t * | option = "E1 P" |
||
) | [protected] |
Definition at line 286 of file ElectronDqmAnalyzerBase.cc.
References MonitorElement::getTProfile().
Referenced by ElectronMcFakeValidator::book(), ElectronMcSignalValidator::book(), ElectronGeneralAnalyzer::book(), and ElectronAnalyzer::book().
{ MonitorElement * me = store_->bookProfile(newName(name),title,nchX,lowX,highX,lowY,highY," ") ; if (titleX!="") { me->getTProfile()->GetXaxis()->SetTitle(titleX.c_str()) ; } if (titleY!="") { me->getTProfile()->GetYaxis()->SetTitle(titleY.c_str()) ; } if (TString(option)!="") { me->getTProfile()->SetOption(option) ; } return me ; }
MonitorElement * ElectronDqmAnalyzerBase::cloneH1 | ( | const std::string & | name, |
MonitorElement * | original, | ||
const std::string & | title = "" |
||
) | [protected] |
Definition at line 338 of file ElectronDqmAnalyzerBase.cc.
References MonitorElement::getTH1F(), and AlCaHLTBitMon_QueryRunRegistry::string.
{ if (!original) return 0 ; std::string name2 = newName(name) ; TH1F * h_temp = (TH1F *)original->getTH1F()->Clone(name2.c_str()) ; h_temp->Reset() ; if (title!="") { h_temp->SetTitle(title.c_str()) ; } MonitorElement * me = store_->book1D(name2,h_temp) ; delete h_temp ; return me ; }
MonitorElement * ElectronDqmAnalyzerBase::cloneH1 | ( | const std::string & | name, |
const std::string & | original, | ||
const std::string & | title = "" |
||
) | [protected] |
void ElectronDqmAnalyzerBase::endJob | ( | void | ) | [protected, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 134 of file ElectronDqmAnalyzerBase.cc.
References finalDone_, finalize(), finalStep_, outputFile_, outputInternalPath_, DQMStore::save(), DQMStore::setCurrentFolder(), store_, and funct::true.
{ if (finalStep_=="AtJobEnd") { if (finalDone_) { edm::LogWarning("ElectronDqmAnalyzerBase::endJob")<<"finalize() already called" ; } store_->setCurrentFolder(outputInternalPath_) ; finalize() ; finalDone_ = true ; } if (outputFile_!="") { store_->save(outputFile_) ; } }
void ElectronDqmAnalyzerBase::endLuminosityBlock | ( | edm::LuminosityBlock const & | , |
edm::EventSetup const & | |||
) | [protected, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 122 of file ElectronDqmAnalyzerBase.cc.
References finalDone_, finalize(), finalStep_, outputInternalPath_, DQMStore::setCurrentFolder(), store_, and funct::true.
{ if (finalStep_=="AtLumiEnd") { if (finalDone_) { edm::LogWarning("ElectronDqmAnalyzerBase::endLuminosityBlock")<<"finalize() already called" ; } store_->setCurrentFolder(outputInternalPath_) ; finalize() ; finalDone_ = true ; } }
void ElectronDqmAnalyzerBase::endRun | ( | edm::Run const & | , |
edm::EventSetup const & | |||
) | [protected, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 111 of file ElectronDqmAnalyzerBase.cc.
References finalDone_, finalize(), finalStep_, outputInternalPath_, DQMStore::setCurrentFolder(), store_, and funct::true.
{ if (finalStep_=="AtRunEnd") { if (finalDone_) { edm::LogWarning("ElectronDqmAnalyzerBase::endRun")<<"finalize() already called" ; } store_->setCurrentFolder(outputInternalPath_) ; finalize() ; finalDone_ = true ; } }
virtual void ElectronDqmAnalyzerBase::finalize | ( | void | ) | [inline, protected, virtual] |
Reimplemented in ElectronOfflineClient, ElectronMcFakePostValidator, ElectronMcSignalPostValidator, and ElectronWebGetter.
Definition at line 31 of file ElectronDqmAnalyzerBase.h.
Referenced by endJob(), endLuminosityBlock(), and endRun().
{}
bool ElectronDqmAnalyzerBase::finalStepDone | ( | ) | [inline, protected] |
Definition at line 34 of file ElectronDqmAnalyzerBase.h.
References finalDone_.
{ return finalDone_ ; }
const std::string * ElectronDqmAnalyzerBase::find | ( | const std::string & | name | ) | [private] |
Definition at line 51 of file ElectronDqmAnalyzerBase.cc.
References DQMStore::getMEs(), histoNames_, histoNamesReady, outputInternalPath_, store_, and funct::true.
Referenced by get(), and remove().
{ typedef std::vector<std::string> HistoNames ; typedef HistoNames::iterator HistoNamesItr ; if (!histoNamesReady) { histoNamesReady = true ; histoNames_ = store_->getMEs() ; } HistoNamesItr histoName ; std::vector<HistoNamesItr> res ; for ( histoName = histoNames_.begin() ; histoName != histoNames_.end() ; ++histoName ) { std::size_t nsize = name.size(), lsize = histoName->size() ; // if ( (histoName->find(bookPrefix_)==0) && // (lsize>=nsize) && // (histoName->find(name)==(lsize-nsize)) ) // { res.push_back(histoName) ; } if ( (lsize>=nsize) && (histoName->find(name)==(lsize-nsize)) ) { res.push_back(histoName) ; } } if (res.size()==0) { std::ostringstream oss ; oss<<"Histogram "<<name<<" not found in "<<outputInternalPath_ ; char sep = ':' ; for ( histoName = histoNames_.begin() ; histoName != histoNames_.end() ; ++histoName ) { oss<<sep<<' '<<*histoName ; sep = ',' ; } oss<<'.' ; edm::LogWarning("ElectronDqmAnalyzerBase::find")<<oss.str() ; return 0 ; } else if (res.size()>1) { std::ostringstream oss ; oss<<"Ambiguous histograms for "<<name<<" in "<<outputInternalPath_ ; char sep = ':' ; std::vector<HistoNamesItr>::iterator resItr ; for ( resItr = res.begin() ; resItr != res.end() ; ++resItr ) { oss<<sep<<' '<<(**resItr) ; sep = ',' ; } oss<<'.' ; edm::LogWarning("ElectronDqmAnalyzerBase::find")<<oss.str() ; return 0 ; } else { return &*res[0] ; } }
MonitorElement * ElectronDqmAnalyzerBase::get | ( | const std::string & | name | ) | [protected] |
Definition at line 148 of file ElectronDqmAnalyzerBase.cc.
References find(), newFWLiteAna::fullName, DQMStore::get(), inputInternalPath_, store_, and AlCaHLTBitMon_QueryRunRegistry::string.
{ const std::string * fullName = find(name) ; if (fullName) { return store_->get(inputInternalPath_+"/"+*fullName) ; } else { return 0 ; } }
std::string ElectronDqmAnalyzerBase::newName | ( | const std::string & | name | ) | [private] |
Definition at line 39 of file ElectronDqmAnalyzerBase.cc.
References bookIndex_, bookPrefix_, and mergeVDriftHistosByStation::name.
{ if (bookPrefix_.empty()) { return name ; } std::ostringstream oss ; oss<<bookPrefix_ ; if (bookIndex_>=0) { oss<<bookIndex_++ ; } oss<<"_"<<name ; return oss.str() ; }
MonitorElement * ElectronDqmAnalyzerBase::profileX | ( | MonitorElement * | me2d, |
const std::string & | title = "" , |
||
const std::string & | titleX = "" , |
||
const std::string & | titleY = "" , |
||
Double_t | minimum = -1111 , |
||
Double_t | maximum = -1111 |
||
) | [protected] |
Definition at line 352 of file ElectronDqmAnalyzerBase.cc.
References MonitorElement::getName(), MonitorElement::getTH2F(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by ElectronMcSignalPostValidator::finalize(), and ElectronMcFakePostValidator::finalize().
{ std::string name2 = me2d->getName()+"_pfx" ; TProfile * p1_temp = me2d->getTH2F()->ProfileX() ; if (title!="") { p1_temp->SetTitle(title.c_str()) ; } if (titleX!="") { p1_temp->GetXaxis()->SetTitle(titleX.c_str()) ; } if (titleY!="") { p1_temp->GetYaxis()->SetTitle(titleY.c_str()) ; } if (minimum!=-1111) { p1_temp->SetMinimum(minimum) ; } if (maximum!=-1111) { p1_temp->SetMaximum(maximum) ; } MonitorElement * me = store_->bookProfile(name2,p1_temp) ; delete p1_temp ; return me ; }
MonitorElement * ElectronDqmAnalyzerBase::profileX | ( | const std::string & | me2d, |
const std::string & | title = "" , |
||
const std::string & | titleX = "" , |
||
const std::string & | titleY = "" , |
||
Double_t | minimum = -1111 , |
||
Double_t | maximum = -1111 |
||
) | [protected] |
Definition at line 219 of file ElectronDqmAnalyzerBase.cc.
MonitorElement * ElectronDqmAnalyzerBase::profileY | ( | MonitorElement * | me2d, |
const std::string & | title = "" , |
||
const std::string & | titleX = "" , |
||
const std::string & | titleY = "" , |
||
Double_t | minimum = -1111 , |
||
Double_t | maximum = -1111 |
||
) | [protected] |
Definition at line 369 of file ElectronDqmAnalyzerBase.cc.
References MonitorElement::getName(), MonitorElement::getTH2F(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by ElectronMcSignalPostValidator::finalize().
{ std::string name2 = me2d->getName()+"_pfy" ; TProfile * p1_temp = me2d->getTH2F()->ProfileY() ; if (title!="") { p1_temp->SetTitle(title.c_str()) ; } if (titleX!="") { p1_temp->GetXaxis()->SetTitle(titleX.c_str()) ; } if (titleY!="") { p1_temp->GetYaxis()->SetTitle(titleY.c_str()) ; } if (minimum!=-1111) { p1_temp->SetMinimum(minimum) ; } if (maximum!=-1111) { p1_temp->SetMaximum(maximum) ; } MonitorElement * me = store_->bookProfile(name2,p1_temp) ; delete p1_temp ; return me ; }
MonitorElement * ElectronDqmAnalyzerBase::profileY | ( | const std::string & | me2d, |
const std::string & | title = "" , |
||
const std::string & | titleX = "" , |
||
const std::string & | titleY = "" , |
||
Double_t | minimum = -1111 , |
||
Double_t | maximum = -1111 |
||
) | [protected] |
Definition at line 224 of file ElectronDqmAnalyzerBase.cc.
void ElectronDqmAnalyzerBase::remove | ( | const std::string & | name | ) | [protected] |
Definition at line 157 of file ElectronDqmAnalyzerBase.cc.
References find(), newFWLiteAna::fullName, inputInternalPath_, DQMStore::removeElement(), DQMStore::setCurrentFolder(), store_, and AlCaHLTBitMon_QueryRunRegistry::string.
{ const std::string * fullName = find(name) ; if (fullName) { store_->setCurrentFolder(inputInternalPath_) ; store_->removeElement(*fullName) ; } }
void ElectronDqmAnalyzerBase::remove_other_dirs | ( | ) | [protected] |
Definition at line 167 of file ElectronDqmAnalyzerBase.cc.
References DQMStore::cd(), DQMStore::getSubdirs(), pos, DQMStore::pwd(), DQMStore::rmdir(), store_, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by ElectronWebGetter::finalize().
{ std::string currentPath = store_->pwd() ; store_->cd() ; std::string currentFolder ; std::vector<std::string> subDirs ; std::vector<std::string>::iterator subDir ; std::string delimiter = "/" ; std::string::size_type lastPos = currentPath.find_first_not_of(delimiter,0) ; std::string::size_type pos = currentPath.find_first_of(delimiter,lastPos) ; while (std::string::npos != pos || std::string::npos != lastPos) { if (currentFolder.empty()) { currentFolder = currentPath.substr(lastPos, pos - lastPos) ; } else { currentFolder += "/" ; currentFolder += currentPath.substr(lastPos, pos - lastPos) ; } lastPos = currentPath.find_first_not_of(delimiter, pos); pos = currentPath.find_first_of(delimiter, lastPos); subDirs = store_->getSubdirs() ; for ( subDir = subDirs.begin() ; subDir != subDirs.end() ; subDir++ ) { if (currentFolder!=(*subDir)) { store_->rmdir(*subDir) ; } } store_->cd(currentFolder) ; } }
void ElectronDqmAnalyzerBase::setBookIndex | ( | short | index | ) | [protected] |
Definition at line 36 of file ElectronDqmAnalyzerBase.cc.
References bookIndex_, and getHLTprescales::index.
Referenced by ElectronTagProbeAnalyzer::book(), ElectronMcSignalPostValidator::book(), ElectronMcFakePostValidator::book(), ElectronMcFakeValidator::book(), ElectronMcSignalValidator::book(), ElectronAnalyzer::book(), and ElectronOfflineClient::finalize().
{ bookIndex_ = index ; }
void ElectronDqmAnalyzerBase::setBookPrefix | ( | const std::string & | prefix | ) | [protected] |
Definition at line 33 of file ElectronDqmAnalyzerBase.cc.
References bookPrefix_, and prof2calltree::prefix.
Referenced by ElectronMcFakeValidator::book(), ElectronMcSignalValidator::book(), ElectronMcSignalPostValidator::finalize(), and ElectronMcFakePostValidator::finalize().
{ bookPrefix_ = prefix ; }
int ElectronDqmAnalyzerBase::verbosity | ( | ) | [inline, protected] |
Definition at line 35 of file ElectronDqmAnalyzerBase.h.
References verbosity_.
{ return verbosity_ ; }
short ElectronDqmAnalyzerBase::bookIndex_ [private] |
Definition at line 128 of file ElectronDqmAnalyzerBase.h.
Referenced by newName(), and setBookIndex().
std::string ElectronDqmAnalyzerBase::bookPrefix_ [private] |
Definition at line 127 of file ElectronDqmAnalyzerBase.h.
Referenced by newName(), and setBookPrefix().
bool ElectronDqmAnalyzerBase::finalDone_ [private] |
Definition at line 137 of file ElectronDqmAnalyzerBase.h.
Referenced by endJob(), endLuminosityBlock(), endRun(), and finalStepDone().
std::string ElectronDqmAnalyzerBase::finalStep_ [private] |
Definition at line 131 of file ElectronDqmAnalyzerBase.h.
Referenced by ElectronDqmAnalyzerBase(), endJob(), endLuminosityBlock(), and endRun().
std::vector<std::string> ElectronDqmAnalyzerBase::histoNames_ [private] |
Definition at line 130 of file ElectronDqmAnalyzerBase.h.
Referenced by find().
bool ElectronDqmAnalyzerBase::histoNamesReady [private] |
Definition at line 129 of file ElectronDqmAnalyzerBase.h.
Referenced by find().
std::string ElectronDqmAnalyzerBase::inputFile_ [private] |
Definition at line 132 of file ElectronDqmAnalyzerBase.h.
Referenced by beginJob(), and ElectronDqmAnalyzerBase().
std::string ElectronDqmAnalyzerBase::inputInternalPath_ [private] |
Definition at line 134 of file ElectronDqmAnalyzerBase.h.
Referenced by ElectronDqmAnalyzerBase(), get(), and remove().
std::string ElectronDqmAnalyzerBase::outputFile_ [private] |
Definition at line 133 of file ElectronDqmAnalyzerBase.h.
Referenced by ElectronDqmAnalyzerBase(), and endJob().
std::string ElectronDqmAnalyzerBase::outputInternalPath_ [private] |
Definition at line 135 of file ElectronDqmAnalyzerBase.h.
Referenced by beginJob(), ElectronDqmAnalyzerBase(), endJob(), endLuminosityBlock(), endRun(), and find().
DQMStore* ElectronDqmAnalyzerBase::store_ [private] |
Definition at line 136 of file ElectronDqmAnalyzerBase.h.
Referenced by beginJob(), endJob(), endLuminosityBlock(), endRun(), find(), get(), remove(), and remove_other_dirs().
int ElectronDqmAnalyzerBase::verbosity_ [private] |
Definition at line 126 of file ElectronDqmAnalyzerBase.h.
Referenced by beginJob(), ElectronDqmAnalyzerBase(), and verbosity().