CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
l1t::demo::BoardData Class Reference

Class representing information that's stored in the input or output buffers on a phase-2 board. More...

#include <BoardData.h>

Public Types

typedef std::vector< FrameChannel
 

Public Member Functions

Channeladd (size_t)
 
Channeladd (size_t, const Channel &)
 
Channelat (size_t)
 
const Channelat (size_t) const
 
std::map< size_t, Channel >::const_iterator begin () const
 
std::map< size_t, Channel >::iterator begin ()
 
 BoardData ()
 
 BoardData (const std::string &name)
 
 BoardData (const std::string &name, const std::vector< size_t > &channels, size_t length)
 
std::map< size_t, Channel >::const_iterator end () const
 
std::map< size_t, Channel >::iterator end ()
 
bool has (size_t) const
 
const std::string & name () const
 
void name (const std::string &aName)
 
size_t size ()
 

Private Attributes

std::map< size_t, Channeldata_
 
std::string name_
 

Detailed Description

Class representing information that's stored in the input or output buffers on a phase-2 board.

Definition at line 13 of file BoardData.h.

Member Typedef Documentation

◆ Channel

typedef std::vector<Frame> l1t::demo::BoardData::Channel

Definition at line 15 of file BoardData.h.

Constructor & Destructor Documentation

◆ BoardData() [1/3]

l1t::demo::BoardData::BoardData ( )

Definition at line 6 of file BoardData.cc.

6 {}

◆ BoardData() [2/3]

l1t::demo::BoardData::BoardData ( const std::string &  name)

Definition at line 8 of file BoardData.cc.

8 : name_(name) {}
std::string name_
Definition: BoardData.h:49
const std::string & name() const
Definition: BoardData.cc:15

◆ BoardData() [3/3]

l1t::demo::BoardData::BoardData ( const std::string &  name,
const std::vector< size_t > &  channels,
size_t  length 
)

Definition at line 10 of file BoardData.cc.

References ewkTauDQM_cfi::channels, data_, and mps_fire::i.

10  : name_(name) {
11  for (const auto i : channels)
12  data_[i] = Channel(length);
13  }
std::vector< Frame > Channel
Definition: BoardData.h:15
std::string name_
Definition: BoardData.h:49
const std::string & name() const
Definition: BoardData.cc:15
std::map< size_t, Channel > data_
Definition: BoardData.h:52

Member Function Documentation

◆ add() [1/2]

BoardData::Channel & l1t::demo::BoardData::add ( size_t  i)

Definition at line 27 of file BoardData.cc.

References data_, and mps_fire::i.

Referenced by counter.Counter::register().

27  {
28  data_[i] = Channel();
29  return data_.at(i);
30  }
std::vector< Frame > Channel
Definition: BoardData.h:15
std::map< size_t, Channel > data_
Definition: BoardData.h:52

◆ add() [2/2]

BoardData::Channel & l1t::demo::BoardData::add ( size_t  i,
const Channel data 
)

Definition at line 32 of file BoardData.cc.

References data, data_, and mps_fire::i.

Referenced by counter.Counter::register().

32  {
33  data_[i] = data;
34  return data_.at(i);
35  }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
std::map< size_t, Channel > data_
Definition: BoardData.h:52

◆ at() [1/2]

BoardData::Channel & l1t::demo::BoardData::at ( size_t  i)

Definition at line 37 of file BoardData.cc.

References data_, and mps_fire::i.

Referenced by l1t::demo::BoardDataWriter::addEvent(), l1t::demo::BoardDataReader::BoardDataReader(), and l1t::demo::BoardDataWriter::resetBoardData().

37 { return data_.at(i); }
std::map< size_t, Channel > data_
Definition: BoardData.h:52

◆ at() [2/2]

const BoardData::Channel & l1t::demo::BoardData::at ( size_t  i) const

Definition at line 39 of file BoardData.cc.

References data_, and mps_fire::i.

39 { return data_.at(i); }
std::map< size_t, Channel > data_
Definition: BoardData.h:52

◆ begin() [1/2]

std::map< size_t, BoardData::Channel >::const_iterator l1t::demo::BoardData::begin ( void  ) const

Definition at line 19 of file BoardData.cc.

References data_.

19 { return data_.begin(); }
std::map< size_t, Channel > data_
Definition: BoardData.h:52

◆ begin() [2/2]

std::map< size_t, BoardData::Channel >::iterator l1t::demo::BoardData::begin ( void  )

Definition at line 21 of file BoardData.cc.

References data_.

21 { return data_.begin(); }
std::map< size_t, Channel > data_
Definition: BoardData.h:52

◆ end() [1/2]

std::map< size_t, BoardData::Channel >::const_iterator l1t::demo::BoardData::end ( void  ) const

Definition at line 23 of file BoardData.cc.

References data_.

23 { return data_.end(); }
std::map< size_t, Channel > data_
Definition: BoardData.h:52

◆ end() [2/2]

std::map< size_t, BoardData::Channel >::iterator l1t::demo::BoardData::end ( void  )

Definition at line 25 of file BoardData.cc.

References data_.

25 { return data_.end(); }
std::map< size_t, Channel > data_
Definition: BoardData.h:52

◆ has()

bool l1t::demo::BoardData::has ( size_t  i) const

Definition at line 41 of file BoardData.cc.

References data_, and mps_fire::i.

Referenced by l1t::demo::BoardDataReader::BoardDataReader().

41 { return data_.count(i) > 0; }
std::map< size_t, Channel > data_
Definition: BoardData.h:52

◆ name() [1/2]

const std::string & l1t::demo::BoardData::name ( void  ) const

◆ name() [2/2]

void l1t::demo::BoardData::name ( const std::string &  aName)

Definition at line 17 of file BoardData.cc.

References name_.

Referenced by config.CFG::__str__(), validation.Sample::digest(), and VIDSelectorBase.VIDSelectorBase::initialize().

17 { name_ = aName; }
std::string name_
Definition: BoardData.h:49

◆ size()

size_t l1t::demo::BoardData::size ( void  )

Definition at line 43 of file BoardData.cc.

References data_.

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

43 { return data_.size(); }
std::map< size_t, Channel > data_
Definition: BoardData.h:52

Member Data Documentation

◆ data_

std::map<size_t, Channel> l1t::demo::BoardData::data_
private

Definition at line 52 of file BoardData.h.

Referenced by add(), at(), begin(), BoardData(), end(), has(), and size().

◆ name_

std::string l1t::demo::BoardData::name_
private

Definition at line 49 of file BoardData.h.

Referenced by name().