Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 09:39:17

0001 /*
0002 Takes a collection of built waveforms and attempts to align them across multiple FPGAs.
0003 */
0004 
0005 #pragma once
0006 
0007 #include "waveform_builder.h"
0008 
0009 #include <list>
0010 
0011 class aligned_event {
0012 private:
0013     uint32_t num_fpga;
0014     uint32_t channels_per_fpga;
0015     uint32_t events_found;
0016     long *timestamp;
0017     kcu_event **events;
0018 
0019 public:
0020     aligned_event(uint32_t num_fpga, uint32_t channels_per_fpga);
0021     ~aligned_event();
0022 
0023     bool is_complete();
0024     kcu_event *get_event(uint32_t fpga) {return events[fpga];}
0025     uint32_t get_num_fpga() {return num_fpga;}
0026     uint32_t get_channels_per_fpga() {return channels_per_fpga;}
0027 
0028     friend class event_aligner;
0029 };
0030 
0031 class event_aligner {
0032 private:
0033     uint32_t num_fpga;
0034     std::list<aligned_event*> *complete;
0035 
0036 public:
0037     event_aligner(uint32_t num_fpga);
0038     ~event_aligner();
0039     bool align(std::list<kcu_event*> **single_kcu_events);
0040     std::list<aligned_event*> *get_complete() {return complete;}
0041 };