CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

ClusterCount Class Reference

#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 &)

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().

{
   //now do what ever initialization is needed
   clusterLabel_ = iConfig.getParameter<edm::InputTag>("ClustersLabel");
   
}
ClusterCount::~ClusterCount ( )

Definition at line 15 of file ClusterCount.cc.

{
 
   // do anything here that needs to be done at desctruction time
   // (e.g. close files, deallocate resources etc.)

}

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 begin, clusterLabel_, end, edm::Event::getByLabel(), and LogDebug.

{
   using namespace edm;
   // look at the clusters
   edm::Handle<edm::DetSetVector<SiStripCluster> > clusters;
   iEvent.getByLabel(clusterLabel_, clusters);
   const edm::DetSetVector<SiStripCluster>* clusterSet = clusters.product();
   // loop on the detsetvector<cluster>
   for (edm::DetSetVector<SiStripCluster>::const_iterator DSViter=clusterSet->begin(); DSViter!=clusterSet->end();DSViter++ ) {
     edm::DetSet<SiStripCluster>::const_iterator begin=DSViter->data.begin();
     edm::DetSet<SiStripCluster>::const_iterator end  =DSViter->data.end();
     for(edm::DetSet<SiStripCluster>::const_iterator iter=begin;iter!=end;++iter) {
       LogDebug("ReconstructedClusters") << "Detid/Strip: " << std::hex << DSViter->id << std::dec << " / " << iter->barycenter();
     }
   }
}

Member Data Documentation

Definition at line 57 of file ClusterCount.h.

Referenced by analyze(), and ClusterCount().