CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
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 <EcalFenixStripFormatEB.h>

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 19 of file EcalFenixStripFormatEB.h.

Constructor & Destructor Documentation

EcalFenixStripFormatEB::EcalFenixStripFormatEB ( )

Definition at line 5 of file EcalFenixStripFormatEB.cc.

6  : shift_(0)
7 {
8 }
EcalFenixStripFormatEB::~EcalFenixStripFormatEB ( )
virtual

Definition at line 10 of file EcalFenixStripFormatEB.cc.

10  {
11  }

Member Function Documentation

int EcalFenixStripFormatEB::process ( )
private

Definition at line 20 of file EcalFenixStripFormatEB.cc.

References input_, inputPeak_, convertSQLitetoXML_cfg::output, and shift_.

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

21  {
22  // buffer_=input_>>shift_; //FIXME: buffer why?
23 
24  if(inputPeak_==0) return 0;
25  // int output=buffer_;
26  int output=input_>>shift_;
27  if(output>0XFFF) output=0XFFF; //ok: barrel saturates at 12 bits
28  return output;
29  }
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().

32 {
33  if (peakout.size()!=filtout.size()){
34  edm::LogWarning("EcalTPG")<<" problem in EcalFenixStripFormatEB: peak_out and filt_out don't have the same size";
35  }
36  for (unsigned int i =0;i<filtout.size();i++){
37  setInput(filtout[i],peakout[i]);
38 
39  output[i]=process();
40  }
41  return;
42 }
int i
Definition: DBlmapReader.cc:9
int setInput(int input, int inputPeak)
int EcalFenixStripFormatEB::setInput ( int  input,
int  inputPeak 
)
private

Definition at line 13 of file EcalFenixStripFormatEB.cc.

References collect_tpl::input, input_, and inputPeak_.

Referenced by process().

14  {
15  inputPeak_=inputPeak;
16  input_=input;
17  return 0;
18  }
tuple input
Definition: collect_tpl.py:10
void EcalFenixStripFormatEB::setParameters ( uint32_t &  id,
const EcalTPGSlidingWindow *&  slWin 
)

Definition at line 44 of file EcalFenixStripFormatEB.cc.

References EBDataFrame::id(), and shift_.

Referenced by EcalFenixStrip::process_part2_barrel().

45 {
46 
47  const EcalTPGSlidingWindowMap &slwinmap = slWin -> getMap();
48  EcalTPGSlidingWindowMapIterator it=slwinmap.find(id);
49  if (it!=slwinmap.end()) shift_=(*it).second;
50  else edm::LogWarning("EcalTPG")<<" could not find EcalTPGSlidingWindowMap entry for "<<id;
51 }
std::map< uint32_t, uint32_t > EcalTPGSlidingWindowMap
std::map< uint32_t, uint32_t >::const_iterator EcalTPGSlidingWindowMapIterator

Member Data Documentation

int EcalFenixStripFormatEB::input_
private

Definition at line 23 of file EcalFenixStripFormatEB.h.

Referenced by process(), and setInput().

int EcalFenixStripFormatEB::inputPeak_
private

Definition at line 22 of file EcalFenixStripFormatEB.h.

Referenced by process(), and setInput().

uint32_t EcalFenixStripFormatEB::shift_
private

Definition at line 24 of file EcalFenixStripFormatEB.h.

Referenced by process(), and setParameters().