CMS 3D CMS Logo

ClusterCount Class Reference

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

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

Inheritance diagram for ClusterCount:

edm::EDAnalyzer

List of all members.

Public Member Functions

 ClusterCount (const edm::ParameterSet &)
 ~ClusterCount ()

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void beginJob (const edm::EventSetup &)
virtual void endJob ()

Private Attributes

edm::InputTag clusterLabel_


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 clusterLabel_, and edm::ParameterSet::getParameter().

00008 {
00009    //now do what ever initialization is needed
00010    clusterLabel_ = iConfig.getParameter<edm::InputTag>("ClustersLabel");
00011    
00012 }

ClusterCount::~ClusterCount (  ) 

Definition at line 15 of file ClusterCount.cc.

00016 {
00017  
00018    // do anything here that needs to be done at desctruction time
00019    // (e.g. close files, deallocate resources etc.)
00020 
00021 }


Member Function Documentation

void ClusterCount::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDAnalyzer.

Definition at line 30 of file ClusterCount.cc.

References edm::DetSetVector< T >::begin(), begin, clusterLabel_, end, edm::DetSetVector< T >::end(), edm::Event::getByLabel(), iter, LogDebug, and edm::Handle< T >::product().

00031 {
00032    using namespace edm;
00033    // look at the clusters
00034    edm::Handle<edm::DetSetVector<SiStripCluster> > clusters;
00035    iEvent.getByLabel(clusterLabel_, clusters);
00036    const edm::DetSetVector<SiStripCluster>* clusterSet = clusters.product();
00037    // loop on the detsetvector<cluster>
00038    for (edm::DetSetVector<SiStripCluster>::const_iterator DSViter=clusterSet->begin(); DSViter!=clusterSet->end();DSViter++ ) {
00039      edm::DetSet<SiStripCluster>::const_iterator begin=DSViter->data.begin();
00040      edm::DetSet<SiStripCluster>::const_iterator end  =DSViter->data.end();
00041      for(edm::DetSet<SiStripCluster>::const_iterator iter=begin;iter!=end;++iter) {
00042        LogDebug("ReconstructedClusters") << "Detid/Strip: " << std::hex << DSViter->id << std::dec << " / " << iter->barycenter();
00043      }
00044    }
00045 }

void ClusterCount::beginJob ( const edm::EventSetup  )  [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 50 of file ClusterCount.cc.

00051 {
00052 }

void ClusterCount::endJob ( void   )  [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 56 of file ClusterCount.cc.

00056                      {
00057 }


Member Data Documentation

edm::InputTag ClusterCount::clusterLabel_ [private]

Definition at line 56 of file ClusterCount.h.

Referenced by analyze(), and ClusterCount().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:16:21 2009 for CMSSW by  doxygen 1.5.4