CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
L1MuGMTReadoutCollection Class Reference

#include <L1MuGMTReadoutCollection.h>

Public Member Functions

void addRecord (L1MuGMTReadoutRecord const &rec)
 
L1MuGMTReadoutRecord const & getRecord (int bx=0) const
 
std::vector
< L1MuGMTReadoutRecord > const & 
getRecords () const
 
 L1MuGMTReadoutCollection ()
 
 L1MuGMTReadoutCollection (int nbx)
 
void reset ()
 
virtual ~L1MuGMTReadoutCollection ()
 

Private Attributes

std::vector< L1MuGMTReadoutRecordm_Records
 

Detailed Description

Definition at line 41 of file L1MuGMTReadoutCollection.h.

Constructor & Destructor Documentation

L1MuGMTReadoutCollection::L1MuGMTReadoutCollection ( )
inline

Definition at line 45 of file L1MuGMTReadoutCollection.h.

45 {};
L1MuGMTReadoutCollection::L1MuGMTReadoutCollection ( int  nbx)
inline

Definition at line 46 of file L1MuGMTReadoutCollection.h.

References m_Records.

46 { m_Records.reserve(nbx); };
std::vector< L1MuGMTReadoutRecord > m_Records
virtual L1MuGMTReadoutCollection::~L1MuGMTReadoutCollection ( )
inlinevirtual

Definition at line 48 of file L1MuGMTReadoutCollection.h.

48 {};

Member Function Documentation

void L1MuGMTReadoutCollection::addRecord ( L1MuGMTReadoutRecord const &  rec)
inline

Definition at line 69 of file L1MuGMTReadoutCollection.h.

References m_Records.

69  {
70  m_Records.push_back(rec);
71  };
std::vector< L1MuGMTReadoutRecord > m_Records
L1MuGMTReadoutRecord const& L1MuGMTReadoutCollection::getRecord ( int  bx = 0) const
inline

Definition at line 56 of file L1MuGMTReadoutCollection.h.

References m_Records.

Referenced by L1GTDigiToRaw::packGmtCollection().

56  {
57  std::vector<L1MuGMTReadoutRecord>::const_iterator iter;
58  for (iter=m_Records.begin(); iter!=m_Records.end(); iter++) {
59  if ((*iter).getBxCounter() == bx) return (*iter);
60  }
61  // if bx not found return empty readout record
62  static std::map<int, L1MuGMTReadoutRecord> empty_record_cache;
63  if (empty_record_cache.find(bx) == empty_record_cache.end())
64  empty_record_cache.insert( std::make_pair(bx, L1MuGMTReadoutRecord(bx)) );
65  return empty_record_cache[bx];
66  };
std::vector< L1MuGMTReadoutRecord > m_Records
std::vector<L1MuGMTReadoutRecord> const& L1MuGMTReadoutCollection::getRecords ( ) const
inline
void L1MuGMTReadoutCollection::reset ( void  )
inline

Definition at line 50 of file L1MuGMTReadoutCollection.h.

References i, m_Records, and reset().

Referenced by BeautifulSoup.BeautifulStoneSoup::__init__(), and reset().

50 { for(unsigned int i=0; i<m_Records.size(); i++) m_Records[i].reset(); };
int i
Definition: DBlmapReader.cc:9
std::vector< L1MuGMTReadoutRecord > m_Records

Member Data Documentation

std::vector<L1MuGMTReadoutRecord> L1MuGMTReadoutCollection::m_Records
private