Go to the documentation of this file.00001 #include "PhysicsTools/PatExamples/interface/PatMuonAnalyzer.h"
00002 #include "FWCore/PythonParameterSet/interface/MakeParameterSets.h"
00003 #include "PhysicsTools/UtilAlgos/interface/FWLiteAnalyzerWrapper.h"
00004
00005 typedef fwlite::AnalyzerWrapper<PatMuonAnalyzer> PatMuonFWLiteAnalyzer;
00006
00007 int main(int argc, char* argv[])
00008 {
00009
00010 gSystem->Load( "libFWCoreFWLite" );
00011 AutoLibraryLoader::enable();
00012
00013
00014
00015 if ( argc < 2 ) {
00016 std::cout << "Usage : " << argv[0] << " [parameters.py]" << std::endl;
00017 return 0;
00018 }
00019 if( !edm::readPSetsFrom(argv[1])->existsAs<edm::ParameterSet>("process") ){
00020 std::cout << " ERROR: ParametersSet 'plot' is missing in your configuration file" << std::endl; exit(0);
00021 }
00022
00023 PatMuonFWLiteAnalyzer ana(edm::readPSetsFrom(argv[1])->getParameter<edm::ParameterSet>("process"), std::string("patMuonAnalyzer"), std::string("patMuonAnalyzer"));
00024 ana.beginJob();
00025 ana.analyze();
00026 ana.endJob();
00027 return 0;
00028 }