CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalFenixStripFormatEB.cc
Go to the documentation of this file.
4 
6  : shift_(0)
7 {
8 }
9 
11  }
12 
13  int EcalFenixStripFormatEB::setInput(int input, int inputPeak)
14  {
15  inputPeak_=inputPeak;
16  input_=input;
17  return 0;
18  }
19 
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  }
30 
31 void EcalFenixStripFormatEB::process(std::vector<int> &peakout, std::vector<int> &filtout, std::vector<int> & output)
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 }
43 
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 }
int i
Definition: DBlmapReader.cc:9
key_type id() const
Definition: EBDataFrame.h:32
int setInput(int input, int inputPeak)
std::map< uint32_t, uint32_t > EcalTPGSlidingWindowMap
tuple input
Definition: collect_tpl.py:10
void setParameters(uint32_t &, const EcalTPGSlidingWindow *&)
std::map< uint32_t, uint32_t >::const_iterator EcalTPGSlidingWindowMapIterator