CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ME0SegmentProducer Class Reference
Inheritance diagram for ME0SegmentProducer:
edm::stream::EDProducer<>

Public Member Functions

 ME0SegmentProducer (const edm::ParameterSet &)
 Constructor. More...
 
void produce (edm::Event &, const edm::EventSetup &) override
 Produce the ME0Segment collection. More...
 
 ~ME0SegmentProducer () 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
 
std::unique_ptr< ME0SegmentBuildersegmentBuilder_
 
edm::EDGetTokenT< ME0RecHitCollectiontheME0RecHitToken
 

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

CSCSegmentProducer Produces a collection of ME0Segment's in endcap muon ME0s.

Author
Marcello Maggi

Definition at line 23 of file ME0SegmentProducer.cc.

Constructor & Destructor Documentation

◆ ME0SegmentProducer()

ME0SegmentProducer::ME0SegmentProducer ( const edm::ParameterSet ps)
explicit

Constructor.

Definition at line 38 of file ME0SegmentProducer.cc.

38  : iev(0) {
39  theME0RecHitToken = consumes<ME0RecHitCollection>(ps.getParameter<edm::InputTag>("me0RecHitLabel"));
40  segmentBuilder_ = std::make_unique<ME0SegmentBuilder>(ps); // pass on the Parameter Set
41 
42  // register what this produces
43  produces<ME0SegmentCollection>();
44 }

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

◆ ~ME0SegmentProducer()

ME0SegmentProducer::~ME0SegmentProducer ( )
inlineoverride

Destructor.

Definition at line 28 of file ME0SegmentProducer.cc.

28 {}

Member Function Documentation

◆ produce()

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

Produce the ME0Segment collection.

Definition at line 46 of file ME0SegmentProducer.cc.

46  {
47  LogDebug("ME0SegmentProducer") << "start producing segments for " << ++iev << "th event with ME0 data";
48 
49  // find the geometry (& conditions?) for this event & cache it in the builder
51  setup.get<MuonGeometryRecord>().get(me0g);
52  const ME0Geometry* mgeom = &*me0g;
53  segmentBuilder_->setGeometry(mgeom);
54 
55  // get the collection of ME0RecHit
57  ev.getByToken(theME0RecHitToken, me0RecHits);
58 
59  // create empty collection of Segments
60  auto oc = std::make_unique<ME0SegmentCollection>();
61 
62  // fill the collection
63  segmentBuilder_->build(me0RecHits.product(), *oc); //@@ FILL oc
64 
65  // put collection in event
66  ev.put(std::move(oc));
67 }

References ev, get, iev, LogDebug, me0RecHits_cfi::me0RecHits, eostools::move(), segmentBuilder_, singleTopDQM_cfi::setup, and theME0RecHitToken.

Member Data Documentation

◆ iev

int ME0SegmentProducer::iev
private

Definition at line 33 of file ME0SegmentProducer.cc.

Referenced by produce().

◆ segmentBuilder_

std::unique_ptr<ME0SegmentBuilder> ME0SegmentProducer::segmentBuilder_
private

Definition at line 35 of file ME0SegmentProducer.cc.

Referenced by ME0SegmentProducer(), and produce().

◆ theME0RecHitToken

edm::EDGetTokenT<ME0RecHitCollection> ME0SegmentProducer::theME0RecHitToken
private

Definition at line 34 of file ME0SegmentProducer.cc.

Referenced by ME0SegmentProducer(), and produce().

ME0Geometry
Definition: ME0Geometry.h:12
me0RecHits_cfi.me0RecHits
me0RecHits
Definition: me0RecHits_cfi.py:3
ME0SegmentProducer::segmentBuilder_
std::unique_ptr< ME0SegmentBuilder > segmentBuilder_
Definition: ME0SegmentProducer.cc:35
edm::Handle
Definition: AssociativeIterator.h:50
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
edm::ESHandle< ME0Geometry >
ME0SegmentProducer::iev
int iev
Definition: ME0SegmentProducer.cc:33
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
get
#define get
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
ME0SegmentProducer::theME0RecHitToken
edm::EDGetTokenT< ME0RecHitCollection > theME0RecHitToken
Definition: ME0SegmentProducer.cc:34
eostools.move
def move(src, dest)
Definition: eostools.py:511
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
MuonGeometryRecord
Definition: MuonGeometryRecord.h:34
edm::InputTag
Definition: InputTag.h:15