CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
ClusterCount Class Reference

#include <mytests/ClusterCount/src/ClusterCount.cc>

Inheritance diagram for ClusterCount:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

 ClusterCount (const edm::ParameterSet &)
 
 ~ClusterCount () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 

Private Attributes

edm::EDGetTokenT< edm::DetSetVector< SiStripCluster > > clusterToken_
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 44 of file ClusterCount.h.

Constructor & Destructor Documentation

ClusterCount::ClusterCount ( const edm::ParameterSet iConfig)
explicit

Definition at line 6 of file ClusterCount.cc.

References clusterToken_, and edm::ParameterSet::getParameter().

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 }
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::DetSetVector< SiStripCluster > > clusterToken_
Definition: ClusterCount.h:59
ClusterCount::~ClusterCount ( )
override

Definition at line 16 of file ClusterCount.cc.

17 {
18 
19  // do anything here that needs to be done at desctruction time
20  // (e.g. close files, deallocate resources etc.)
21 
22 }

Member Function Documentation

void ClusterCount::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 35 of file ClusterCount.cc.

References begin, edm::DetSetVector< T >::begin(), fastPrimaryVertexProducer_cfi::clusters, clusterToken_, TauDecayModes::dec, end, edm::DetSetVector< T >::end(), edm::Event::getByToken(), LogDebug, and edm::Handle< T >::product().

36 {
37  using namespace edm;
38  // look at the clusters
40  iEvent.getByToken(clusterToken_, clusters);
41  const edm::DetSetVector<SiStripCluster>* clusterSet = clusters.product();
42  // loop on the detsetvector<cluster>
43  for (edm::DetSetVector<SiStripCluster>::const_iterator DSViter=clusterSet->begin(); DSViter!=clusterSet->end();DSViter++ ) {
46  for(edm::DetSet<SiStripCluster>::const_iterator iter=begin;iter!=end;++iter) {
47  LogDebug("ReconstructedClusters") << "Detid/Strip: " << std::hex << DSViter->id << std::dec << " / " << iter->barycenter();
48  }
49  }
50 }
#define LogDebug(id)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
edm::EDGetTokenT< edm::DetSetVector< SiStripCluster > > clusterToken_
Definition: ClusterCount.h:59
#define end
Definition: vmac.h:39
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:361
T const * product() const
Definition: Handle.h:81
#define begin
Definition: vmac.h:32
HLT enums.
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:346
collection_type::const_iterator const_iterator
Definition: DetSet.h:33
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:104
void ClusterCount::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprivate

Definition at line 24 of file ClusterCount.cc.

26  {
27 }

Member Data Documentation

edm::EDGetTokenT<edm::DetSetVector<SiStripCluster> > ClusterCount::clusterToken_
private

Definition at line 59 of file ClusterCount.h.

Referenced by analyze(), and ClusterCount().