LDMX Software
ECONDDecoder.h
1#ifndef PACKING_ECONDDECODER_H
2#define PACKING_ECONDDECODER_H
3
4#include <array>
5#include <memory>
6
8#include "Packing/MultiSampleECONDEventPacket.h"
9
10namespace packing {
11
31 public:
33 ECONDDecoder(const std::string& name, framework::Process& p)
34 : framework::Producer(name, p) {}
36 virtual ~ECONDDecoder() = default;
37
46
51 void produce(framework::Event& event) override;
52
54 void onProcessEnd() override;
55
56 private:
58 unsigned int channelID(int i_link, int i_ch) const;
59
61 std::string raw_data_name_;
63 std::string raw_data_pass_;
65 std::string digi_output_name_;
67 std::string info_output_name_;
72 bool is_ecal_{false};
74 int n_links_{2};
76 int fiber_{0};
78 bool translate_eid_{false};
81
83 std::unique_ptr<MultiSampleECONDEventPacket> packet_;
84
86 long n_frames_{0};
88 long n_no_frame_{0};
94 std::array<long, MultiSampleECONDEventPacket::N_CORRUPTION> n_frame_flags_{};
96 long n_packets_{0};
104 std::array<long, ECONDEventPacket::N_CORRUPTION> n_packet_flags_{};
109};
110
111} // namespace packing
112
113#endif // PACKING_ECONDDECODER_H
Base classes for all user event processing components to extend.
Implements an event buffer system for storing event data.
Definition Event.h:40
Class which represents the process under execution.
Definition Process.h:34
Base class for a module which produces a data product.
Producer(const std::string &name, Process &process)
Class constructor.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:26
decode event packets built by ECON-D chips
int roc_version_
ROC version for the digi collection.
long n_l1a_jumps_
number of L1A jumps between consecutive samples
std::string raw_data_pass_
name of pass to get raw binary data from
long n_packets_empty_
number of empty packets (payload length 0)
ECONDDecoder(const std::string &name, framework::Process &p)
normal constructor
void configure(framework::config::Parameters &ps) override
configure the decoder
bool translate_eid_
translate electronics IDs into detector IDs
std::string raw_data_name_
name of event object of raw binary data
int fiber_
optical fiber index used in the electronics ID
std::string digi_output_name_
output name of digi collection
int n_links_
number of enabled eRx on the ECON-D
std::string info_output_name_
output name of supporting data object
long n_links_bad_stat_
number of decoded link sub-packets with bad Stat bits
void onProcessEnd() override
print a summary of the decoding
void produce(framework::Event &event) override
decode the raw binary data into HgcrocDigiCollection that can be used later for reconstruction or ana...
long n_packets_
number of packets seen
unsigned int channelID(int i_link, int i_ch) const
get the channel ID for the input link and channel
long n_packets_corrupt_
number of corrupted packets (skipped)
std::array< long, MultiSampleECONDEventPacket::N_CORRUPTION > n_frame_flags_
number of frames with each frame-level flag
std::array< long, ECONDEventPacket::N_CORRUPTION > n_packet_flags_
number of packets with each corruption flag
long n_packets_decoded_
number of packets decoded without corruption and not empty
virtual ~ECONDDecoder()=default
empty destructor
long n_no_frame_
number of events without an input frame
long n_bad_frame_size_
number of frames with a size that is not a multiple of 4 bytes
long n_frames_filled_
number of frames whose digis were filled
bool is_ecal_
which calorimeter subsystem we are decoding (true == Ecal, false == Hcal)
long n_frames_
number of frames seen
std::unique_ptr< MultiSampleECONDEventPacket > packet_
decoding buffer
All classes in the ldmx-sw project use this namespace.