CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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:
edm::EDAnalyzer

Public Member Functions

 ClusterCount (const edm::ParameterSet &)
 
 ~ClusterCount ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Member Functions

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

Private Attributes

edm::InputTag clusterLabel_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

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

8 {
9  //now do what ever initialization is needed
10  clusterLabel_ = iConfig.getParameter<edm::InputTag>("ClustersLabel");
11 
12 }
T getParameter(std::string const &) const
edm::InputTag clusterLabel_
Definition: ClusterCount.h:57
ClusterCount::~ClusterCount ( )

Definition at line 15 of file ClusterCount.cc.

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

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 30 of file ClusterCount.cc.

References begin, clusterLabel_, end, edm::Event::getByLabel(), and LogDebug.

31 {
32  using namespace edm;
33  // look at the clusters
35  iEvent.getByLabel(clusterLabel_, clusters);
36  const edm::DetSetVector<SiStripCluster>* clusterSet = clusters.product();
37  // loop on the detsetvector<cluster>
38  for (edm::DetSetVector<SiStripCluster>::const_iterator DSViter=clusterSet->begin(); DSViter!=clusterSet->end();DSViter++ ) {
41  for(edm::DetSet<SiStripCluster>::const_iterator iter=begin;iter!=end;++iter) {
42  LogDebug("ReconstructedClusters") << "Detid/Strip: " << std::hex << DSViter->id << std::dec << " / " << iter->barycenter();
43  }
44  }
45 }
#define LogDebug(id)
edm::InputTag clusterLabel_
Definition: ClusterCount.h:57
#define end
Definition: vmac.h:38
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
#define begin
Definition: vmac.h:31
collection_type::const_iterator const_iterator
Definition: DetSet.h:34
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:106

Member Data Documentation

edm::InputTag ClusterCount::clusterLabel_
private

Definition at line 57 of file ClusterCount.h.

Referenced by analyze(), and ClusterCount().