CMS 3D CMS Logo

EventData.cc
Go to the documentation of this file.
1 
3 
4 namespace l1t::demo {
5 
7 
8  EventData::EventData(const std::map<LinkId, std::vector<ap_uint<64>>>& data) : data_(data) {}
9 
10  EventData::const_iterator EventData::begin() const { return data_.begin(); }
11 
13 
14  void EventData::add(const LinkId& i, const std::vector<ap_uint<64>>& data) { data_[i] = data; }
15 
16  void EventData::add(const EventData& data) {
17  for (const auto& x : data)
18  add(x.first, x.second);
19  }
20 
21  const std::vector<ap_uint<64>>& EventData::at(const LinkId& i) const { return data_.at(i); }
22 
23  bool EventData::has(const LinkId& i) const { return data_.count(i) > 0; }
24 
25  size_t EventData::size() { return data_.size(); }
26 
27 } // namespace l1t::demo
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
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
float x
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