CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes | Friends
L1GctEmLeafCard Class Reference

Emulates a leaf card programmed for electron sorting. More...

#include <L1GctEmLeafCard.h>

Inheritance diagram for L1GctEmLeafCard:
L1GctProcessor

Public Member Functions

void fetchInput () override
 fetch input data More...
 
L1GctElectronSortergetIsoElectronSorterU1 ()
 
L1GctElectronSortergetIsoElectronSorterU2 ()
 
L1GctElectronSortergetNonIsoElectronSorterU1 ()
 
L1GctElectronSortergetNonIsoElectronSorterU2 ()
 
std::vector< L1GctEmCandgetOutputIsoEmCands (int fpga)
 get the output candidates More...
 
std::vector< L1GctEmCandgetOutputNonIsoEmCands (int fpga)
 get the output candidates More...
 
int id ()
 get ID More...
 
 L1GctEmLeafCard (int id)
 construct with ID More...
 
void process () override
 process the event More...
 
void reset ()
 clear internal trigger data buffers More...
 
void setBxRange (const int firstBx, const int numberOfBx)
 define the bunch crossing range to process More...
 
void setNextBx (const int bxnum)
 clear input data buffers and process a new bunch crossing More...
 
 ~L1GctEmLeafCard () override
 destruct More...
 
- Public Member Functions inherited from L1GctProcessor
 L1GctProcessor ()
 
void reset ()
 complete reset of processor More...
 
void setBxRange (const int firstBx, const int numberOfBx)
 define the bunch crossing range to process More...
 
void setNextBx (const int bxnum)
 clear input data buffers and process a new bunch crossing More...
 
void setTerse ()
 
bool setupOk () const
 Method to check the setup for this processor. Returns true by default. More...
 
void setVerbose ()
 control output messages More...
 
virtual ~L1GctProcessor ()
 

Static Public Attributes

static const unsigned N_SORTERS = 4
 

Protected Member Functions

void resetPipelines () override
 
void resetProcessor () override
 Separate reset methods for the processor itself and any data stored in pipelines. More...
 
void setupObjects () override
 Initialise inputs with null objects for the correct bunch crossing if required. More...
 
- Protected Member Functions inherited from L1GctProcessor
int bxAbs () const
 
int bxMax () const
 
int bxMin () const
 Support for multiple beam crossing operation. More...
 
int bxRel () const
 
int numOfBx () const
 

Private Attributes

int m_id
 card ID (0 or 1) More...
 
std::vector< L1GctElectronSorter * > m_sorters
 processing - 0,2 are iso sorters, 1,3 are non-iso More...
 

Friends

std::ostream & operator<< (std::ostream &s, const L1GctEmLeafCard &card)
 overload of cout operator More...
 

Additional Inherited Members

- Protected Attributes inherited from L1GctProcessor
bool m_verbose
 Flag to control output messages. More...
 

Detailed Description

Emulates a leaf card programmed for electron sorting.

\Class L1GctEmLeafCard This class does the 1st stage sorting of the electron candidates.

Author
Jim Brooke
Date
20/02/06

Definition at line 20 of file L1GctEmLeafCard.h.

Constructor & Destructor Documentation

◆ L1GctEmLeafCard()

L1GctEmLeafCard::L1GctEmLeafCard ( int  id)

construct with ID

Definition at line 10 of file L1GctEmLeafCard.cc.

10  : m_id(id), m_sorters(4) {
11  // sorters 0 and 1 are in FPGA U1 and deal with RCT crates 4-8 (13-17)
12  m_sorters.at(0) = new L1GctElectronSorter(5, true);
13  m_sorters.at(1) = new L1GctElectronSorter(5, false);
14 
15  // sorters 2 and 3 are in FPGA U2 and deal with RCT crates 0-3 (9-12)
16  m_sorters.at(2) = new L1GctElectronSorter(4, true);
17  m_sorters.at(3) = new L1GctElectronSorter(4, false);
18 }

References m_sorters.

◆ ~L1GctEmLeafCard()

L1GctEmLeafCard::~L1GctEmLeafCard ( )
override

destruct

Definition at line 20 of file L1GctEmLeafCard.cc.

20  {
21  delete m_sorters.at(0);
22  delete m_sorters.at(1);
23  delete m_sorters.at(2);
24  delete m_sorters.at(3);
25 }

References m_sorters.

Member Function Documentation

◆ fetchInput()

void L1GctEmLeafCard::fetchInput ( )
overridevirtual

fetch input data

Implements L1GctProcessor.

Definition at line 52 of file L1GctEmLeafCard.cc.

52  {
53  for (unsigned i = 0; i < N_SORTERS; i++) {
54  m_sorters.at(i)->fetchInput();
55  }
56 }

References mps_fire::i, m_sorters, and N_SORTERS.

◆ getIsoElectronSorterU1()

L1GctElectronSorter* L1GctEmLeafCard::getIsoElectronSorterU1 ( )
inline

Definition at line 58 of file L1GctEmLeafCard.h.

58 { return m_sorters.at(0); }

References m_sorters.

Referenced by L1GctElectronFinalSort::fetchInput().

◆ getIsoElectronSorterU2()

L1GctElectronSorter* L1GctEmLeafCard::getIsoElectronSorterU2 ( )
inline

Definition at line 60 of file L1GctEmLeafCard.h.

60 { return m_sorters.at(2); }

References m_sorters.

Referenced by L1GctElectronFinalSort::fetchInput().

◆ getNonIsoElectronSorterU1()

L1GctElectronSorter* L1GctEmLeafCard::getNonIsoElectronSorterU1 ( )
inline

Definition at line 59 of file L1GctEmLeafCard.h.

59 { return m_sorters.at(1); }

References m_sorters.

Referenced by L1GctElectronFinalSort::fetchInput().

◆ getNonIsoElectronSorterU2()

L1GctElectronSorter* L1GctEmLeafCard::getNonIsoElectronSorterU2 ( )
inline

Definition at line 61 of file L1GctEmLeafCard.h.

61 { return m_sorters.at(3); }

References m_sorters.

Referenced by L1GctElectronFinalSort::fetchInput().

◆ getOutputIsoEmCands()

vector< L1GctEmCand > L1GctEmLeafCard::getOutputIsoEmCands ( int  fpga)

get the output candidates

Definition at line 66 of file L1GctEmLeafCard.cc.

66  {
67  if (fpga < 2) {
68  return m_sorters.at(2 * fpga)->getOutputCands();
69  } else {
70  return vector<L1GctEmCand>(0);
71  }
72 }

References m_sorters.

◆ getOutputNonIsoEmCands()

vector< L1GctEmCand > L1GctEmLeafCard::getOutputNonIsoEmCands ( int  fpga)

get the output candidates

Definition at line 75 of file L1GctEmLeafCard.cc.

75  {
76  if (fpga < 2) {
77  return m_sorters.at(2 * fpga + 1)->getOutputCands();
78  } else {
79  return vector<L1GctEmCand>(0);
80  }
81 }

References m_sorters.

◆ id()

int L1GctEmLeafCard::id ( void  )
inline

get ID

Definition at line 47 of file L1GctEmLeafCard.h.

47 { return m_id; }

References m_id.

◆ process()

void L1GctEmLeafCard::process ( )
overridevirtual

process the event

Implements L1GctProcessor.

Definition at line 59 of file L1GctEmLeafCard.cc.

59  {
60  for (unsigned i = 0; i < N_SORTERS; i++) {
61  m_sorters.at(i)->process();
62  }
63 }

References mps_fire::i, m_sorters, and N_SORTERS.

◆ reset()

void L1GctEmLeafCard::reset ( void  )

clear internal trigger data buffers

clear buffers

Definition at line 28 of file L1GctEmLeafCard.cc.

28  {
30  for (unsigned i = 0; i < N_SORTERS; i++) {
31  m_sorters.at(i)->reset();
32  }
33 }

References mps_fire::i, m_sorters, N_SORTERS, and L1GctProcessor::reset().

◆ resetPipelines()

void L1GctEmLeafCard::resetPipelines ( )
inlineoverrideprotectedvirtual

Implements L1GctProcessor.

Definition at line 66 of file L1GctEmLeafCard.h.

66 {}

◆ resetProcessor()

void L1GctEmLeafCard::resetProcessor ( )
inlineoverrideprotectedvirtual

Separate reset methods for the processor itself and any data stored in pipelines.

Implements L1GctProcessor.

Definition at line 65 of file L1GctEmLeafCard.h.

65 {}

◆ setBxRange()

void L1GctEmLeafCard::setBxRange ( const int  firstBx,
const int  numberOfBx 
)

define the bunch crossing range to process

partially clear buffers

Definition at line 36 of file L1GctEmLeafCard.cc.

36  {
37  L1GctProcessor::setBxRange(firstBx, numberOfBx);
38  for (unsigned i = 0; i < N_SORTERS; i++) {
39  m_sorters.at(i)->setBxRange(firstBx, numberOfBx);
40  }
41 }

References mps_fire::i, m_sorters, N_SORTERS, and L1GctProcessor::setBxRange().

◆ setNextBx()

void L1GctEmLeafCard::setNextBx ( const int  bxnum)

clear input data buffers and process a new bunch crossing

partially clear buffers

Definition at line 44 of file L1GctEmLeafCard.cc.

44  {
46  for (unsigned i = 0; i < N_SORTERS; i++) {
47  m_sorters.at(i)->setNextBx(bx);
48  }
49 }

References l1GtPatternGenerator_cfi::bx, mps_fire::i, m_sorters, N_SORTERS, and L1GctProcessor::setNextBx().

◆ setupObjects()

void L1GctEmLeafCard::setupObjects ( )
inlineoverrideprotectedvirtual

Initialise inputs with null objects for the correct bunch crossing if required.

Implements L1GctProcessor.

Definition at line 69 of file L1GctEmLeafCard.h.

69 {}

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  s,
const L1GctEmLeafCard card 
)
friend

overload of cout operator

Member Data Documentation

◆ m_id

int L1GctEmLeafCard::m_id
private

card ID (0 or 1)

Definition at line 73 of file L1GctEmLeafCard.h.

Referenced by id(), and operator<<().

◆ m_sorters

std::vector<L1GctElectronSorter*> L1GctEmLeafCard::m_sorters
private

◆ N_SORTERS

const unsigned L1GctEmLeafCard::N_SORTERS = 4
static

Definition at line 22 of file L1GctEmLeafCard.h.

Referenced by fetchInput(), process(), reset(), setBxRange(), and setNextBx().

mps_fire.i
i
Definition: mps_fire.py:428
L1GctProcessor::setNextBx
void setNextBx(const int bxnum)
clear input data buffers and process a new bunch crossing
Definition: L1GctProcessor.h:51
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
L1GctProcessor::setBxRange
void setBxRange(const int firstBx, const int numberOfBx)
define the bunch crossing range to process
Definition: L1GctProcessor.h:44
L1GctEmLeafCard::m_sorters
std::vector< L1GctElectronSorter * > m_sorters
processing - 0,2 are iso sorters, 1,3 are non-iso
Definition: L1GctEmLeafCard.h:76
L1GctEmLeafCard::N_SORTERS
static const unsigned N_SORTERS
Definition: L1GctEmLeafCard.h:22
L1GctProcessor::reset
void reset()
complete reset of processor
Definition: L1GctProcessor.h:28
L1GctElectronSorter
Class that sorts electron candidates.
Definition: L1GctElectronSorter.h:26
L1GctEmLeafCard::m_id
int m_id
card ID (0 or 1)
Definition: L1GctEmLeafCard.h:73