CMS 3D CMS Logo

DQMSimpleFileSaver.cc
Go to the documentation of this file.
2 
3 // framework & common header files
7 
8 //DQM services
11 
12 #include <iostream>
13 
15  //std::cout << "<TauDQMSimpleFileSaver::TauDQMSimpleFileSaver>:" << std::endl;
16 
17  cfgError_ = 0;
18 
19  outputFileName_ = cfg.getParameter<std::string>("outputFileName");
20  if (outputFileName_.empty()) {
21  edm::LogError("TauDQMSimpleFileSaver") << " No outputFileName specified --> histograms will NOT be saved !!";
22  cfgError_ = 1;
23  } else if (outputFileName_.find(".root") == std::string::npos) {
24  edm::LogError("TauDQMSimpleFileSaver")
25  << " Invalid outputFileName = " << outputFileName_ << " --> histograms will NOT be saved !!";
26  cfgError_ = 1;
27  }
28 }
29 
31  // nothing to be done yet...
32 }
33 
35  // nothing to be done yet...
36 }
37 
39  std::cout << "<TauDQMSimpleFileSaver::endJob>:" << std::endl;
40 
41  //--- check that configuration parameters contain no errors
42  if (cfgError_) {
43  edm::LogError("endJob") << " Error in Configuration ParameterSet --> histograms will NOT be saved !!";
44  return;
45  }
46 
47  //--- check that DQMStore service is available
48  if (!edm::Service<DQMStore>().isAvailable()) {
49  edm::LogError("endJob") << " Failed to access dqmStore --> histograms will NOT be saved !!";
50  return;
51  }
52 
55 }
56 
58 
MessageLogger.h
DQMSimpleFileSaver.h
gather_cfg.cout
cout
Definition: gather_cfg.py:144
DQMStore.h
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
dqm::legacy::DQMStore
Definition: DQMStore.h:727
Service.h
L1TBPTX_cfi.dqmStore
dqmStore
Definition: L1TBPTX_cfi.py:6
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TauDQMSimpleFileSaver::TauDQMSimpleFileSaver
TauDQMSimpleFileSaver(const edm::ParameterSet &)
Definition: DQMSimpleFileSaver.cc:14
edm::ParameterSet
Definition: ParameterSet.h:36
edm::LogError
Definition: MessageLogger.h:183
edm::Service
Definition: Service.h:30
TauDQMSimpleFileSaver::outputFileName_
std::string outputFileName_
Definition: DQMSimpleFileSaver.h:33
TauDQMSimpleFileSaver::cfgError_
int cfgError_
Definition: DQMSimpleFileSaver.h:34
TauDQMSimpleFileSaver
Definition: DQMSimpleFileSaver.h:22
edm::EventSetup
Definition: EventSetup.h:57
looper.cfg
cfg
Definition: looper.py:297
Frameworkfwd.h
TauDQMSimpleFileSaver::~TauDQMSimpleFileSaver
~TauDQMSimpleFileSaver() override
Definition: DQMSimpleFileSaver.cc:30
TauDQMSimpleFileSaver::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: DQMSimpleFileSaver.cc:34
edm::Event
Definition: Event.h:73
TauDQMSimpleFileSaver::endJob
void endJob() override
Definition: DQMSimpleFileSaver.cc:38