[CMSSW] / CMSSW / PhysicsTools / UtilAlgos / bin / FWLiteWithBasicAnalyzer.cc Repository:
ViewVC logotype

Annotation of /CMSSW/PhysicsTools/UtilAlgos/bin/FWLiteWithBasicAnalyzer.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (view) (download)

1 : rwolf 1.1 #include "PhysicsTools/UtilAlgos/interface/BasicMuonAnalyzer.h"
2 : rwolf 1.2 #include "FWCore/PythonParameterSet/interface/MakeParameterSets.h"
3 : rwolf 1.1 #include "PhysicsTools/UtilAlgos/interface/FWLiteAnalyzerWrapper.h"
4 :    
5 :     typedef fwlite::AnalyzerWrapper<BasicMuonAnalyzer> WrappedFWLiteMuonAnalyzer;
6 :    
7 :     int main(int argc, char* argv[])
8 :     {
9 :     // load framework libraries
10 :     gSystem->Load( "libFWCoreFWLite" );
11 :     AutoLibraryLoader::enable();
12 :    
13 :     // only allow one argument for this simple example which should be the
14 :     // the python cfg file
15 :     if ( argc < 2 ) {
16 :     std::cout << "Usage : " << argv[0] << " [parameters.py]" << std::endl;
17 :     return 0;
18 :     }
19 : rwolf 1.2 if( !edm::readPSetsFrom(argv[1])->existsAs<edm::ParameterSet>("process") ){
20 :     std::cout << " ERROR: ParametersSet 'plot' is missing in your configuration file" << std::endl; exit(0);
21 :     }
22 : rwolf 1.1
23 : rwolf 1.2 WrappedFWLiteMuonAnalyzer ana(edm::readPSetsFrom(argv[1])->getParameter<edm::ParameterSet>("process"), std::string("muonAnalyzer"), std::string("analyzeBasicPat"));
24 : rwolf 1.1 ana.beginJob();
25 :     ana.analyze();
26 :     ana.endJob();
27 :     return 0;
28 :     }

CERN LCG CVS service
ViewVC Help
Powered by ViewVC 1.0.9