CMS 3D CMS Logo

BoardData.h
Go to the documentation of this file.
1 
2 #ifndef L1Trigger_DemonstratorTools_BoardData_h
3 #define L1Trigger_DemonstratorTools_BoardData_h
4 
5 #include <map>
6 #include <vector>
7 
9 
10 namespace l1t::demo {
11 
13  class BoardData {
14  public:
15  typedef std::vector<Frame> Channel;
16 
17  BoardData();
18 
19  BoardData(const std::string& name);
20 
21  BoardData(const std::string& name, const std::vector<size_t>& channels, size_t length);
22 
23  const std::string& name() const;
24 
25  void name(const std::string& aName);
26 
27  std::map<size_t, Channel>::const_iterator begin() const;
28 
29  std::map<size_t, Channel>::iterator begin();
30 
31  std::map<size_t, Channel>::const_iterator end() const;
32 
33  std::map<size_t, Channel>::iterator end();
34 
35  Channel& add(size_t);
36 
37  Channel& add(size_t, const Channel&);
38 
39  Channel& at(size_t);
40 
41  const Channel& at(size_t) const;
42 
43  bool has(size_t) const;
44 
45  // Returns number of channels
46  size_t size();
47 
48  private:
50 
51  // Map of channel indices to data
52  std::map<size_t, Channel> data_;
53  };
54 
55 } // namespace l1t::demo
56 
57 #endif
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
std::map< size_t, Channel > data_
Definition: BoardData.h:52
Class representing information that&#39;s stored in the input or output buffers on a phase-2 board...
Definition: BoardData.h:13
Channel & at(size_t)
Definition: BoardData.cc:37