CMS 3D CMS Logo

BoardData.cc
Go to the documentation of this file.
1 
3 
4 namespace l1t::demo {
5 
7 
9 
10  BoardData::BoardData(const std::string& name, const std::vector<size_t>& channels, size_t length) : name_(name) {
11  for (const auto i : channels)
12  data_[i] = Channel(length);
13  }
14 
15  const std::string& BoardData::name() const { return name_; }
16 
17  std::map<size_t, BoardData::Channel>::const_iterator BoardData::begin() const { return data_.begin(); }
18 
19  std::map<size_t, BoardData::Channel>::iterator BoardData::begin() { return data_.begin(); }
20 
21  std::map<size_t, BoardData::Channel>::const_iterator BoardData::end() const { return data_.end(); }
22 
23  std::map<size_t, BoardData::Channel>::iterator BoardData::end() { return data_.end(); }
24 
26  data_[i] = Channel();
27  return data_.at(i);
28  }
29 
31  data_[i] = data;
32  return data_.at(i);
33  }
34 
35  BoardData::Channel& BoardData::at(size_t i) { return data_.at(i); }
36 
37  const BoardData::Channel& BoardData::at(size_t i) const { return data_.at(i); }
38 
39  bool BoardData::has(size_t i) const { return data_.count(i) > 0; }
40 
41  size_t BoardData::size() { return data_.size(); }
42 
43 } // namespace l1t::demo
Channel & add(size_t)
Definition: BoardData.cc:25
std::vector< Frame > Channel
Definition: BoardData.h:15
std::map< size_t, Channel >::const_iterator end() const
Definition: BoardData.cc:21
bool has(size_t) const
Definition: BoardData.cc:39
std::string name_
Definition: BoardData.h:47
std::map< size_t, Channel >::const_iterator begin() const
Definition: BoardData.cc:17
const std::string & name() const
Definition: BoardData.cc:15
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
std::map< size_t, Channel > data_
Definition: BoardData.h:50
Channel & at(size_t)
Definition: BoardData.cc:35