CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions | Private Attributes
CSCSegmentProducer Class Reference

#include <CSCSegmentProducer.h>

Inheritance diagram for CSCSegmentProducer:
edm::stream::EDProducer<>

Public Member Functions

 CSCSegmentProducer (const edm::ParameterSet &)
 Constructor. More...
 
void produce (edm::Event &, const edm::EventSetup &) override
 Produce the CSCSegment collection. More...
 
 ~CSCSegmentProducer () override
 Destructor. More...
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Attributes

int iev
 
edm::EDGetTokenT< CSCRecHit2DCollectionm_token
 
CSCSegmentBuildersegmentBuilder_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
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
 

Detailed Description

Produces a collection of CSCSegment's in endcap muon CSCs.

Definition at line 19 of file CSCSegmentProducer.h.

Constructor & Destructor Documentation

◆ CSCSegmentProducer()

CSCSegmentProducer::CSCSegmentProducer ( const edm::ParameterSet pas)
explicit

Constructor.

Definition at line 18 of file CSCSegmentProducer.cc.

18  : iev(0) {
19  m_token = consumes<CSCRecHit2DCollection>(pas.getParameter<edm::InputTag>("inputObjects"));
20  segmentBuilder_ = new CSCSegmentBuilder(pas); // pass on the PS
21 
22  // register what this produces
23  produces<CSCSegmentCollection>();
24 }

References edm::ParameterSet::getParameter(), m_token, and segmentBuilder_.

◆ ~CSCSegmentProducer()

CSCSegmentProducer::~CSCSegmentProducer ( )
override

Destructor.

Definition at line 26 of file CSCSegmentProducer.cc.

26  {
27  LogDebug("CSCSegment|CSC") << "deleting CSCSegmentBuilder after " << iev << " events w/csc data.";
28  delete segmentBuilder_;
29 }

References iev, LogDebug, and segmentBuilder_.

Member Function Documentation

◆ produce()

void CSCSegmentProducer::produce ( edm::Event ev,
const edm::EventSetup setup 
)
override

Produce the CSCSegment collection.

Definition at line 31 of file CSCSegmentProducer.cc.

31  {
32  LogDebug("CSCSegment|CSC") << "start producing segments for " << ++iev << "th event with csc data";
33 
34  // find the geometry (& conditions?) for this event & cache it in the builder
35 
37  setup.get<MuonGeometryRecord>().get(h);
38  const CSCGeometry* pgeom = &*h;
40 
41  // get the collection of CSCRecHit2D
43  ev.getByToken(m_token, cscRecHits);
44 
45  // create empty collection of Segments
46  auto oc = std::make_unique<CSCSegmentCollection>();
47 
48  // fill the collection
49  segmentBuilder_->build(cscRecHits.product(), *oc); //@@ FILL oc
50 
51  // put collection in event
52  ev.put(std::move(oc));
53 }

References CSCSegmentBuilder::build(), ev, get, h, iev, LogDebug, m_token, eostools::move(), edm::Handle< T >::product(), segmentBuilder_, CSCSegmentBuilder::setGeometry(), and singleTopDQM_cfi::setup.

Member Data Documentation

◆ iev

int CSCSegmentProducer::iev
private

Definition at line 29 of file CSCSegmentProducer.h.

Referenced by produce(), and ~CSCSegmentProducer().

◆ m_token

edm::EDGetTokenT<CSCRecHit2DCollection> CSCSegmentProducer::m_token
private

Definition at line 31 of file CSCSegmentProducer.h.

Referenced by CSCSegmentProducer(), and produce().

◆ segmentBuilder_

CSCSegmentBuilder* CSCSegmentProducer::segmentBuilder_
private

Definition at line 30 of file CSCSegmentProducer.h.

Referenced by CSCSegmentProducer(), produce(), and ~CSCSegmentProducer().

CSCSegmentProducer::m_token
edm::EDGetTokenT< CSCRecHit2DCollection > m_token
Definition: CSCSegmentProducer.h:31
edm::Handle::product
T const * product() const
Definition: Handle.h:70
CSCSegmentBuilder::setGeometry
void setGeometry(const CSCGeometry *geom)
Definition: CSCSegmentBuilder.cc:103
h
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Definition: L1TUtmAlgorithmRcd.h:4
CSCSegmentBuilder::build
void build(const CSCRecHit2DCollection *rechits, CSCSegmentCollection &oc)
Definition: CSCSegmentBuilder.cc:61
edm::Handle< CSCRecHit2DCollection >
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
CSCSegmentProducer::iev
int iev
Definition: CSCSegmentProducer.h:29
CSCGeometry
Definition: CSCGeometry.h:24
edm::ESHandle< CSCGeometry >
CSCSegmentProducer::segmentBuilder_
CSCSegmentBuilder * segmentBuilder_
Definition: CSCSegmentProducer.h:30
h
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
get
#define get
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
eostools.move
def move(src, dest)
Definition: eostools.py:511
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
CSCSegmentBuilder
Definition: CSCSegmentBuilder.h:25
MuonGeometryRecord
Definition: MuonGeometryRecord.h:34
edm::InputTag
Definition: InputTag.h:15