Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:45:31

0001 #include "EventFilter/HGCalRawToDigi/interface/HGCalECONDEmulator.h"
0002 #include "EventFilter/HGCalRawToDigi/interface/HGCalRawDataDefinitions.h"
0003 
0004 using namespace hgcal::econd;
0005 
0006 ECONDInput TrivialEmulator::next() {
0007   EventId evt_id{event_id_++, bx_id_++, orbit_id_++};
0008   ERxInput evt;
0009   for (const auto& erx_id : params_.enabled_erxs) {
0010     ERxId_t id{erx_id /*chip*/, 0 /*half*/};
0011     ERxData dummy_data{
0012         .cm0 = 0x12,
0013         .cm1 = 0x34,
0014         .tctp = std::vector<ToTStatus>(params_.num_channels_per_erx, static_cast<ToTStatus>(params_.default_totstatus)),
0015         .adc = std::vector<uint16_t>(params_.num_channels_per_erx, 0),
0016         .adcm = std::vector<uint16_t>(params_.num_channels_per_erx, 0),
0017         .toa = std::vector<uint16_t>(params_.num_channels_per_erx, 0),
0018         .tot = std::vector<uint16_t>(params_.num_channels_per_erx, 0),
0019         .meta = std::vector<uint32_t>{}};
0020     evt[id] = dummy_data;
0021   }
0022   return ECONDInput{evt_id, evt};
0023 }