PhysicsTools
FWLite
examples
blank.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
3
// CMS includes
4
#include "
FWCore/Utilities/interface/InputTag.h
"
5
#include "
DataFormats/Common/interface/Handle.h
"
6
#include "
DataFormats/PatCandidates/interface/Jet.h
"
7
8
#include "
PhysicsTools/FWLite/interface/EventContainer.h
"
9
#include "
PhysicsTools/FWLite/interface/CommandLineParser.h
"
10
11
// Root includes
12
#include "TROOT.h"
13
14
using namespace
std
;
15
17
// ///////////////////// //
18
// // Main Subroutine // //
19
// ///////////////////// //
21
22
int
main
(
int
argc
,
char
*
argv
[])
23
{
25
// ////////////////////////// //
26
// // Command Line Options // //
27
// ////////////////////////// //
29
30
31
// Tell people what this analysis code does and setup default options.
32
optutl::CommandLineParser
parser
(
""
);
33
35
// Change any defaults or add any new command //
36
// line options you would like here. //
38
39
// Parse the command line arguments
40
parser
.parseArguments (
argc
,
argv
);
41
43
// //////////////////////////// //
44
// // Create Event Container // //
45
// //////////////////////////// //
47
48
// This object 'event' is used both to get all information from the
49
// event as well as to store histograms, etc.
50
fwlite::EventContainer
eventCont (
parser
);
51
53
// ////////////////////////////////// //
54
// // Begin Run // //
55
// // (e.g., book histograms, etc) // //
56
// ////////////////////////////////// //
58
59
// Setup a style
60
gROOT->SetStyle (
"Plain"
);
61
62
// Book those histograms!
63
65
// //////////////// //
66
// // Event Loop // //
67
// //////////////// //
69
70
for
(eventCont.
toBegin
(); ! eventCont.
atEnd
(); ++eventCont)
71
{
73
// Take What We Need From Event //
75
}
// for eventCont
76
77
79
// ////////////////// //
80
// // Clean Up Job // //
81
// ////////////////// //
83
84
// Histograms will be automatically written to the root file
85
// specificed by command line options.
86
87
// All done! Bye bye.
88
return
0;
89
}
main
int main(int argc, char *argv[])
Definition:
blank.cc:22
std
Definition:
JetResolutionObject.h:76
cmsBatch.argv
argv
Definition:
cmsBatch.py:279
fwlite::EventContainer::toBegin
const EventContainer & toBegin() override
Definition:
EventContainer.cc:113
optutl::CommandLineParser
Definition:
CommandLineParser.h:10
EventContainer.h
CommandLineParser.h
fwlite::EventContainer::atEnd
bool atEnd() const override
Definition:
EventContainer.cc:124
fwlite::EventContainer
Definition:
EventContainer.h:21
writedatasetfile.parser
parser
Definition:
writedatasetfile.py:7
dir2webdir.argc
argc
Definition:
dir2webdir.py:39
InputTag.h
Jet.h
Handle.h
Generated for CMSSW Reference Manual by
1.8.14