CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PatAnalysisTasksExercise.cc
Go to the documentation of this file.
5 
8 
9 int main(int argc, char* argv[])
10 {
11  // load framework libraries
12  gSystem->Load( "libFWCoreFWLite" );
14 
15  // only allow one argument for this simple example which should be the
16  // the python cfg file
17  if ( argc < 2 ) {
18  std::cout << "Usage : " << argv[0] << " [parameters.py]" << std::endl;
19  return 0;
20  }
21  if( !edm::readPSetsFrom(argv[1])->existsAs<edm::ParameterSet>("process") ){
22  std::cout << " ERROR: ParametersSet 'plot' is missing in your configuration file" << std::endl; exit(0);
23  }
24 
25  WrappedFWLiteAnalysisTasksAnalyzerBTag anaBTag(edm::readPSetsFrom(argv[1])->getParameter<edm::ParameterSet>("process"), std::string("btagAnalyzer"), std::string("analyzeBTag"));
26  WrappedFWLiteAnalysisTasksAnalyzerJEC anaJEC(edm::readPSetsFrom(argv[1])->getParameter<edm::ParameterSet>("process"), std::string("jecAnalyzer"), std::string("analyzeJEC"));
27  anaBTag.beginJob();
28  anaBTag.analyze();
29  anaBTag.endJob();
30  anaJEC.beginJob();
31  anaJEC.analyze();
32  anaJEC.endJob();
33  return 0;
34 }
std::shared_ptr< ParameterSet > readPSetsFrom(std::string const &fileOrString)
fwlite::AnalyzerWrapper< AnalysisTasksAnalyzerJEC > WrappedFWLiteAnalysisTasksAnalyzerJEC
static void enable()
enable automatic library loading
virtual void beginJob()
everything which has to be done before the event loop
virtual void endJob()
everything which has to be done after the event loop
fwlite::AnalyzerWrapper< AnalysisTasksAnalyzerBTag > WrappedFWLiteAnalysisTasksAnalyzerBTag
virtual void analyze()
everything which has to be done during the event loop. NOTE: the event will be looped inside this fun...
tuple argc
Definition: dir2webdir.py:38
tuple cout
Definition: gather_cfg.py:121