93 hf5_.view().stride() =
stride;
94 hf5_.view().size() = hbheDigis.size();
96 for (
unsigned int i = 0;
i < hbheDigis.size(); ++
i) {
97 auto const hbhe = hbheDigis[
i];
98 auto const id =
hbhe.id().rawId();
100 uint16_t header_word = (1 << 15) | (0x5 << 12) | (0 << 10) | ((
hbhe.sample(0).capid() & 0x3) << 8);
102 auto hf5_vi = hf5_.view()[
i];
105 hf5_vi.data()[0] = header_word;
107 for (
unsigned int i = 0;
i < hf5_.view().stride() - 1;
i++) {
108 uint16_t s0 = (0 << 7) | (static_cast<uint8_t>(
hbhe.sample(2 *
i).adc()) & 0x7f);
109 uint16_t s1 = (0 << 7) | (static_cast<uint8_t>(
hbhe.sample(2 *
i + 1).adc()) & 0x7f);
110 uint16_t
sample = (s1 << 8) | s0;
115 alpaka::memcpy(
event.queue(), df5_.buffer(), hf5_.const_buffer());
118 if (qie11Digis.empty()) {
127 for (
unsigned int i = 0;
i < qie11Digis.size();
i++) {
130 if (digi.flavor() == 0
or digi.flavor() == 1) {
134 }
else if (digi.flavor() == 3) {
140 auto const nsamples = qie11Digis.
samples();
152 hf1_.view().stride() = stride01;
153 hf3_.view().stride() = stride01;
155 unsigned int i_f1 = 0;
156 unsigned int i_f3 = 0;
158 for (
unsigned int i = 0;
i < qie11Digis.size();
i++) {
160 assert(digi.samples() == qie11Digis.samples() &&
"collection nsamples must equal per digi samples");
162 if (digi.flavor() == 0
or digi.flavor() == 1) {
165 auto hf01_vi = hf1_.view()[i_f1];
167 hf01_vi.ids() = digi.detid().rawId();
169 hf01_vi.data()[hw] = (qie11Digis[
i][hw]);
172 }
else if (digi.flavor() == 3) {
175 auto hf03_vi = hf3_.view()[i_f3];
177 hf03_vi.ids() = digi.detid().rawId();
180 hf03_vi.data()[hw] = (qie11Digis[
i][hw]);
186 hf1_.view().size() = size_f1;
187 hf3_.view().size() = size_f3;
189 alpaka::memcpy(
event.queue(), df1_.buffer(), hf1_.const_buffer());
190 alpaka::memcpy(
event.queue(), df3_.buffer(), hf3_.const_buffer());
hcal::Phase0DigiHostCollection HostCollectionPhase0
static const int MAXSAMPLES
device::EDPutToken< DeviceCollectionPhase0 > digisF5HBToken_
static const int HEADER_WORDS
static const int WORDS_PER_SAMPLE
constexpr uint32_t stride
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
hcal::Phase1DigiHostCollection HostCollectionPhase1
hcal::Phase0DigiDeviceCollection DeviceCollectionPhase0
constexpr int samples() const
total number of samples in the digi
device::EDPutToken< DeviceCollectionPhase1 > digisF3HBToken_
edm::EDGetTokenT< QIE11DigiCollection > qie11DigiToken_
device::EDPutToken< DeviceCollectionPhase1 > digisF01HEToken_
edm::EDGetTokenT< HBHEDigiCollection > hbheDigiToken_
hcal::Phase1DigiDeviceCollection DeviceCollectionPhase1