CMS 3D CMS Logo

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:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 ClusterCount (const edm::ParameterSet &)
 
 ~ClusterCount () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 

Private Attributes

edm::EDGetTokenT< edm::DetSetVector< SiStripCluster > > clusterToken_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 43 of file ClusterCount.h.

Constructor & Destructor Documentation

◆ ClusterCount()

ClusterCount::ClusterCount ( const edm::ParameterSet iConfig)
explicit

Definition at line 6 of file ClusterCount.cc.

References clusterToken_, and edm::ParameterSet::getParameter().

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 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< edm::DetSetVector< SiStripCluster > > clusterToken_
Definition: ClusterCount.h:54

◆ ~ClusterCount()

ClusterCount::~ClusterCount ( )
override

Definition at line 14 of file ClusterCount.cc.

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

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 26 of file ClusterCount.cc.

References edm::DetSetVector< T >::begin(), bsc_activity_cfg::clusters, clusterToken_, TauDecayModes::dec, edm::DetSetVector< T >::end(), mps_fire::end, iEvent, and LogDebug.

26  {
27  using namespace edm;
28  // look at the clusters
30  iEvent.getByToken(clusterToken_, clusters);
31  const edm::DetSetVector<SiStripCluster>* clusterSet = clusters.product();
32  // loop on the detsetvector<cluster>
33  for (edm::DetSetVector<SiStripCluster>::const_iterator DSViter = clusterSet->begin(); DSViter != clusterSet->end();
34  DSViter++) {
35  edm::DetSet<SiStripCluster>::const_iterator begin = DSViter->data.begin();
37  for (edm::DetSet<SiStripCluster>::const_iterator iter = begin; iter != end; ++iter) {
38  LogDebug("ReconstructedClusters") << "Detid/Strip: " << std::hex << DSViter->id << std::dec << " / "
39  << iter->barycenter();
40  }
41  }
42 }
edm::EDGetTokenT< edm::DetSetVector< SiStripCluster > > clusterToken_
Definition: ClusterCount.h:54
int iEvent
Definition: GenABIO.cc:224
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:325
HLT enums.
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:314
collection_type::const_iterator const_iterator
Definition: DetSet.h:31
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102
#define LogDebug(id)

◆ bookHistograms()

void ClusterCount::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprivatevirtual

Implements DQMEDAnalyzer.

Definition at line 19 of file ClusterCount.cc.

19 {}

Member Data Documentation

◆ clusterToken_

edm::EDGetTokenT<edm::DetSetVector<SiStripCluster> > ClusterCount::clusterToken_
private

Definition at line 54 of file ClusterCount.h.

Referenced by analyze(), and ClusterCount().