#include <SimMuon/RPCDigitizer/src/RPCDigiProducer.h>
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 |
RPCDigitizer * | theDigitizer |
RPCSimSetUp * | theRPCSimSetUp |
Definition at line 17 of file RPCDigiProducer.h.
Definition at line 21 of file RPCDigiProducer.h.
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 }
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] |
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 > | ||||
) |
std::string RPCDigiProducer::collection_for_XF [private] |
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().