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

N. Neumeister CERN EP

Definition at line 41 of file L1MuDTDataBuffer.h.

Member Typedef Documentation

container to store phi track segments

Definition at line 46 of file L1MuDTDataBuffer.h.

Constructor & Destructor Documentation

L1MuDTDataBuffer::L1MuDTDataBuffer ( const L1MuDTSectorProcessor sp)

constructor

Definition at line 46 of file L1MuDTDataBuffer.cc.

References m_tsphi.

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

destructor

Definition at line 59 of file L1MuDTDataBuffer.cc.

References m_tsphi.

59  {
60 
61  delete m_tsphi;
62 
63 }
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 101 of file L1MuDTDataBuffer.cc.

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

101  {
102 
103  L1MuDTTrackSegPhi* tmpts = new L1MuDTTrackSegPhi(ts);
104  (*m_tsphi)[adr] = tmpts;
105 
106 }
const TSPhivector& L1MuDTDataBuffer::getTSphi ( ) const
inline

get all track segments from the buffer

Definition at line 58 of file L1MuDTDataBuffer.h.

References m_tsphi.

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

58 { 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 90 of file L1MuDTDataBuffer.cc.

References m_tsphi.

90  {
91 
92  int address = (station == 1) ? reladr : reladr + (station-2)*12 + 2;
93  return (*m_tsphi)[address];
94 
95 }
TSPhivector * m_tsphi
int L1MuDTDataBuffer::numberTSphi ( ) const

return number of non-empty phi track segments

Definition at line 126 of file L1MuDTDataBuffer.cc.

References prof2calltree::count, and m_tsphi.

Referenced by L1MuDTSectorProcessor::run().

126  {
127 
128  int count = 0;
129  TSPhivector::iterator iter = m_tsphi->begin();
130  while ( iter != m_tsphi->end() ) {
131  if ( *iter && !(*iter)->empty() ) count++;
132  iter++;
133  }
134  return count;
135 
136 }
TSPhivector * m_tsphi
void L1MuDTDataBuffer::printTSphi ( ) const

print all phi track segments which are in the buffer

Definition at line 112 of file L1MuDTDataBuffer.cc.

References gather_cfg::cout, and m_tsphi.

Referenced by L1MuDTSectorProcessor::run().

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

clear Data Buffer

Definition at line 73 of file L1MuDTDataBuffer.cc.

References m_tsphi.

Referenced by L1MuDTSectorProcessor::reset().

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

Member Data Documentation

const L1MuDTSectorProcessor& L1MuDTDataBuffer::m_sp
private

Definition at line 74 of file L1MuDTDataBuffer.h.

TSPhivector* L1MuDTDataBuffer::m_tsphi
private