CMS 3D CMS Logo

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

Class representing information phase-2 ATCA I/O data corresponding to a single event, with logical channel IDs (essentially string-uint pairs, e.g. tracks-0 to tracks-17). More...

#include <EventData.h>

Public Types

typedef std::map< LinkId, std::vector< ap_uint< 64 > > >::const_iterator const_iterator
 

Public Member Functions

void add (const LinkId &, const std::vector< ap_uint< 64 >> &)
 
void add (const EventData &)
 
const std::vector< ap_uint< 64 > > & at (const LinkId &) const
 
const_iterator begin () const
 
const_iterator end () const
 
 EventData ()
 
 EventData (const std::map< LinkId, std::vector< ap_uint< 64 >>> &)
 
bool has (const LinkId &) const
 
size_t size ()
 

Private Attributes

std::map< LinkId, std::vector< ap_uint< 64 > > > data_
 

Detailed Description

Class representing information phase-2 ATCA I/O data corresponding to a single event, with logical channel IDs (essentially string-uint pairs, e.g. tracks-0 to tracks-17).

This class is used to provide an event-index-independent interface to the BoardDataWriter & BoardDataReader classes - i.e. to avoid any need to keep track of eventIndex % tmux when using that class for boards whose TMUX period is less than any of their upstream systems. One logical channel ID corresponds to different I/O channel indices from one event to the next for the input channels of a board have a higher TMUX period than the board (e.g. for tracks sent to the correlator/GMT/GTT, or for the GMT, GTT and correlator links into GT); the mapping of logical channel IDs to I/O channel indices is implemented in the BoardDataWriter and BoardDataReader classes.

Definition at line 28 of file EventData.h.

Member Typedef Documentation

◆ const_iterator

typedef std::map<LinkId, std::vector<ap_uint<64> > >::const_iterator l1t::demo::EventData::const_iterator

Definition at line 30 of file EventData.h.

Constructor & Destructor Documentation

◆ EventData() [1/2]

l1t::demo::EventData::EventData ( )

Definition at line 6 of file EventData.cc.

6 {}

◆ EventData() [2/2]

l1t::demo::EventData::EventData ( const std::map< LinkId, std::vector< ap_uint< 64 >>> &  data)

Definition at line 8 of file EventData.cc.

8 : data_(data) {}
std::map< LinkId, std::vector< ap_uint< 64 > > > data_
Definition: EventData.h:53
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

Member Function Documentation

◆ add() [1/2]

void l1t::demo::EventData::add ( const LinkId i,
const std::vector< ap_uint< 64 >> &  data 
)

Definition at line 14 of file EventData.cc.

References data, data_, and mps_fire::i.

Referenced by add(), L1GTBoardWriter::analyze(), L1CTJetFileWriter::analyze(), GTTFileWriter::analyze(), l1t::demo::BoardDataReader::BoardDataReader(), L1TCtL2EgProducer::produce(), and counter.Counter::register().

14 { data_[i] = data; }
std::map< LinkId, std::vector< ap_uint< 64 > > > data_
Definition: EventData.h:53
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ add() [2/2]

void l1t::demo::EventData::add ( const EventData data)

Definition at line 16 of file EventData.cc.

References add(), data, and x.

Referenced by counter.Counter::register().

16  {
17  for (const auto& x : data)
18  add(x.first, x.second);
19  }
void add(const LinkId &, const std::vector< ap_uint< 64 >> &)
Definition: EventData.cc:14
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ at()

const std::vector< ap_uint< 64 > > & l1t::demo::EventData::at ( const LinkId i) const

Definition at line 21 of file EventData.cc.

References data_, and mps_fire::i.

21 { return data_.at(i); }
std::map< LinkId, std::vector< ap_uint< 64 > > > data_
Definition: EventData.h:53

◆ begin()

EventData::const_iterator l1t::demo::EventData::begin ( void  ) const

Definition at line 10 of file EventData.cc.

References data_.

Referenced by L1GTBoardWriter::analyze().

10 { return data_.begin(); }
std::map< LinkId, std::vector< ap_uint< 64 > > > data_
Definition: EventData.h:53

◆ end()

EventData::const_iterator l1t::demo::EventData::end ( void  ) const

Definition at line 12 of file EventData.cc.

References data_.

12 { return data_.end(); }
std::map< LinkId, std::vector< ap_uint< 64 > > > data_
Definition: EventData.h:53

◆ has()

bool l1t::demo::EventData::has ( const LinkId i) const

Definition at line 23 of file EventData.cc.

References data_, and mps_fire::i.

Referenced by l1t::demo::BoardDataWriter::addEvent().

23 { return data_.count(i) > 0; }
std::map< LinkId, std::vector< ap_uint< 64 > > > data_
Definition: EventData.h:53

◆ size()

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

Definition at line 25 of file EventData.cc.

References data_.

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

25 { return data_.size(); }
std::map< LinkId, std::vector< ap_uint< 64 > > > data_
Definition: EventData.h:53

Member Data Documentation

◆ data_

std::map<LinkId, std::vector<ap_uint<64> > > l1t::demo::EventData::data_
private

Definition at line 53 of file EventData.h.

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