CMS 3D CMS Logo

RPCDigiProducer Class Reference

#include <SimMuon/RPCDigitizer/src/RPCDigiProducer.h>

Inheritance diagram for RPCDigiProducer:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Types

typedef
RPCDigitizer::RPCDigiSimLinks 
RPCDigitizerSimLinks

Public Member Functions

virtual void beginRun (edm::Run &, const edm::EventSetup &)
virtual void endRun (edm::Run &, const edm::EventSetup &)
virtual void produce (edm::Event &e, const edm::EventSetup &c)
 Produces the EDM products,.
 RPCDigiProducer (const edm::ParameterSet &ps)
void setRPCSetUp (std::vector< RPCStripNoises::NoiseItem >, std::vector< double >)
virtual ~RPCDigiProducer ()

Private Attributes

std::string collection_for_XF
RPCDigitizertheDigitizer
RPCSimSetUptheRPCSimSetUp


Detailed Description

Definition at line 17 of file RPCDigiProducer.h.


Member Typedef Documentation

typedef RPCDigitizer::RPCDigiSimLinks RPCDigiProducer::RPCDigitizerSimLinks

Definition at line 21 of file RPCDigiProducer.h.


Constructor & Destructor Documentation

RPCDigiProducer::RPCDigiProducer ( const edm::ParameterSet ps  )  [explicit]

Definition at line 31 of file RPCDigiProducer.cc.

References collection_for_XF, edm::ParameterSet::getParameter(), theDigitizer, and theRPCSimSetUp.

00031                                                           {
00032 
00033   theRPCSimSetUp =  new RPCSimSetUp(ps);
00034   theDigitizer = new RPCDigitizer(ps);
00035 
00036   produces<RPCDigiCollection>();
00037   produces<RPCDigitizerSimLinks>("RPCDigiSimLink");
00038 
00039   //Name of Collection used for create the XF 
00040   collection_for_XF = ps.getParameter<std::string>("InputCollection");
00041 }

RPCDigiProducer::~RPCDigiProducer (  )  [virtual]

Definition at line 43 of file RPCDigiProducer.cc.

References theDigitizer, and theRPCSimSetUp.

00043                                   {
00044   delete theDigitizer;
00045   delete theRPCSimSetUp;
00046 }


Member Function Documentation

void RPCDigiProducer::beginRun ( edm::Run r,
const edm::EventSetup eventSetup 
) [virtual]

Reimplemented from edm::EDProducer.

Definition at line 48 of file RPCDigiProducer.cc.

References edm::EventSetup::get(), RPCDigitizer::setGeometry(), RPCSimSetUp::setGeometry(), RPCSimSetUp::setRPCSetUp(), RPCDigitizer::setRPCSimSetUp(), theDigitizer, and theRPCSimSetUp.

00048                                                                          {
00049 
00050   edm::ESHandle<RPCGeometry> hGeom;
00051   eventSetup.get<MuonGeometryRecord>().get( hGeom );
00052   const RPCGeometry *pGeom = &*hGeom;
00053 
00054   edm::ESHandle<RPCStripNoises> noiseRcd;
00055   eventSetup.get<RPCStripNoisesRcd>().get(noiseRcd);
00056 
00057   theRPCSimSetUp->setRPCSetUp(noiseRcd->getVNoise(), noiseRcd->getCls());
00058 
00059   theDigitizer->setGeometry( pGeom );
00060   theRPCSimSetUp->setGeometry( pGeom );
00061   theDigitizer->setRPCSimSetUp( theRPCSimSetUp );
00062 }

virtual void RPCDigiProducer::endRun ( edm::Run ,
const edm::EventSetup  
) [inline, virtual]

Reimplemented from edm::EDProducer.

Definition at line 27 of file RPCDigiProducer.h.

00027 {;}

void RPCDigiProducer::produce ( edm::Event e,
const edm::EventSetup c 
) [virtual]

Produces the EDM products,.

Implements edm::EDProducer.

Definition at line 64 of file RPCDigiProducer.cc.

References collection_for_XF, RPCDigitizer::doAction(), edm::Event::getByLabel(), edm::Handle< T >::product(), edm::Event::put(), and theDigitizer.

00064                                                                           {
00065 
00066   edm::Handle<CrossingFrame<PSimHit> > cf;
00067   e.getByLabel("mix", collection_for_XF, cf);
00068 
00069   std::auto_ptr<MixCollection<PSimHit> > 
00070     hits( new MixCollection<PSimHit>(cf.product()) );
00071 
00072   // Create empty output
00073   std::auto_ptr<RPCDigiCollection> pDigis(new RPCDigiCollection());
00074   std::auto_ptr<RPCDigitizerSimLinks> RPCDigitSimLink(new RPCDigitizerSimLinks() );
00075 
00076   // run the digitizer
00077   theDigitizer->doAction(*hits, *pDigis, *RPCDigitSimLink);
00078 
00079   // store them in the event
00080   e.put(pDigis);
00081   e.put(RPCDigitSimLink,"RPCDigiSimLink");
00082 }

void RPCDigiProducer::setRPCSetUp ( std::vector< RPCStripNoises::NoiseItem ,
std::vector< double >   
)


Member Data Documentation

std::string RPCDigiProducer::collection_for_XF [private]

Definition at line 40 of file RPCDigiProducer.h.

Referenced by produce(), and RPCDigiProducer().

RPCDigitizer* RPCDigiProducer::theDigitizer [private]

Definition at line 36 of file RPCDigiProducer.h.

Referenced by beginRun(), produce(), RPCDigiProducer(), and ~RPCDigiProducer().

RPCSimSetUp* RPCDigiProducer::theRPCSimSetUp [private]

Definition at line 37 of file RPCDigiProducer.h.

Referenced by beginRun(), RPCDigiProducer(), and ~RPCDigiProducer().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:30:55 2009 for CMSSW by  doxygen 1.5.4