CMS 3D CMS Logo

Public Member Functions | Private Attributes

L1MuGMTReadoutCollection Class Reference

#include <L1MuGMTReadoutCollection.h>

List of all members.

Public Member Functions

void addRecord (L1MuGMTReadoutRecord const &rec)
L1MuGMTReadoutRecord const & getRecord (int bx=0) const
std::vector
< L1MuGMTReadoutRecord > const & 
getRecords () const
 L1MuGMTReadoutCollection (int nbx)
 L1MuGMTReadoutCollection ()
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.

{};
L1MuGMTReadoutCollection::L1MuGMTReadoutCollection ( int  nbx) [inline]

Definition at line 46 of file L1MuGMTReadoutCollection.h.

References m_Records.

{ m_Records.reserve(nbx); };
virtual L1MuGMTReadoutCollection::~L1MuGMTReadoutCollection ( ) [inline, virtual]

Definition at line 48 of file L1MuGMTReadoutCollection.h.

{};

Member Function Documentation

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

Definition at line 69 of file L1MuGMTReadoutCollection.h.

References m_Records.

                                                  {
    m_Records.push_back(rec);
  };
L1MuGMTReadoutRecord const& L1MuGMTReadoutCollection::getRecord ( int  bx = 0) const [inline]

Definition at line 56 of file L1MuGMTReadoutCollection.h.

References m_Records.

Referenced by L1GTDigiToRaw::packGmtCollection().

                                                         {
    std::vector<L1MuGMTReadoutRecord>::const_iterator iter;
    for (iter=m_Records.begin(); iter!=m_Records.end(); iter++) {
      if ((*iter).getBxCounter() == bx) return (*iter);
    }
    // if bx not found return empty readout record
    static std::map<int, L1MuGMTReadoutRecord> empty_record_cache;
    if (empty_record_cache.find(bx) == empty_record_cache.end())
      empty_record_cache.insert( std::make_pair(bx, L1MuGMTReadoutRecord(bx)) );
    return empty_record_cache[bx];
  };
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 reset().

{ for(unsigned int i=0; i<m_Records.size(); i++) m_Records[i].reset(); };

Member Data Documentation