File indexing completed on 2025-01-18 03:42:24
0001 #include "SimCalorimetry/HGCalSimAlgos/interface/HGCalECONDEmulator.h"
0002 #include "DataFormats/HGCalDigi/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 , 0 };
0011 ERxData dummy_data{
0012 .cm0 = 0x12,
0013 .cm1 = 0x34,
0014 .tctp = std::vector<uint8_t>(params_.num_channels_per_erx, static_cast<uint8_t>(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 }