CMS 3D CMS Logo

Protected Member Functions | Private Member Functions | Private Attributes

ElectronDqmAnalyzerBase Class Reference

#include <ElectronDqmAnalyzerBase.h>

Inheritance diagram for ElectronDqmAnalyzerBase:
edm::EDAnalyzer ElectronAnalyzer ElectronGeneralAnalyzer ElectronMcFakePostValidator ElectronMcFakeValidator ElectronMcSignalPostValidator ElectronMcSignalValidator ElectronOfflineClient ElectronTagProbeAnalyzer ElectronWebGetter

List of all members.

Protected Member Functions

virtual void analyze (const edm::Event &e, const edm::EventSetup &c)
void beginJob ()
virtual void book ()
MonitorElementbookH1 (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")
MonitorElementbookH1andDivide (const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="")
MonitorElementbookH1andDivide (const std::string &name, const std::string &num, const std::string &denom, const std::string &titleX, const std::string &titleY, const std::string &title="")
MonitorElementbookH1withSumw2 (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")
MonitorElementbookH2 (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")
MonitorElementbookH2andDivide (const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="")
MonitorElementbookH2andDivide (const std::string &name, const std::string &num, const std::string &denom, const std::string &titleX, const std::string &titleY, const std::string &title="")
MonitorElementbookH2withSumw2 (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")
MonitorElementbookP1 (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")
MonitorElementcloneH1 (const std::string &name, MonitorElement *original, const std::string &title="")
MonitorElementcloneH1 (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 ()
MonitorElementget (const std::string &name)
MonitorElementprofileX (MonitorElement *me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111)
MonitorElementprofileX (const std::string &me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111)
MonitorElementprofileY (MonitorElement *me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111)
MonitorElementprofileY (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_
DQMStorestore_
int verbosity_

Detailed Description

Definition at line 14 of file ElectronDqmAnalyzerBase.h.


Constructor & Destructor Documentation

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_, 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.

 {}

Member Function Documentation

virtual void ElectronDqmAnalyzerBase::analyze ( const edm::Event e,
const edm::EventSetup c 
) [inline, protected, virtual]
void ElectronDqmAnalyzerBase::beginJob ( void  ) [protected, virtual]
virtual void ElectronDqmAnalyzerBase::book ( ) [inline, protected, virtual]
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(), and MonitorElement::getTH1F().

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(), and MonitorElement::getTH2F().

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().

 {
  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]

Definition at line 214 of file ElectronDqmAnalyzerBase.cc.

 { return cloneH1(clone,get(original),title) ; }
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]
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_, and store_.

 {
  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(), and MonitorElement::getTH2F().

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.

 { return profileX(get(me2d),title,titleX,titleY,minimum,maximum) ; }
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(), and MonitorElement::getTH2F().

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.

 { return profileY(get(me2d),title,titleX,titleY,minimum,maximum) ; }
void ElectronDqmAnalyzerBase::remove ( const std::string &  name) [protected]
void ElectronDqmAnalyzerBase::remove_other_dirs ( ) [protected]

Definition at line 167 of file ElectronDqmAnalyzerBase.cc.

References DQMStore::cd(), DQMStore::getSubdirs(), pos, DQMStore::pwd(), DQMStore::rmdir(), and store_.

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]
void ElectronDqmAnalyzerBase::setBookPrefix ( const std::string &  prefix) [protected]
int ElectronDqmAnalyzerBase::verbosity ( ) [inline, protected]

Definition at line 35 of file ElectronDqmAnalyzerBase.h.

References verbosity_.

{ return verbosity_ ; }

Member Data Documentation

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().

Definition at line 137 of file ElectronDqmAnalyzerBase.h.

Referenced by endJob(), endLuminosityBlock(), endRun(), and finalStepDone().

std::string ElectronDqmAnalyzerBase::finalStep_ [private]
std::vector<std::string> ElectronDqmAnalyzerBase::histoNames_ [private]

Definition at line 130 of file ElectronDqmAnalyzerBase.h.

Referenced by find().

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().

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().

Definition at line 126 of file ElectronDqmAnalyzerBase.h.

Referenced by beginJob(), ElectronDqmAnalyzerBase(), and verbosity().