20 produces<FEDRawDataCollection>();
25 mapToken_ = esConsumes<DTReadOutMapping, DTReadOutMappingRcd>();
33 cout <<
"[DTDigiToRawModule]: constructor" << endl;
39 cout <<
"[DTDigiToRawModule]: destructor" << endl;
43 auto fed_buffers = std::make_unique<FEDRawDataCollection>();
53 int FEDIDmin = 0, FEDIDMax = 0;
54 if (useStandardFEDid_) {
62 for (
int id = FEDIDmin;
id <= FEDIDMax; ++
id) {
64 FEDRawData* rawData = packer->createFedBuffers(*digis, map);
66 FEDRawData& fedRawData = fed_buffers->FEDData(
id);
67 fedRawData = *rawData;
74 dtFEDTrailer.
set(fedRawData.
data() + (fedRawData.
size() - 8),
75 fedRawData.
size() / 8,
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void produce(edm::Event &, const edm::EventSetup &) override
uint16_t *__restrict__ id
bool getByToken(EDGetToken token, Handle< PROD > &result) const
size_t size() const
Lenght of the data buffer in bytes.
static void set(unsigned char *trailer, uint32_t lenght, uint16_t crc, uint8_t evt_stat, uint8_t tts, bool moreTrailers=false)
Set all fields in the trailer.
unsigned short compute_crc(unsigned char *buffer, unsigned int bufSize)
~DTDigiToRawModule() override
Destructor.
DTDigiToRawModule(const edm::ParameterSet &pset)
Constructor.
T getParameter(std::string const &) const
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const