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  clusterToken_ = consumes<edm::DetSetVector<SiStripCluster> >(iConfig.getParameter<edm::InputTag>("ClustersLabel") );
12 
13 }
14 
15 
17 {
18 
19  // do anything here that needs to be done at desctruction time
20  // (e.g. close files, deallocate resources etc.)
21 
22 }
23 
24 
25 //
26 // member functions
27 //
28 
29 // ------------ method called to for each event ------------
30 void
32 {
33  using namespace edm;
34  // look at the clusters
36  iEvent.getByToken(clusterToken_, clusters);
37  const edm::DetSetVector<SiStripCluster>* clusterSet = clusters.product();
38  // loop on the detsetvector<cluster>
39  for (edm::DetSetVector<SiStripCluster>::const_iterator DSViter=clusterSet->begin(); DSViter!=clusterSet->end();DSViter++ ) {
43  LogDebug("ReconstructedClusters") << "Detid/Strip: " << std::hex << DSViter->id << std::dec << " / " << iter->barycenter();
44  }
45  }
46 }
47 
#define LogDebug(id)
T getParameter(std::string const &) const
ClusterCount(const edm::ParameterSet &)
Definition: ClusterCount.cc:6
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
edm::EDGetTokenT< edm::DetSetVector< SiStripCluster > > clusterToken_
Definition: ClusterCount.h:58
int iEvent
Definition: GenABIO.cc:230
#define end
Definition: vmac.h:37
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: ClusterCount.cc:31
#define begin
Definition: vmac.h:30
collection_type::const_iterator const_iterator
Definition: DetSet.h:33
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:106