CMS 3D CMS Logo

L1MuDTDataBuffer Class Reference

Data Buffer:. More...

#include <L1Trigger/DTTrackFinder/src/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

typedef std::vector<L1MuDTTrackSegPhi*> L1MuDTDataBuffer::TSPhivector

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.

00048                                                                   : 
00049         m_sp(sp), m_tsphi(0) {
00050 
00051 
00052   m_tsphi = new TSPhivector(38);
00053   m_tsphi->reserve(38);
00054 
00055 }

L1MuDTDataBuffer::~L1MuDTDataBuffer (  )  [virtual]

destructor

Definition at line 61 of file L1MuDTDataBuffer.cc.

References m_tsphi.

00061                                     { 
00062 
00063   delete m_tsphi;
00064   
00065 }


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().

00103                                                                     {
00104 
00105   L1MuDTTrackSegPhi* tmpts = new L1MuDTTrackSegPhi(ts);
00106   (*m_tsphi)[adr] = tmpts;
00107   
00108 }

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.

00092                                                                                  {
00093 
00094   int address = (station == 1) ? reladr : reladr + (station-2)*12 + 2;
00095   return (*m_tsphi)[address];
00096   
00097 }

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().

00060 { return *m_tsphi; }

int L1MuDTDataBuffer::numberTSphi (  )  const

return number of non-empty phi track segments

Definition at line 128 of file L1MuDTDataBuffer.cc.

References count, iter, and m_tsphi.

Referenced by L1MuDTSectorProcessor::run().

00128                                         {
00129 
00130   int count = 0;
00131   TSPhivector::iterator iter = m_tsphi->begin();
00132   while ( iter != m_tsphi->end() ) {
00133     if ( *iter && !(*iter)->empty() ) count++;
00134     iter++;
00135   }
00136   return count;
00137 
00138 }

void L1MuDTDataBuffer::printTSphi (  )  const

print all phi track segments which are in the buffer

Definition at line 114 of file L1MuDTDataBuffer.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), iter, and m_tsphi.

Referenced by L1MuDTSectorProcessor::run().

00114                                         {
00115 
00116   TSPhivector::const_iterator iter = m_tsphi->begin();
00117   while ( iter != m_tsphi->end() ) {
00118     if ( *iter ) cout << *(*iter) << endl;
00119     iter++;
00120   }
00121   
00122 }

void L1MuDTDataBuffer::reset ( void   ) 

clear Data Buffer

Definition at line 75 of file L1MuDTDataBuffer.cc.

References iter, and m_tsphi.

Referenced by L1MuDTSectorProcessor::reset().

00075                              {
00076 
00077   TSPhivector::iterator iter = m_tsphi->begin();
00078   while ( iter != m_tsphi->end() ) {
00079     if ( *iter) {
00080       delete *iter; 
00081       *iter = 0;
00082     }
00083     iter++;
00084   }
00085 
00086 }


Member Data Documentation

const L1MuDTSectorProcessor& L1MuDTDataBuffer::m_sp [private]

Definition at line 76 of file L1MuDTDataBuffer.h.

TSPhivector* L1MuDTDataBuffer::m_tsphi [private]

Definition at line 77 of file L1MuDTDataBuffer.h.

Referenced by getTSphi(), L1MuDTDataBuffer(), numberTSphi(), printTSphi(), reset(), and ~L1MuDTDataBuffer().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:26:47 2009 for CMSSW by  doxygen 1.5.4