CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

L1MuDTDataBuffer Class Reference

#include <L1MuDTDataBuffer.h>

List of all members.

Public Types

typedef std::vector
< L1MuDTTrackSegPhi * > 
TSPhivector
 container to store phi track segments

Public Member Functions

void addTSphi (int adr, const L1MuDTTrackSegPhi &)
 add new phi track segment to the Data Buffer
const L1MuDTTrackSegPhigetTSphi (int station, int address) const
 get phi track segment of a given station from the buffer
const TSPhivectorgetTSphi () const
 get all track segments from the buffer
 L1MuDTDataBuffer (const L1MuDTSectorProcessor &)
 constructor
int numberTSphi () const
 return number of non-empty phi track segments
void printTSphi () const
 print all phi track segments which are in the buffer
void reset ()
 clear Data Buffer
virtual ~L1MuDTDataBuffer ()
 destructor

Private Attributes

const L1MuDTSectorProcessorm_sp
TSPhivectorm_tsphi

Detailed Description

Data Buffer:

The Data Buffer stores track segment data during the execution of the track assembler

Date:
2007/02/27 11:44:00
Revision:
1.2

N. Neumeister CERN EP

Definition at line 43 of file L1MuDTDataBuffer.h.


Member Typedef Documentation

container to store phi track segments

Definition at line 48 of file L1MuDTDataBuffer.h.


Constructor & Destructor Documentation

L1MuDTDataBuffer::L1MuDTDataBuffer ( const L1MuDTSectorProcessor sp)

constructor

Definition at line 48 of file L1MuDTDataBuffer.cc.

References m_tsphi.

                                                                  : 
        m_sp(sp), m_tsphi(0) {


  m_tsphi = new TSPhivector(38);
  m_tsphi->reserve(38);

}
L1MuDTDataBuffer::~L1MuDTDataBuffer ( ) [virtual]

destructor

Definition at line 61 of file L1MuDTDataBuffer.cc.

References m_tsphi.

                                    { 

  delete m_tsphi;
  
}

Member Function Documentation

void L1MuDTDataBuffer::addTSphi ( int  adr,
const L1MuDTTrackSegPhi ts 
)

add new phi track segment to the Data Buffer

Definition at line 103 of file L1MuDTDataBuffer.cc.

Referenced by L1MuDTSectorReceiver::receiveCSCData(), and L1MuDTSectorReceiver::receiveDTBXData().

                                                                    {

  L1MuDTTrackSegPhi* tmpts = new L1MuDTTrackSegPhi(ts);
  (*m_tsphi)[adr] = tmpts;
  
}
const TSPhivector& L1MuDTDataBuffer::getTSphi ( ) const [inline]

get all track segments from the buffer

Definition at line 60 of file L1MuDTDataBuffer.h.

References m_tsphi.

Referenced by L1MuDTSEU::run(), L1MuDTExtrapolationUnit::run(), and L1MuDTAssignmentUnit::TSR().

{ return *m_tsphi; }
const L1MuDTTrackSegPhi * L1MuDTDataBuffer::getTSphi ( int  station,
int  address 
) const

get phi track segment of a given station from the buffer

Definition at line 92 of file L1MuDTDataBuffer.cc.

References m_tsphi.

                                                                                 {

  int address = (station == 1) ? reladr : reladr + (station-2)*12 + 2;
  return (*m_tsphi)[address];
  
}
int L1MuDTDataBuffer::numberTSphi ( ) const

return number of non-empty phi track segments

Definition at line 128 of file L1MuDTDataBuffer.cc.

References prof2calltree::count, and m_tsphi.

Referenced by L1MuDTSectorProcessor::run().

                                        {

  int count = 0;
  TSPhivector::iterator iter = m_tsphi->begin();
  while ( iter != m_tsphi->end() ) {
    if ( *iter && !(*iter)->empty() ) count++;
    iter++;
  }
  return count;

}
void L1MuDTDataBuffer::printTSphi ( ) const

print all phi track segments which are in the buffer

Definition at line 114 of file L1MuDTDataBuffer.cc.

References gather_cfg::cout, and m_tsphi.

Referenced by L1MuDTSectorProcessor::run().

                                        {

  TSPhivector::const_iterator iter = m_tsphi->begin();
  while ( iter != m_tsphi->end() ) {
    if ( *iter ) cout << *(*iter) << endl;
    iter++;
  }
  
}
void L1MuDTDataBuffer::reset ( void  )

clear Data Buffer

Definition at line 75 of file L1MuDTDataBuffer.cc.

References m_tsphi.

Referenced by L1MuDTSectorProcessor::reset().

                             {

  TSPhivector::iterator iter = m_tsphi->begin();
  while ( iter != m_tsphi->end() ) {
    if ( *iter) {
      delete *iter; 
      *iter = 0;
    }
    iter++;
  }

}

Member Data Documentation

Definition at line 76 of file L1MuDTDataBuffer.h.