CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CSCSegmentProducer.cc
Go to the documentation of this file.
1 
7 
12 
15 
17  m_token = consumes<CSCRecHit2DCollection>(pas.getParameter<edm::InputTag>("inputObjects"));
18  m_cscGeometryToken = esConsumes<CSCGeometry, MuonGeometryRecord>();
19  segmentBuilder_ = new CSCSegmentBuilder(pas); // pass on the PS
20 
21  // register what this produces
22  produces<CSCSegmentCollection>();
23 }
24 
26  LogDebug("CSCSegment|CSC") << "deleting CSCSegmentBuilder after " << iev << " events w/csc data.";
27  delete segmentBuilder_;
28 }
29 
31  LogDebug("CSCSegment|CSC") << "start producing segments for " << ++iev << "th event with csc data";
32 
33  // find the geometry (& conditions?) for this event & cache it in the builder
34 
36  const CSCGeometry* pgeom = &*h;
38 
39  // get the collection of CSCRecHit2D
41  ev.getByToken(m_token, cscRecHits);
42 
43  // create empty collection of Segments
44  auto oc = std::make_unique<CSCSegmentCollection>();
45 
46  // fill the collection
47  segmentBuilder_->build(cscRecHits.product(), *oc); //@@ FILL oc
48 
49  // put collection in event
50  ev.put(std::move(oc));
51 }
void produce(edm::Event &, const edm::EventSetup &) override
Produce the CSCSegment collection.
void build(const CSCRecHit2DCollection *rechits, CSCSegmentCollection &oc)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
bool ev
edm::EDGetTokenT< CSCRecHit2DCollection > m_token
def move
Definition: eostools.py:511
CSCSegmentBuilder * segmentBuilder_
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > m_cscGeometryToken
T const * product() const
Definition: Handle.h:70
CSCSegmentProducer(const edm::ParameterSet &)
Constructor.
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:157
HitContainer const *__restrict__ TkSoA const *__restrict__ Quality const *__restrict__ CAHitNtupletGeneratorKernelsGPU::HitToTuple const *__restrict__ int32_t int iev
~CSCSegmentProducer() override
Destructor.
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
void setGeometry(const CSCGeometry *geom)
#define LogDebug(id)