Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
DPGAnalysis
SiStripTools
plugins
L1ABCDebugger.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: SiStripTools
4
// Class: L1ABCDebugger
5
//
13
//
14
// Original Author: Andrea Venturi
15
// Created: Tue Jul 19 11:56:00 CEST 2009
16
//
17
//
18
19
20
// system include files
21
#include <memory>
22
23
// user include files
24
#include "TH1F.h"
25
#include "TProfile.h"
26
#include <vector>
27
#include <string>
28
29
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
30
#include "
FWCore/Framework/interface/EDAnalyzer.h
"
31
32
#include "
FWCore/Framework/interface/Event.h
"
33
#include "
FWCore/Framework/interface/Run.h
"
34
#include "
FWCore/Framework/interface/MakerMacros.h
"
35
36
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
37
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
38
39
#include "
FWCore/Utilities/interface/InputTag.h
"
40
41
#include "
DataFormats/Scalers/interface/L1AcceptBunchCrossing.h
"
42
//
43
// class decleration
44
//
45
46
class
L1ABCDebugger
:
public
edm::EDAnalyzer
{
47
public
:
48
explicit
L1ABCDebugger
(
const
edm::ParameterSet
&);
49
~L1ABCDebugger
();
50
51
52
private
:
53
virtual
void
beginJob
() ;
54
virtual
void
analyze
(
const
edm::Event
&,
const
edm::EventSetup
&)
override
;
55
virtual
void
endJob
() ;
56
57
// ----------member data ---------------------------
58
59
edm::InputTag
_l1abccollection
;
60
};
61
62
//
63
// constants, enums and typedefs
64
//
65
66
//
67
// static data member definitions
68
//
69
70
//
71
// constructors and destructor
72
//
73
L1ABCDebugger::L1ABCDebugger
(
const
edm::ParameterSet
& iConfig):
74
_l1abccollection(iConfig.getParameter<edm::InputTag>(
"l1ABCCollection"
))
75
{
76
//now do what ever initialization is needed
77
78
}
79
80
81
L1ABCDebugger::~L1ABCDebugger
()
82
{
83
84
// do anything here that needs to be done at desctruction time
85
// (e.g. close files, deallocate resources etc.)
86
87
}
88
89
90
//
91
// member functions
92
//
93
94
// ------------ method called to for each event ------------
95
void
96
L1ABCDebugger::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
97
{
98
using namespace
edm;
99
100
Handle<L1AcceptBunchCrossingCollection >
pIn;
101
iEvent.
getByLabel
(
_l1abccollection
,pIn);
102
103
// offset computation
104
105
edm::LogInfo
(
"L1ABCDebug"
) <<
"Dump of L1AcceptBunchCrossing Collection"
;
106
107
for
(L1AcceptBunchCrossingCollection::const_iterator l1abc=pIn->begin();l1abc!=pIn->end();++l1abc) {
108
edm::LogVerbatim
(
"L1ABCDebug"
) << *l1abc;
109
}
110
111
}
112
113
// ------------ method called once each job just before starting event loop ------------
114
void
115
L1ABCDebugger::beginJob
()
116
{
117
118
}
119
120
// ------------ method called once each job just after ending the event loop ------------
121
void
122
L1ABCDebugger::endJob
()
123
{
124
}
125
126
127
//define this as a plug-in
128
DEFINE_FWK_MODULE
(
L1ABCDebugger
);
MessageLogger.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
Event.h
MakerMacros.h
edm::Handle
Definition:
AssociativeIterator.h:48
Frameworkfwd.h
L1ABCDebugger::analyze
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
L1ABCDebugger.cc:96
ParameterSet.h
L1ABCDebugger::~L1ABCDebugger
~L1ABCDebugger()
Definition:
L1ABCDebugger.cc:81
L1ABCDebugger
Definition:
L1ABCDebugger.cc:46
iEvent
int iEvent
Definition:
GenABIO.cc:243
L1ABCDebugger::L1ABCDebugger
L1ABCDebugger(const edm::ParameterSet &)
Definition:
L1ABCDebugger.cc:73
edm::EventSetup
Definition:
EventSetup.h:44
Run.h
edm::LogVerbatim
Definition:
MessageLogger.h:240
edm::Event::getByLabel
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition:
Event.h:361
edm::EDAnalyzer
Definition:
EDAnalyzer.h:15
EDAnalyzer.h
L1ABCDebugger::endJob
virtual void endJob()
Definition:
L1ABCDebugger.cc:122
edm::LogInfo
Definition:
MessageLogger.h:214
L1AcceptBunchCrossing.h
L1ABCDebugger::_l1abccollection
edm::InputTag _l1abccollection
Definition:
L1ABCDebugger.cc:59
edm::InputTag
Definition:
InputTag.h:17
L1ABCDebugger::beginJob
virtual void beginJob()
Definition:
L1ABCDebugger.cc:115
InputTag.h
edm::ParameterSet
Definition:
ParameterSet.h:35
edm::Event
Definition:
Event.h:56
Generated for CMSSW Reference Manual by
1.8.5