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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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 >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache 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.

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 }

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

◆ ~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.

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 }

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

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

edm::DetSetVector
Definition: DetSetVector.h:61
edm::DetSetVector::end
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:325
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::DetSetVector::begin
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:314
edm::Handle
Definition: AssociativeIterator.h:50
end
#define end
Definition: vmac.h:39
ClusterCount::clusterToken_
edm::EDGetTokenT< edm::DetSetVector< SiStripCluster > > clusterToken_
Definition: ClusterCount.h:54
bsc_activity_cfg.clusters
clusters
Definition: bsc_activity_cfg.py:36
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::DetSetVector::const_iterator
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
edm::InputTag
Definition: InputTag.h:15
begin
#define begin
Definition: vmac.h:32
edm::DetSet::const_iterator
collection_type::const_iterator const_iterator
Definition: DetSet.h:31