CMS 3D CMS Logo

EventData.h
Go to the documentation of this file.
1 
2 #ifndef L1Trigger_DemonstratorTools_EventData_h
3 #define L1Trigger_DemonstratorTools_EventData_h
4 
5 #include <map>
6 #include <string>
7 #include <vector>
8 
9 #include "ap_int.h"
10 
12 
13 namespace l1t::demo {
14 
28  class EventData {
29  public:
30  typedef std::map<LinkId, std::vector<ap_uint<64>>>::const_iterator const_iterator;
31 
32  EventData();
33 
34  EventData(const std::map<LinkId, std::vector<ap_uint<64>>>&);
35 
36  const_iterator begin() const;
37 
38  const_iterator end() const;
39 
40  void add(const LinkId&, const std::vector<ap_uint<64>>&);
41 
42  void add(const EventData&);
43 
44  const std::vector<ap_uint<64>>& at(const LinkId&) const;
45 
46  bool has(const LinkId&) const;
47 
48  // Returns number of channels
49  size_t size();
50 
51  private:
52  // Map of channel IDs to data
53  std::map<LinkId, std::vector<ap_uint<64>>> data_;
54  };
55 
56 } // namespace l1t::demo
57 
58 #endif
Logical ID for link within any given time slice (e.g. ["tracks", 0] -> ["tracks", 17] for links from ...
Definition: LinkId.h:10
std::map< LinkId, std::vector< ap_uint< 64 > > > data_
Definition: EventData.h:53
void add(const LinkId &, const std::vector< ap_uint< 64 >> &)
Definition: EventData.cc:14
const std::vector< ap_uint< 64 > > & at(const LinkId &) const
Definition: EventData.cc:21
std::map< LinkId, std::vector< ap_uint< 64 > > >::const_iterator const_iterator
Definition: EventData.h:30
const_iterator end() const
Definition: EventData.cc:12
const_iterator begin() const
Definition: EventData.cc:10
Class representing information phase-2 ATCA I/O data corresponding to a single event, with logical channel IDs (essentially string-uint pairs, e.g. tracks-0 to tracks-17).
Definition: EventData.h:28
bool has(const LinkId &) const
Definition: EventData.cc:23