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  usesResource("DQMStore");
18 
19  cfgError_ = 0;
20 
21  outputFileName_ = cfg.getParameter<std::string>("outputFileName");
22  if (outputFileName_.empty()) {
23  edm::LogError("TauDQMSimpleFileSaver") << " No outputFileName specified --> histograms will NOT be saved !!";
24  cfgError_ = 1;
25  } else if (outputFileName_.find(".root") == std::string::npos) {
26  edm::LogError("TauDQMSimpleFileSaver")
27  << " Invalid outputFileName = " << outputFileName_ << " --> histograms will NOT be saved !!";
28  cfgError_ = 1;
29  }
30 }
31 
33  // nothing to be done yet...
34 }
35 
37  // nothing to be done yet...
38 }
39 
41  std::cout << "<TauDQMSimpleFileSaver::endJob>:" << std::endl;
42 
43  //--- check that configuration parameters contain no errors
44  if (cfgError_) {
45  edm::LogError("endJob") << " Error in Configuration ParameterSet --> histograms will NOT be saved !!";
46  return;
47  }
48 
49  //--- check that DQMStore service is available
50  if (!edm::Service<DQMStore>().isAvailable()) {
51  edm::LogError("endJob") << " Failed to access dqmStore --> histograms will NOT be saved !!";
52  return;
53  }
54 
57 }
58 
60 
Log< level::Error, false > LogError
void analyze(const edm::Event &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
TauDQMSimpleFileSaver(const edm::ParameterSet &)