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  std::map<size_t, Channel>::const_iterator begin() const;
26 
27  std::map<size_t, Channel>::iterator begin();
28 
29  std::map<size_t, Channel>::const_iterator end() const;
30 
31  std::map<size_t, Channel>::iterator end();
32 
33  Channel& add(size_t);
34 
35  Channel& add(size_t, const Channel&);
36 
37  Channel& at(size_t);
38 
39  const Channel& at(size_t) const;
40 
41  bool has(size_t) const;
42 
43  // Returns number of channels
44  size_t size();
45 
46  private:
48 
49  // Map of channel indices to data
50  std::map<size_t, Channel> data_;
51  };
52 
53 } // namespace l1t::demo
54 
55 #endif
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
std::map< size_t, Channel > data_
Definition: BoardData.h:50
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:35