CMS 3D CMS Logo

PatAnalysisTasksExercise.cc
Go to the documentation of this file.
5 
8 
9 int main(int argc, char* argv[]) {
10  // load framework libraries
11  gSystem->Load("libFWCoreFWLite");
13 
14  // only allow one argument for this simple example which should be the
15  // the python cfg file
16  if (argc < 2) {
17  std::cout << "Usage : " << argv[0] << " [parameters.py]" << std::endl;
18  return 0;
19  }
20  if (!edm::readPSetsFrom(argv[1])->existsAs<edm::ParameterSet>("process")) {
21  std::cout << " ERROR: ParametersSet 'plot' is missing in your configuration file" << std::endl;
22  exit(0);
23  }
24 
26  edm::readPSetsFrom(argv[1])->getParameter<edm::ParameterSet>("process"),
27  std::string("btagAnalyzer"),
28  std::string("analyzeBTag"));
29  WrappedFWLiteAnalysisTasksAnalyzerJEC anaJEC(edm::readPSetsFrom(argv[1])->getParameter<edm::ParameterSet>("process"),
30  std::string("jecAnalyzer"),
31  std::string("analyzeJEC"));
32  anaBTag.beginJob();
33  anaBTag.analyze();
34  anaBTag.endJob();
35  anaJEC.beginJob();
36  anaJEC.analyze();
37  anaJEC.endJob();
38  return 0;
39 }
AnalysisTasksAnalyzerJEC.h
cmsBatch.argv
argv
Definition: cmsBatch.py:279
dir2webdir.argc
argc
Definition: dir2webdir.py:39
edm::readPSetsFrom
std::unique_ptr< edm::ParameterSet > readPSetsFrom(std::string const &fileOrString)
Definition: ParameterSetReader.cc:23
gather_cfg.cout
cout
Definition: gather_cfg.py:144
fwlite::AnalyzerWrapper::beginJob
virtual void beginJob()
everything which has to be done before the event loop
Definition: FWLiteAnalyzerWrapper.h:108
WrappedFWLiteAnalysisTasksAnalyzerJEC
fwlite::AnalyzerWrapper< AnalysisTasksAnalyzerJEC > WrappedFWLiteAnalysisTasksAnalyzerJEC
Definition: PatAnalysisTasksExercise.cc:7
AnalysisTasksAnalyzerBTag.h
ParameterSetReader.h
fwlite::AnalyzerWrapper
Definition: FWLiteAnalyzerWrapper.h:101
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FWLiteEnabler::enable
static void enable()
enable automatic library loading
Definition: FWLiteEnabler.cc:46
FWLiteAnalyzerWrapper.h
main
int main(int argc, char *argv[])
Definition: PatAnalysisTasksExercise.cc:9
WrappedFWLiteAnalysisTasksAnalyzerBTag
fwlite::AnalyzerWrapper< AnalysisTasksAnalyzerBTag > WrappedFWLiteAnalysisTasksAnalyzerBTag
Definition: PatAnalysisTasksExercise.cc:6
beamvalidation.exit
def exit(msg="")
Definition: beamvalidation.py:53
fwlite::AnalyzerWrapper::analyze
virtual void analyze()
everything which has to be done during the event loop. NOTE: the event will be looped inside this fun...
Definition: FWLiteAnalyzerWrapper.h:151
fwlite::AnalyzerWrapper::endJob
virtual void endJob()
everything which has to be done after the event loop
Definition: FWLiteAnalyzerWrapper.h:112