File indexing completed on 2024-04-06 12:24:16
0001 #include "PhysicsTools/UtilAlgos/interface/BasicMuonAnalyzer.h"
0002 #include "FWCore/ParameterSetReader/interface/ParameterSetReader.h"
0003 #include "PhysicsTools/FWLite/interface/FWLiteAnalyzerWrapper.h"
0004
0005 typedef fwlite::AnalyzerWrapper<BasicMuonAnalyzer> WrappedFWLiteMuonAnalyzer;
0006
0007 int main(int argc, char* argv[]) {
0008
0009 gSystem->Load("libFWCoreFWLite");
0010 FWLiteEnabler::enable();
0011
0012
0013
0014 if (argc < 2) {
0015 std::cout << "Usage : " << argv[0] << " [parameters.py]" << std::endl;
0016 return 0;
0017 }
0018 if (!edm::readPSetsFrom(argv[1])->existsAs<edm::ParameterSet>("process")) {
0019 std::cout << " ERROR: ParametersSet 'plot' is missing in your configuration file" << std::endl;
0020 exit(0);
0021 }
0022
0023 WrappedFWLiteMuonAnalyzer ana(edm::readPSetsFrom(argv[1])->getParameter<edm::ParameterSet>("process"),
0024 std::string("muonAnalyzer"),
0025 std::string("analyzeBasicPat"));
0026 ana.beginJob();
0027 ana.analyze();
0028 ana.endJob();
0029 return 0;
0030 }