Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 
0002 #include "L1Trigger/DemonstratorTools/interface/BoardData.h"
0003 
0004 namespace l1t::demo {
0005 
0006   BoardData::BoardData() {}
0007 
0008   BoardData::BoardData(const std::string& name) : name_(name) {}
0009 
0010   BoardData::BoardData(const std::string& name, const std::vector<size_t>& channels, size_t length) : name_(name) {
0011     for (const auto i : channels)
0012       data_[i] = Channel(length);
0013   }
0014 
0015   const std::string& BoardData::name() const { return name_; }
0016 
0017   std::map<size_t, BoardData::Channel>::const_iterator BoardData::begin() const { return data_.begin(); }
0018 
0019   std::map<size_t, BoardData::Channel>::iterator BoardData::begin() { return data_.begin(); }
0020 
0021   std::map<size_t, BoardData::Channel>::const_iterator BoardData::end() const { return data_.end(); }
0022 
0023   std::map<size_t, BoardData::Channel>::iterator BoardData::end() { return data_.end(); }
0024 
0025   BoardData::Channel& BoardData::add(size_t i) {
0026     data_[i] = Channel();
0027     return data_.at(i);
0028   }
0029 
0030   BoardData::Channel& BoardData::add(size_t i, const Channel& data) {
0031     data_[i] = data;
0032     return data_.at(i);
0033   }
0034 
0035   BoardData::Channel& BoardData::at(size_t i) { return data_.at(i); }
0036 
0037   const BoardData::Channel& BoardData::at(size_t i) const { return data_.at(i); }
0038 
0039   bool BoardData::has(size_t i) const { return data_.count(i) > 0; }
0040 
0041   size_t BoardData::size() { return data_.size(); }
0042 
0043 }  // namespace l1t::demo