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 edm::EDConsumerBase

Public Member Functions

 ClusterCount (const edm::ParameterSet &)
 
 ~ClusterCount ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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:361
#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().