CMS 3D CMS Logo

EcalFenixStripFormatEE 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/EcalFenixStripFormatEE.h>

List of all members.

Public Member Functions

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

Private Member Functions

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

Private Attributes

int fgvb_
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 17 of file EcalFenixStripFormatEE.h.


Constructor & Destructor Documentation

EcalFenixStripFormatEE::EcalFenixStripFormatEE (  ) 

Definition at line 9 of file EcalFenixStripFormatEE.cc.

00010   : shift_(0)
00011 {
00012 }

EcalFenixStripFormatEE::~EcalFenixStripFormatEE (  )  [virtual]

Definition at line 15 of file EcalFenixStripFormatEE.cc.

00015                                                 {
00016 }


Member Function Documentation

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

Definition at line 43 of file EcalFenixStripFormatEE.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), flush(), i, process(), and setInput().

00044                                                                                      {
00045   if  (peakout.size()!=filtout.size()){
00046     edm::LogWarning("EcalTPG")<<" problem in EcalFenixStripFormatEE: peak_out and filt_out don't have the same size";
00047     std::cout<<" Size peak_out"<< peakout.size()<<", size filt_out:"<<filtout.size()<<std::flush<<std::endl;
00048   }
00049   for  (unsigned int i =0;i<filtout.size();i++){
00050     setInput(filtout[i],peakout[i],fgvbout[i]);
00051     output[i]=process();
00052   }
00053   return;
00054 }

int EcalFenixStripFormatEE::process (  )  [private]

Definition at line 29 of file EcalFenixStripFormatEE.cc.

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

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

00029                                    {
00030   if(inputPeak_==0) return 0;
00031   //  buffer_=input_>>shift_;
00032     
00033   //  int output=buffer_;
00034   int output=input_>>shift_;
00035 //barrel saturates at 12 bits, endcap at 10!
00036   if(output>0X3FF) output=0X3FF; 
00037   output=output|(fgvb_<<10); //FIXME
00038 
00039   return output;    
00040 } 

int EcalFenixStripFormatEE::setInput ( int  input,
int  inputPeak,
int  fgvb 
) [private]

Definition at line 21 of file EcalFenixStripFormatEE.cc.

References fgvb_, input_, and inputPeak_.

Referenced by process().

00021                                                                         {
00022   inputPeak_=inputPeak;
00023   input_=input;
00024   fgvb_=fgvb;
00025   return 0;
00026 }  

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

Definition at line 57 of file EcalFenixStripFormatEE.cc.

References it, and shift_.

Referenced by EcalFenixStrip::process_part2_endcap().

00057                                                                                         {
00058 
00059   const EcalTPGSlidingWindowMap &slwinmap = slWin -> getMap();
00060   EcalTPGSlidingWindowMapIterator it=slwinmap.find(id);
00061   if (it!=slwinmap.end()) shift_=(*it).second;
00062   else edm::LogWarning("EcalTPG")<<" could not find EcalTPGSlidingWindowMap entry for "<<id;
00063 }


Member Data Documentation

int EcalFenixStripFormatEE::fgvb_ [private]

Definition at line 22 of file EcalFenixStripFormatEE.h.

Referenced by process(), and setInput().

int EcalFenixStripFormatEE::input_ [private]

Definition at line 20 of file EcalFenixStripFormatEE.h.

Referenced by process(), and setInput().

int EcalFenixStripFormatEE::inputPeak_ [private]

Definition at line 19 of file EcalFenixStripFormatEE.h.

Referenced by process(), and setInput().

uint32_t EcalFenixStripFormatEE::shift_ [private]

Definition at line 21 of file EcalFenixStripFormatEE.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