CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/SimMuon/Neutron/src/EDMNeutronWriter.cc

Go to the documentation of this file.
00001 #include "SimMuon/Neutron/src/EDMNeutronWriter.h"
00002 #include "FWCore/Framework/interface/Event.h"
00003 
00004 EDMNeutronWriter::EDMNeutronWriter()
00005 : theEvent(0),
00006   theHits(0)
00007 {
00008 }
00009 
00010 
00011 EDMNeutronWriter::~EDMNeutronWriter() {}
00012 
00013 
00014 void EDMNeutronWriter::writeCluster(int detType, const edm::PSimHitContainer & simHits)
00015 {
00016   theHits->insert(theHits->end(), simHits.begin(), simHits.end());
00017 }
00018 
00019 
00020 void EDMNeutronWriter::beginEvent(edm::Event & e, const edm::EventSetup & es)
00021 {
00022   theEvent = &e;
00023   theHits = std::auto_ptr<edm::PSimHitContainer>(new edm::PSimHitContainer());
00024 }
00025 
00026 void EDMNeutronWriter::endEvent()
00027 {
00028   theEvent->put(theHits);
00029 }
00030 
00031