CMS 3D CMS Logo

EcalFenixStripFormatEB Class Reference

Formatting for Fenix strip input: 18 bits + 3x 1bit (fgvb, gapflagbit, output from peakfinder) output:16 bits The output corresponds to 1 calodataframe per strip --- not really a calodataframe no? More...

#include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixStripFormatEB.h>

List of all members.

Public Member Functions

 EcalFenixStripFormatEB ()
virtual void process (std::vector< int > &, std::vector< int > &, std::vector< int > &)
void setParameters (uint32_t &, const EcalTPGSlidingWindow *&)
virtual ~EcalFenixStripFormatEB ()

Private Member Functions

int process ()
int setInput (int input, int inputPeak)

Private Attributes

int input_
int inputPeak_
uint32_t shift_


Detailed Description

Formatting for Fenix strip input: 18 bits + 3x 1bit (fgvb, gapflagbit, output from peakfinder) output:16 bits The output corresponds to 1 calodataframe per strip --- not really a calodataframe no?

Definition at line 18 of file EcalFenixStripFormatEB.h.


Constructor & Destructor Documentation

EcalFenixStripFormatEB::EcalFenixStripFormatEB (  ) 

Definition at line 5 of file EcalFenixStripFormatEB.cc.

00006     : shift_(0)
00007 {
00008 }

EcalFenixStripFormatEB::~EcalFenixStripFormatEB (  )  [virtual]

Definition at line 10 of file EcalFenixStripFormatEB.cc.

00010                                                   {
00011   }


Member Function Documentation

void EcalFenixStripFormatEB::process ( std::vector< int > &  peakout,
std::vector< int > &  filtout,
std::vector< int > &  output 
) [virtual]

Definition at line 31 of file EcalFenixStripFormatEB.cc.

References i, process(), and setInput().

00032 {
00033   if  (peakout.size()!=filtout.size()){
00034     edm::LogWarning("EcalTPG")<<" problem in EcalFenixStripFormatEB: peak_out and filt_out don't have the same size";
00035   }
00036   for  (unsigned int i =0;i<filtout.size();i++){
00037     setInput(filtout[i],peakout[i]);
00038 
00039     output[i]=process();
00040   }
00041   return;
00042 }

int EcalFenixStripFormatEB::process (  )  [private]

Definition at line 20 of file EcalFenixStripFormatEB.cc.

References input_, inputPeak_, output(), and shift_.

Referenced by process(), and EcalFenixStrip::process_part2_barrel().

00021   {
00022     //    buffer_=input_>>shift_;  //FIXME: buffer why?
00023 
00024     if(inputPeak_==0) return 0;
00025     //    int output=buffer_;
00026     int output=input_>>shift_;
00027     if(output>0XFFF) output=0XFFF;   //ok: barrel saturates at 12 bits
00028     return output;    
00029   } 

int EcalFenixStripFormatEB::setInput ( int  input,
int  inputPeak 
) [private]

Definition at line 13 of file EcalFenixStripFormatEB.cc.

References input_, and inputPeak_.

Referenced by process().

00014   {
00015     inputPeak_=inputPeak;
00016     input_=input;
00017     return 0;
00018   }  

void EcalFenixStripFormatEB::setParameters ( uint32_t &  id,
const EcalTPGSlidingWindow *&  slWin 
)

Definition at line 44 of file EcalFenixStripFormatEB.cc.

References it, and shift_.

Referenced by EcalFenixStrip::process_part2_barrel().

00045 {
00046 
00047   const EcalTPGSlidingWindowMap &slwinmap = slWin -> getMap();
00048   EcalTPGSlidingWindowMapIterator it=slwinmap.find(id);
00049   if (it!=slwinmap.end()) shift_=(*it).second;
00050   else edm::LogWarning("EcalTPG")<<" could not find EcalTPGSlidingWindowMap entry for "<<id;
00051 }


Member Data Documentation

int EcalFenixStripFormatEB::input_ [private]

Definition at line 22 of file EcalFenixStripFormatEB.h.

Referenced by process(), and setInput().

int EcalFenixStripFormatEB::inputPeak_ [private]

Definition at line 21 of file EcalFenixStripFormatEB.h.

Referenced by process(), and setInput().

uint32_t EcalFenixStripFormatEB::shift_ [private]

Definition at line 23 of file EcalFenixStripFormatEB.h.

Referenced by process(), and setParameters().


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