DQM
SiStripCommissioningSources
plugins
tracking
ClusterCount.cc
Go to the documentation of this file.
1
#include "
DQM/SiStripCommissioningSources/plugins/tracking/ClusterCount.h
"
2
3
//
4
// constructors and destructor
5
//
6
ClusterCount::ClusterCount
(
const
edm::ParameterSet
& iConfig)
7
8
{
9
//now do what ever initialization is needed
10
// clusterLabel_ = iConfig.getParameter<edm::InputTag>("ClustersLabel");
11
clusterToken_
= consumes<edm::DetSetVector<SiStripCluster> >(iConfig.
getParameter
<
edm::InputTag
>(
"ClustersLabel"
));
12
}
13
14
ClusterCount::~ClusterCount
() {
15
// do anything here that needs to be done at desctruction time
16
// (e.g. close files, deallocate resources etc.)
17
}
18
19
void
ClusterCount::bookHistograms
(
DQMStore::IBooker
& iBooker,
edm::Run
const
&,
edm::EventSetup
const
&) {}
20
21
//
22
// member functions
23
//
24
25
// ------------ method called to for each event ------------
26
void
ClusterCount::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup) {
27
using namespace
edm
;
28
// look at the clusters
29
edm::Handle<edm::DetSetVector<SiStripCluster>
>
clusters
;
30
iEvent
.getByToken(
clusterToken_
,
clusters
);
31
const
edm::DetSetVector<SiStripCluster>
* clusterSet =
clusters
.product();
32
// loop on the detsetvector<cluster>
33
for
(
edm::DetSetVector<SiStripCluster>::const_iterator
DSViter = clusterSet->
begin
(); DSViter != clusterSet->
end
();
34
DSViter++) {
35
edm::DetSet<SiStripCluster>::const_iterator
begin = DSViter->data.begin();
36
edm::DetSet<SiStripCluster>::const_iterator
end
= DSViter->data.end();
37
for
(
edm::DetSet<SiStripCluster>::const_iterator
iter = begin; iter !=
end
; ++iter) {
38
LogDebug
(
"ReconstructedClusters"
) <<
"Detid/Strip: "
<< std::hex << DSViter->id <<
std::dec
<<
" / "
39
<< iter->barycenter();
40
}
41
}
42
}
ClusterCount::~ClusterCount
~ClusterCount() override
Definition:
ClusterCount.cc:14
edm::DetSetVector
Definition:
DetSetVector.h:61
ClusterCount::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
ClusterCount.cc:26
edm::DetSetVector::end
iterator end()
Return the off-the-end iterator.
Definition:
DetSetVector.h:325
edm::Run
Definition:
Run.h:45
edm
HLT enums.
Definition:
AlignableModifier.h:19
ClusterCount::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition:
ClusterCount.cc:19
edm::DetSetVector::begin
iterator begin()
Return an iterator to the first DetSet.
Definition:
DetSetVector.h:314
edm::Handle
Definition:
AssociativeIterator.h:50
mps_fire.end
end
Definition:
mps_fire.py:242
ClusterCount::clusterToken_
edm::EDGetTokenT< edm::DetSetVector< SiStripCluster > > clusterToken_
Definition:
ClusterCount.h:54
bsc_activity_cfg.clusters
clusters
Definition:
bsc_activity_cfg.py:36
LogDebug
#define LogDebug(id)
Definition:
MessageLogger.h:223
edm::ParameterSet
Definition:
ParameterSet.h:47
edm::DetSetVector::const_iterator
collection_type::const_iterator const_iterator
Definition:
DetSetVector.h:102
iEvent
int iEvent
Definition:
GenABIO.cc:224
ClusterCount.h
edm::EventSetup
Definition:
EventSetup.h:57
ClusterCount::ClusterCount
ClusterCount(const edm::ParameterSet &)
Definition:
ClusterCount.cc:6
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
dqm::implementation::IBooker
Definition:
DQMStore.h:43
edm::Event
Definition:
Event.h:73
TauDecayModes.dec
dec
Definition:
TauDecayModes.py:143
edm::InputTag
Definition:
InputTag.h:15
edm::DetSet::const_iterator
collection_type::const_iterator const_iterator
Definition:
DetSet.h:31
Generated for CMSSW Reference Manual by
1.8.16