CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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  void BoardData::name(const std::string& aName) { name_ = aName; }
18 
19  std::map<size_t, BoardData::Channel>::const_iterator BoardData::begin() const { return data_.begin(); }
20 
21  std::map<size_t, BoardData::Channel>::iterator BoardData::begin() { return data_.begin(); }
22 
23  std::map<size_t, BoardData::Channel>::const_iterator BoardData::end() const { return data_.end(); }
24 
25  std::map<size_t, BoardData::Channel>::iterator BoardData::end() { return data_.end(); }
26 
28  data_[i] = Channel();
29  return data_.at(i);
30  }
31 
33  data_[i] = data;
34  return data_.at(i);
35  }
36 
37  BoardData::Channel& BoardData::at(size_t i) { return data_.at(i); }
38 
39  const BoardData::Channel& BoardData::at(size_t i) const { return data_.at(i); }
40 
41  bool BoardData::has(size_t i) const { return data_.count(i) > 0; }
42 
43  size_t BoardData::size() { return data_.size(); }
44 
45 } // namespace l1t::demo
Channel & add(size_t)
Definition: BoardData.cc:27
std::vector< Frame > Channel
Definition: BoardData.h:15
std::map< size_t, Channel >::const_iterator end() const
Definition: BoardData.cc:23
bool has(size_t) const
Definition: BoardData.cc:41
std::string name_
Definition: BoardData.h:49
std::map< size_t, Channel >::const_iterator begin() const
Definition: BoardData.cc:19
const std::string & name() const
Definition: BoardData.cc:15
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
std::map< size_t, Channel > data_
Definition: BoardData.h:52
Channel & at(size_t)
Definition: BoardData.cc:37