CMS 3D CMS Logo

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

◆ TSPhivector

container to store phi track segments

Definition at line 44 of file L1MuDTDataBuffer.h.

Constructor & Destructor Documentation

◆ L1MuDTDataBuffer()

L1MuDTDataBuffer::L1MuDTDataBuffer ( const L1MuDTSectorProcessor sp)

constructor

Definition at line 46 of file L1MuDTDataBuffer.cc.

46  : m_sp(sp), m_tsphi(nullptr) {
47  m_tsphi = new TSPhivector(38);
48  m_tsphi->reserve(38);
49 }

References m_tsphi.

◆ ~L1MuDTDataBuffer()

L1MuDTDataBuffer::~L1MuDTDataBuffer ( )
virtual

destructor

Definition at line 54 of file L1MuDTDataBuffer.cc.

54 { delete m_tsphi; }

References m_tsphi.

Member Function Documentation

◆ addTSphi()

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

add new phi track segment to the Data Buffer

Definition at line 85 of file L1MuDTDataBuffer.cc.

85  {
86  L1MuDTTrackSegPhi* tmpts = new L1MuDTTrackSegPhi(ts);
87  (*m_tsphi)[adr] = tmpts;
88 }

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

◆ getTSphi() [1/2]

const TSPhivector& L1MuDTDataBuffer::getTSphi ( ) const
inline

get all track segments from the buffer

Definition at line 56 of file L1MuDTDataBuffer.h.

56 { return *m_tsphi; }

References m_tsphi.

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

◆ getTSphi() [2/2]

const L1MuDTTrackSegPhi * L1MuDTDataBuffer::getTSphi ( int  station,
int  address 
) const

get phi track segment of a given station from the buffer

Definition at line 77 of file L1MuDTDataBuffer.cc.

77  {
78  int address = (station == 1) ? reladr : reladr + (station - 2) * 12 + 2;
79  return (*m_tsphi)[address];
80 }

References m_tsphi, and relativeConstraints::station.

◆ numberTSphi()

int L1MuDTDataBuffer::numberTSphi ( ) const

return number of non-empty phi track segments

Definition at line 105 of file L1MuDTDataBuffer.cc.

105  {
106  int count = 0;
107  TSPhivector::iterator iter = m_tsphi->begin();
108  while (iter != m_tsphi->end()) {
109  if (*iter && !(*iter)->empty())
110  count++;
111  iter++;
112  }
113  return count;
114 }

References KineDebug3::count(), and m_tsphi.

Referenced by L1MuDTSectorProcessor::run().

◆ printTSphi()

void L1MuDTDataBuffer::printTSphi ( ) const

print all phi track segments which are in the buffer

Definition at line 93 of file L1MuDTDataBuffer.cc.

93  {
94  TSPhivector::const_iterator iter = m_tsphi->begin();
95  while (iter != m_tsphi->end()) {
96  if (*iter)
97  cout << *(*iter) << endl;
98  iter++;
99  }
100 }

References gather_cfg::cout, and m_tsphi.

Referenced by L1MuDTSectorProcessor::run().

◆ reset()

void L1MuDTDataBuffer::reset ( void  )

clear Data Buffer

Definition at line 63 of file L1MuDTDataBuffer.cc.

63  {
64  TSPhivector::iterator iter = m_tsphi->begin();
65  while (iter != m_tsphi->end()) {
66  if (*iter) {
67  delete *iter;
68  *iter = nullptr;
69  }
70  iter++;
71  }
72 }

References m_tsphi.

Referenced by L1MuDTSectorProcessor::reset().

Member Data Documentation

◆ m_sp

const L1MuDTSectorProcessor& L1MuDTDataBuffer::m_sp
private

Definition at line 71 of file L1MuDTDataBuffer.h.

◆ m_tsphi

TSPhivector* L1MuDTDataBuffer::m_tsphi
private
relativeConstraints.station
station
Definition: relativeConstraints.py:67
gather_cfg.cout
cout
Definition: gather_cfg.py:144
L1MuDTDataBuffer::m_tsphi
TSPhivector * m_tsphi
Definition: L1MuDTDataBuffer.h:72
L1MuDTDataBuffer::TSPhivector
std::vector< L1MuDTTrackSegPhi * > TSPhivector
container to store phi track segments
Definition: L1MuDTDataBuffer.h:44
L1MuDTDataBuffer::m_sp
const L1MuDTSectorProcessor & m_sp
Definition: L1MuDTDataBuffer.h:71
KineDebug3::count
void count()
Definition: KinematicConstrainedVertexUpdatorT.h:21
L1MuDTTrackSegPhi
Definition: L1MuDTTrackSegPhi.h:36