PhysicsTools
PatExamples
bin
PatMuonFWLiteAnalyzer.cc
Go to the documentation of this file.
1
#include "
PhysicsTools/PatExamples/interface/PatMuonAnalyzer.h
"
2
#include "
FWCore/ParameterSetReader/interface/ParameterSetReader.h
"
3
#include "
PhysicsTools/UtilAlgos/interface/FWLiteAnalyzerWrapper.h
"
4
5
typedef
fwlite::AnalyzerWrapper<PatMuonAnalyzer>
PatMuonFWLiteAnalyzer
;
6
7
int
main
(
int
argc
,
char
*
argv
[]) {
8
// load framework libraries
9
gSystem->Load(
"libFWCoreFWLite"
);
10
FWLiteEnabler::enable
();
11
12
// only allow one argument for this simple example which should be the
13
// the python cfg file
14
if
(
argc
< 2) {
15
std::cout
<<
"Usage : "
<<
argv
[0] <<
" [parameters.py]"
<< std::endl;
16
return
0;
17
}
18
if
(!
edm::readPSetsFrom
(
argv
[1])->existsAs<edm::ParameterSet>(
"process"
)) {
19
std::cout
<<
" ERROR: ParametersSet 'plot' is missing in your configuration file"
<< std::endl;
20
exit
(0);
21
}
22
23
PatMuonFWLiteAnalyzer
ana(
edm::readPSetsFrom
(
argv
[1])->getParameter<edm::ParameterSet>(
"process"
),
24
std::string
(
"patMuonAnalyzer"
),
25
std::string
(
"patMuonAnalyzer"
));
26
ana.
beginJob
();
27
ana.
analyze
();
28
ana.
endJob
();
29
return
0;
30
}
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
PatMuonAnalyzer.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
PatMuonFWLiteAnalyzer
fwlite::AnalyzerWrapper< PatMuonAnalyzer > PatMuonFWLiteAnalyzer
Definition:
PatMuonFWLiteAnalyzer.cc:5
FWLiteAnalyzerWrapper.h
beamvalidation.exit
def exit(msg="")
Definition:
beamvalidation.py:53
main
int main(int argc, char *argv[])
Definition:
PatMuonFWLiteAnalyzer.cc:7
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
Generated for CMSSW Reference Manual by
1.8.16