CMS 3D CMS Logo

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

#include <L1MuDTDataBuffer.h>

Public Types

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

Public Member Functions

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

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.

48  :
49  m_sp(sp), m_tsphi(0) {
50 
51 
52  m_tsphi = new TSPhivector(38);
53  m_tsphi->reserve(38);
54 
55 }
const L1MuDTSectorProcessor & m_sp
TSPhivector * m_tsphi
std::vector< L1MuDTTrackSegPhi * > TSPhivector
container to store phi track segments
L1MuDTDataBuffer::~L1MuDTDataBuffer ( )
virtual

destructor

Definition at line 61 of file L1MuDTDataBuffer.cc.

References m_tsphi.

61  {
62 
63  delete m_tsphi;
64 
65 }
TSPhivector * 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().

103  {
104 
105  L1MuDTTrackSegPhi* tmpts = new L1MuDTTrackSegPhi(ts);
106  (*m_tsphi)[adr] = tmpts;
107 
108 }
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().

60 { return *m_tsphi; }
TSPhivector * 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.

92  {
93 
94  int address = (station == 1) ? reladr : reladr + (station-2)*12 + 2;
95  return (*m_tsphi)[address];
96 
97 }
char * address
Definition: mlp_lapack.h:14
TSPhivector * m_tsphi
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().

128  {
129 
130  int count = 0;
131  TSPhivector::iterator iter = m_tsphi->begin();
132  while ( iter != m_tsphi->end() ) {
133  if ( *iter && !(*iter)->empty() ) count++;
134  iter++;
135  }
136  return count;
137 
138 }
TSPhivector * m_tsphi
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().

114  {
115 
116  TSPhivector::const_iterator iter = m_tsphi->begin();
117  while ( iter != m_tsphi->end() ) {
118  if ( *iter ) cout << *(*iter) << endl;
119  iter++;
120  }
121 
122 }
TSPhivector * m_tsphi
tuple cout
Definition: gather_cfg.py:121
void L1MuDTDataBuffer::reset ( void  )

clear Data Buffer

Definition at line 75 of file L1MuDTDataBuffer.cc.

References m_tsphi.

Referenced by L1MuDTSectorProcessor::reset().

75  {
76 
77  TSPhivector::iterator iter = m_tsphi->begin();
78  while ( iter != m_tsphi->end() ) {
79  if ( *iter) {
80  delete *iter;
81  *iter = 0;
82  }
83  iter++;
84  }
85 
86 }
TSPhivector * m_tsphi

Member Data Documentation

const L1MuDTSectorProcessor& L1MuDTDataBuffer::m_sp
private

Definition at line 76 of file L1MuDTDataBuffer.h.

TSPhivector* L1MuDTDataBuffer::m_tsphi
private