Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
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
}
geometryXMLtoCSV.parser
tuple parser
Definition:
geometryXMLtoCSV.py:78
optutl::CommandLineParser::parseArguments
void parseArguments(int argc, char **argv, bool allowArgs=false)
Definition:
CommandLineParser.cc:71
optutl::CommandLineParser
Definition:
CommandLineParser.h:11
Handle.h
main
int main(int argc, char **argv)
Definition:
aligncond_split_iov.cc:169
EventContainer.h
CommandLineParser.h
dirstructure.argv
argv
Definition:
dirstructure.py:20
fwlite::EventContainer::atEnd
bool atEnd() const
Definition:
EventContainer.cc:169
dir2webdir.argc
tuple argc
Definition:
dir2webdir.py:41
fwlite::EventContainer
Definition:
EventContainer.h:22
fwlite::EventContainer::toBegin
const EventContainer & toBegin()
Definition:
EventContainer.cc:156
InputTag.h
Jet.h
Generated for CMSSW Reference Manual by
1.8.5