#include <DQMSimpleFileSaver.h>
Public Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | endJob () |
TauDQMSimpleFileSaver (const edm::ParameterSet &) | |
virtual | ~TauDQMSimpleFileSaver () |
Private Attributes | |
int | cfgError_ |
std::string | outputFileName_ |
Class to write all monitor elements registered in DQMStore into ROOT file (without any naming restrictions imposed by "regular" DQMFileSaver)
Definition at line 22 of file DQMSimpleFileSaver.h.
TauDQMSimpleFileSaver::TauDQMSimpleFileSaver | ( | const edm::ParameterSet & | cfg | ) | [explicit] |
Definition at line 15 of file DQMSimpleFileSaver.cc.
References cfgError_, edm::ParameterSet::getParameter(), outputFileName_, and AlCaHLTBitMon_QueryRunRegistry::string.
{ //std::cout << "<TauDQMSimpleFileSaver::TauDQMSimpleFileSaver>:" << std::endl; cfgError_ = 0; outputFileName_ = cfg.getParameter<std::string>("outputFileName"); if ( outputFileName_ == "" ) { edm::LogError("TauDQMSimpleFileSaver") << " No outputFileName specified --> histograms will NOT be saved !!"; cfgError_ = 1; } else if ( outputFileName_.find(".root") == std::string::npos ) { edm::LogError("TauDQMSimpleFileSaver") << " Invalid outputFileName = " << outputFileName_ << " --> histograms will NOT be saved !!"; cfgError_ = 1; } }
TauDQMSimpleFileSaver::~TauDQMSimpleFileSaver | ( | ) | [virtual] |
Definition at line 31 of file DQMSimpleFileSaver.cc.
{
// nothing to be done yet...
}
void TauDQMSimpleFileSaver::analyze | ( | const edm::Event & | , |
const edm::EventSetup & | |||
) | [virtual] |
Implements edm::EDAnalyzer.
Definition at line 36 of file DQMSimpleFileSaver.cc.
{
// nothing to be done yet...
}
void TauDQMSimpleFileSaver::endJob | ( | void | ) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 41 of file DQMSimpleFileSaver.cc.
References cfgError_, gather_cfg::cout, outputFileName_, and DQMStore::save().
{ std::cout << "<TauDQMSimpleFileSaver::endJob>:" << std::endl; //--- check that configuration parameters contain no errors if ( cfgError_ ) { edm::LogError ("endJob") << " Error in Configuration ParameterSet --> histograms will NOT be saved !!"; return; } //--- check that DQMStore service is available if ( !edm::Service<DQMStore>().isAvailable() ) { edm::LogError ("endJob") << " Failed to access dqmStore --> histograms will NOT be saved !!"; return; } DQMStore& dqmStore = (*edm::Service<DQMStore>()); dqmStore.save(outputFileName_); }
int TauDQMSimpleFileSaver::cfgError_ [private] |
Definition at line 32 of file DQMSimpleFileSaver.h.
Referenced by endJob(), and TauDQMSimpleFileSaver().
std::string TauDQMSimpleFileSaver::outputFileName_ [private] |
Definition at line 31 of file DQMSimpleFileSaver.h.
Referenced by endJob(), and TauDQMSimpleFileSaver().