CMS 3D CMS Logo

L1GctEmLeafCard Class Reference

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

#include <L1Trigger/GlobalCaloTrigger/interface/L1GctEmLeafCard.h>

Inheritance diagram for L1GctEmLeafCard:

L1GctProcessor

List of all members.

Public Member Functions

virtual void fetchInput ()
 fetch input data
L1GctElectronSortergetIsoElectronSorterU1 ()
L1GctElectronSortergetIsoElectronSorterU2 ()
L1GctElectronSortergetNonIsoElectronSorterU1 ()
L1GctElectronSortergetNonIsoElectronSorterU2 ()
std::vector< L1GctEmCandgetOutputIsoEmCands (int fpga)
 get the output candidates
std::vector< L1GctEmCandgetOutputNonIsoEmCands (int fpga)
 get the output candidates
int id ()
 get ID
 L1GctEmLeafCard (int id)
 construct with ID
virtual void process ()
 process the event
void reset ()
 clear internal trigger data buffers
void setBxRange (const int firstBx, const int numberOfBx)
 define the bunch crossing range to process
void setNextBx (const int bxnum)
 clear input data buffers and process a new bunch crossing
 ~L1GctEmLeafCard ()
 destruct

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.
virtual void setupObjects ()
 Initialise inputs with null objects for the correct bunch crossing if required.

Private Attributes

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

Friends

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


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.

00010                                        :
00011   m_id(id),
00012   m_sorters(4)
00013 {
00014   
00015   // sorters 0 and 1 are in FPGA U1 and deal with RCT crates 4-8 (13-17)
00016   m_sorters.at(0) = new L1GctElectronSorter(5,true);
00017   m_sorters.at(1) = new L1GctElectronSorter(5,false);
00018 
00019   // sorters 2 and 3 are in FPGA U2 and deal with RCT crates 0-3 (9-12)
00020   m_sorters.at(2) = new L1GctElectronSorter(4,true);
00021   m_sorters.at(3) = new L1GctElectronSorter(4,false);
00022 }

L1GctEmLeafCard::~L1GctEmLeafCard (  ) 

destruct

Definition at line 25 of file L1GctEmLeafCard.cc.

References m_sorters.

00026 {
00027   delete m_sorters.at(0);
00028   delete m_sorters.at(1);
00029   delete m_sorters.at(2);
00030   delete m_sorters.at(3);
00031 }


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.

00059                                  {
00060   for (unsigned i=0; i<N_SORTERS; i++) {
00061     m_sorters.at(i)->fetchInput();
00062   }
00063 }

L1GctElectronSorter* L1GctEmLeafCard::getIsoElectronSorterU1 (  )  [inline]

Definition at line 58 of file L1GctEmLeafCard.h.

References m_sorters.

Referenced by L1GctElectronFinalSort::fetchInput().

00058 { return m_sorters.at(0); }

L1GctElectronSorter* L1GctEmLeafCard::getIsoElectronSorterU2 (  )  [inline]

Definition at line 60 of file L1GctEmLeafCard.h.

References m_sorters.

Referenced by L1GctElectronFinalSort::fetchInput().

00060 { return m_sorters.at(2); }

L1GctElectronSorter* L1GctEmLeafCard::getNonIsoElectronSorterU1 (  )  [inline]

Definition at line 59 of file L1GctEmLeafCard.h.

References m_sorters.

Referenced by L1GctElectronFinalSort::fetchInput().

00059 { return m_sorters.at(1); }

L1GctElectronSorter* L1GctEmLeafCard::getNonIsoElectronSorterU2 (  )  [inline]

Definition at line 61 of file L1GctEmLeafCard.h.

References m_sorters.

Referenced by L1GctElectronFinalSort::fetchInput().

00061 { return m_sorters.at(3); }

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

get the output candidates

Definition at line 73 of file L1GctEmLeafCard.cc.

References m_sorters.

00073                                                                  {
00074   if (fpga<2) {
00075     return m_sorters.at(2*fpga)->getOutputCands();
00076   }
00077   else {
00078     return vector<L1GctEmCand>(0);
00079   }
00080 }

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

get the output candidates

Definition at line 83 of file L1GctEmLeafCard.cc.

References m_sorters.

00083                                                                     {
00084   if (fpga<2) {
00085     return m_sorters.at(2*fpga+1)->getOutputCands();
00086   }
00087   else {
00088     return vector<L1GctEmCand>(0);
00089   }
00090 }

int L1GctEmLeafCard::id ( void   )  [inline]

get ID

Definition at line 47 of file L1GctEmLeafCard.h.

References m_id.

00047 { return m_id; }

void L1GctEmLeafCard::process (  )  [virtual]

process the event

Implements L1GctProcessor.

Definition at line 66 of file L1GctEmLeafCard.cc.

References i, m_sorters, and N_SORTERS.

00066                               {
00067   for (unsigned i=0; i<N_SORTERS; i++) {
00068     m_sorters.at(i)->process();
00069   }
00070 }

void L1GctEmLeafCard::reset ( void   ) 

clear internal trigger data buffers

clear buffers

Reimplemented from L1GctProcessor.

Definition at line 35 of file L1GctEmLeafCard.cc.

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

00035                             {
00036   L1GctProcessor::reset();
00037   for (unsigned i=0; i<N_SORTERS; i++) {
00038     m_sorters.at(i)->reset();
00039   }
00040 }

virtual void L1GctEmLeafCard::resetPipelines (  )  [inline, protected, virtual]

Implements L1GctProcessor.

Definition at line 67 of file L1GctEmLeafCard.h.

00067 {}

virtual void L1GctEmLeafCard::resetProcessor (  )  [inline, protected, virtual]

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

Implements L1GctProcessor.

Definition at line 66 of file L1GctEmLeafCard.h.

00066 {}

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

define the bunch crossing range to process

partially clear buffers

Reimplemented from L1GctProcessor.

Definition at line 43 of file L1GctEmLeafCard.cc.

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

00043                                                                         {
00044   L1GctProcessor::setBxRange(firstBx, numberOfBx);
00045   for (unsigned i=0; i<N_SORTERS; i++) {
00046     m_sorters.at(i)->setBxRange(firstBx, numberOfBx);
00047   }
00048 }

void L1GctEmLeafCard::setNextBx ( const int  bxnum  ) 

clear input data buffers and process a new bunch crossing

partially clear buffers

Reimplemented from L1GctProcessor.

Definition at line 51 of file L1GctEmLeafCard.cc.

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

00051                                             {
00052   L1GctProcessor::setNextBx(bx);
00053   for (unsigned i=0; i<N_SORTERS; i++) {
00054     m_sorters.at(i)->setNextBx(bx);
00055   }
00056 }

virtual void L1GctEmLeafCard::setupObjects (  )  [inline, protected, virtual]

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

Implements L1GctProcessor.

Definition at line 70 of file L1GctEmLeafCard.h.

00070 {}


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]

processing - 0,2 are iso sorters, 1,3 are non-iso

Definition at line 77 of file L1GctEmLeafCard.h.

Referenced by fetchInput(), getIsoElectronSorterU1(), getIsoElectronSorterU2(), getNonIsoElectronSorterU1(), getNonIsoElectronSorterU2(), getOutputIsoEmCands(), getOutputNonIsoEmCands(), L1GctEmLeafCard(), operator<<(), process(), reset(), setBxRange(), setNextBx(), and ~L1GctEmLeafCard().

const unsigned L1GctEmLeafCard::N_SORTERS = 4 [static]

Definition at line 22 of file L1GctEmLeafCard.h.

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


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:26:29 2009 for CMSSW by  doxygen 1.5.4