CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ClusterCount.cc
Go to the documentation of this file.
2 
3 //
4 // constructors and destructor
5 //
7 
8 {
9  //now do what ever initialization is needed
10  clusterLabel_ = iConfig.getParameter<edm::InputTag>("ClustersLabel");
11 
12 }
13 
14 
16 {
17 
18  // do anything here that needs to be done at desctruction time
19  // (e.g. close files, deallocate resources etc.)
20 
21 }
22 
23 
24 //
25 // member functions
26 //
27 
28 // ------------ method called to for each event ------------
29 void
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 }
46 
#define LogDebug(id)
T getParameter(std::string const &) const
ClusterCount(const edm::ParameterSet &)
Definition: ClusterCount.cc:6
edm::InputTag clusterLabel_
Definition: ClusterCount.h:57
int iEvent
Definition: GenABIO.cc:243
#define end
Definition: vmac.h:38
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: ClusterCount.cc:30
#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