CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

virtual void fetchInput ()
 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...
 
virtual void process ()
 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 ()
 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

virtual void resetPipelines ()
 
virtual void resetProcessor ()
 Separate reset methods for the processor itself and any data stored in pipelines. More...
 
virtual void setupObjects ()
 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
 

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.

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 ( int  id)

construct with ID

Definition at line 10 of file L1GctEmLeafCard.cc.

References m_sorters.

10  :
11  m_id(id),
12  m_sorters(4)
13 {
14 
15  // sorters 0 and 1 are in FPGA U1 and deal with RCT crates 4-8 (13-17)
16  m_sorters.at(0) = new L1GctElectronSorter(5,true);
17  m_sorters.at(1) = new L1GctElectronSorter(5,false);
18 
19  // sorters 2 and 3 are in FPGA U2 and deal with RCT crates 0-3 (9-12)
20  m_sorters.at(2) = new L1GctElectronSorter(4,true);
21  m_sorters.at(3) = new L1GctElectronSorter(4,false);
22 }
int m_id
card ID (0 or 1)
Class that sorts electron candidates.
std::vector< L1GctElectronSorter * > m_sorters
L1GctEmLeafCard::~L1GctEmLeafCard ( )

destruct

Definition at line 25 of file L1GctEmLeafCard.cc.

References m_sorters.

26 {
27  delete m_sorters.at(0);
28  delete m_sorters.at(1);
29  delete m_sorters.at(2);
30  delete m_sorters.at(3);
31 }
std::vector< L1GctElectronSorter * > m_sorters

Member Function Documentation

void L1GctEmLeafCard::fetchInput ( )
virtual

fetch input data

Implements L1GctProcessor.

Definition at line 59 of file L1GctEmLeafCard.cc.

References i, m_sorters, and N_SORTERS.

59  {
60  for (unsigned i=0; i<N_SORTERS; i++) {
61  m_sorters.at(i)->fetchInput();
62  }
63 }
int i
Definition: DBlmapReader.cc:9
static const unsigned N_SORTERS
std::vector< L1GctElectronSorter * > m_sorters
L1GctElectronSorter* L1GctEmLeafCard::getIsoElectronSorterU1 ( )
inline

Definition at line 58 of file L1GctEmLeafCard.h.

References m_sorters.

Referenced by L1GctElectronFinalSort::fetchInput().

58 { return m_sorters.at(0); }
std::vector< L1GctElectronSorter * > m_sorters
L1GctElectronSorter* L1GctEmLeafCard::getIsoElectronSorterU2 ( )
inline

Definition at line 60 of file L1GctEmLeafCard.h.

References m_sorters.

Referenced by L1GctElectronFinalSort::fetchInput().

60 { return m_sorters.at(2); }
std::vector< L1GctElectronSorter * > m_sorters
L1GctElectronSorter* L1GctEmLeafCard::getNonIsoElectronSorterU1 ( )
inline

Definition at line 59 of file L1GctEmLeafCard.h.

References m_sorters.

Referenced by L1GctElectronFinalSort::fetchInput().

59 { return m_sorters.at(1); }
std::vector< L1GctElectronSorter * > m_sorters
L1GctElectronSorter* L1GctEmLeafCard::getNonIsoElectronSorterU2 ( )
inline

Definition at line 61 of file L1GctEmLeafCard.h.

References m_sorters.

Referenced by L1GctElectronFinalSort::fetchInput().

61 { return m_sorters.at(3); }
std::vector< L1GctElectronSorter * > m_sorters
vector< L1GctEmCand > L1GctEmLeafCard::getOutputIsoEmCands ( int  fpga)

get the output candidates

Definition at line 73 of file L1GctEmLeafCard.cc.

References m_sorters.

73  {
74  if (fpga<2) {
75  return m_sorters.at(2*fpga)->getOutputCands();
76  }
77  else {
78  return vector<L1GctEmCand>(0);
79  }
80 }
std::vector< L1GctElectronSorter * > m_sorters
vector< L1GctEmCand > L1GctEmLeafCard::getOutputNonIsoEmCands ( int  fpga)

get the output candidates

Definition at line 83 of file L1GctEmLeafCard.cc.

References m_sorters.

83  {
84  if (fpga<2) {
85  return m_sorters.at(2*fpga+1)->getOutputCands();
86  }
87  else {
88  return vector<L1GctEmCand>(0);
89  }
90 }
std::vector< L1GctElectronSorter * > m_sorters
int L1GctEmLeafCard::id ( void  )
inline

get ID

Definition at line 47 of file L1GctEmLeafCard.h.

References m_id.

47 { return m_id; }
int m_id
card ID (0 or 1)
void L1GctEmLeafCard::process ( )
virtual
void L1GctEmLeafCard::reset ( void  )

clear internal trigger data buffers

clear buffers

Definition at line 35 of file L1GctEmLeafCard.cc.

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

35  {
37  for (unsigned i=0; i<N_SORTERS; i++) {
38  m_sorters.at(i)->reset();
39  }
40 }
void reset()
complete reset of processor
int i
Definition: DBlmapReader.cc:9
static const unsigned N_SORTERS
std::vector< L1GctElectronSorter * > m_sorters
virtual void L1GctEmLeafCard::resetPipelines ( )
inlineprotectedvirtual

Implements L1GctProcessor.

Definition at line 67 of file L1GctEmLeafCard.h.

67 {}
virtual void L1GctEmLeafCard::resetProcessor ( )
inlineprotectedvirtual

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

Implements L1GctProcessor.

Definition at line 66 of file L1GctEmLeafCard.h.

66 {}
void L1GctEmLeafCard::setBxRange ( const int  firstBx,
const int  numberOfBx 
)

define the bunch crossing range to process

partially clear buffers

Definition at line 43 of file L1GctEmLeafCard.cc.

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

43  {
44  L1GctProcessor::setBxRange(firstBx, numberOfBx);
45  for (unsigned i=0; i<N_SORTERS; i++) {
46  m_sorters.at(i)->setBxRange(firstBx, numberOfBx);
47  }
48 }
int i
Definition: DBlmapReader.cc:9
static const unsigned N_SORTERS
std::vector< L1GctElectronSorter * > m_sorters
void setBxRange(const int firstBx, const int numberOfBx)
define the bunch crossing range to process
void L1GctEmLeafCard::setNextBx ( const int  bxnum)

clear input data buffers and process a new bunch crossing

partially clear buffers

Definition at line 51 of file L1GctEmLeafCard.cc.

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

51  {
53  for (unsigned i=0; i<N_SORTERS; i++) {
54  m_sorters.at(i)->setNextBx(bx);
55  }
56 }
int i
Definition: DBlmapReader.cc:9
static const unsigned N_SORTERS
std::vector< L1GctElectronSorter * > m_sorters
void setNextBx(const int bxnum)
clear input data buffers and process a new bunch crossing
virtual void L1GctEmLeafCard::setupObjects ( )
inlineprotectedvirtual

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

Implements L1GctProcessor.

Definition at line 70 of file L1GctEmLeafCard.h.

70 {}

Friends And Related Function Documentation

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

overload of cout operator

Member Data Documentation

int L1GctEmLeafCard::m_id
private

card ID (0 or 1)

Definition at line 74 of file L1GctEmLeafCard.h.

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

std::vector<L1GctElectronSorter*> L1GctEmLeafCard::m_sorters
private
const unsigned L1GctEmLeafCard::N_SORTERS = 4
static

Definition at line 22 of file L1GctEmLeafCard.h.

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