#include <mytests/ClusterCount/src/ClusterCount.cc>
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_ |
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 44 of file ClusterCount.h.
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.) }
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(); } } }
edm::InputTag ClusterCount::clusterLabel_ [private] |
Definition at line 57 of file ClusterCount.h.
Referenced by analyze(), and ClusterCount().