![]() |
![]() |
#include <EventFilter/LTCRawToDigi/src/LTCRawToDigi.cc>
Public Member Functions | |
LTCRawToDigi (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
~LTCRawToDigi () |
LTCs are FED id 816-823.
Implementation: No comments
Definition at line 43 of file LTCRawToDigi.cc.
LTCRawToDigi::LTCRawToDigi | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
LTCRawToDigi::~LTCRawToDigi | ( | ) |
Definition at line 72 of file LTCRawToDigi.cc.
00073 { 00074 00075 // do anything here that needs to be done at desctruction time 00076 // (e.g. close files, deallocate resources etc.) 00077 00078 }
void LTCRawToDigi::produce | ( | edm::Event & | iEvent, | |
const edm::EventSetup & | iSetup | |||
) | [virtual] |
Take a reference to this FED's data
Implements edm::EDProducer.
Definition at line 87 of file LTCRawToDigi.cc.
References FEDRawData::data(), edm::Event::getByLabel(), id, edm::Event::put(), and FEDRawData::size().
00088 { 00089 using namespace edm; 00090 const int LTCFedIDLo = 815; 00091 const int LTCFedIDHi = 823; 00092 00093 // Get a handle to the FED data collection 00094 edm::Handle<FEDRawDataCollection> rawdata; 00095 iEvent.getByLabel("source" , rawdata); 00096 00097 // create collection we'll save in the event record 00098 std::auto_ptr<LTCDigiCollection> pOut(new LTCDigiCollection()); 00099 00100 // Loop over all possible FED's with the appropriate FED ID 00101 for ( int id = LTCFedIDLo; id <= LTCFedIDHi; ++id ) { 00103 const FEDRawData & fedData = rawdata->FEDData(id); 00104 unsigned short int length = fedData.size(); 00105 if ( ! length ) 00106 continue; // bank does not exist 00107 LTCDigi ltcDigi(fedData.data()); 00108 pOut->push_back(ltcDigi); 00109 } 00110 iEvent.put(pOut); 00111 }