Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-04-01 23:54:04

0001 
0002 #include "L1Trigger/DemonstratorTools/interface/EventData.h"
0003 
0004 namespace l1t::demo {
0005 
0006   EventData::EventData() {}
0007 
0008   EventData::EventData(const std::map<LinkId, std::vector<ap_uint<64>>>& data) : data_(data) {}
0009 
0010   EventData::const_iterator EventData::begin() const { return data_.begin(); }
0011 
0012   EventData::const_iterator EventData::end() const { return data_.end(); }
0013 
0014   void EventData::add(const LinkId& i, const std::vector<ap_uint<64>>& data) { data_[i] = data; }
0015 
0016   void EventData::add(const EventData& data) {
0017     for (const auto& x : data)
0018       add(x.first, x.second);
0019   }
0020 
0021   const std::vector<ap_uint<64>>& EventData::at(const LinkId& i) const { return data_.at(i); }
0022 
0023   bool EventData::has(const LinkId& i) const { return data_.count(i) > 0; }
0024 
0025   size_t EventData::size() { return data_.size(); }
0026 
0027 }  // namespace l1t::demo