CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
EcalEBFenixStripFormatEB.cc
Go to the documentation of this file.
4 
6 
8 
9 int EcalEBFenixStripFormatEB::setInput(int input, int inputPeak, int inputsFGVB) {
10  inputsFGVB_ = inputsFGVB;
11  inputPeak_ = inputPeak;
12  input_ = input;
13  return 0;
14 }
15 
17  // buffer_=input_>>shift_; //FIXME: buffer why?
18 
19  if (inputPeak_ == 0)
20  return ((inputsFGVB_ & 0x1) << 12);
21  // int output=buffer_;
22  int output = input_ >> shift_;
23  //std::cout << " EcalEBFenixStripFormatEB::process() input_ " << input_ << " output after shift " << output << std::endl;
24  if (output > 0XFFF)
25  output = 0XFFF; //ok: barrel saturates at 12 bits
26  // Add stripFGVB
27  output |= ((inputsFGVB_ & 0x1) << 12);
28 
29  //std::cout << " EcalEBFenixStripFormatEB::process() output after adding FGVB " << output << std::endl;
30  return output;
31 }
32 
33 void EcalEBFenixStripFormatEB::process(std::vector<int> &sFGVBout,
34  std::vector<int> &peakout,
35  std::vector<int> &filtout,
36  std::vector<int> &output) {
37  if (peakout.size() != filtout.size() || sFGVBout.size() != filtout.size()) {
38  edm::LogWarning("EcalTPG")
39  << " problem in EcalEBFenixStripFormatEB: sfgvb_out, peak_out and filt_out don't have the same size";
40  }
41  //std::cout << " EcalEBFenixStripFormatEB::process(std::vector ... filtout size " << filtout.size() << std::endl;
42  for (unsigned int i = 0; i < filtout.size(); i++) {
43  //std::cout << " Looping over filtout " << filtout[i] << " " << peakout[i] << std::endl;
44  setInput(filtout[i], peakout[i], sFGVBout[i]);
45 
46  output[i] = process();
47  }
48  return;
49 }
50 
52  const EcalTPGSlidingWindowMap &slwinmap = slWin->getMap();
53  EcalTPGSlidingWindowMapIterator it = slwinmap.find(id);
54  if (it != slwinmap.end())
55  shift_ = (*it).second;
56  else
57  edm::LogWarning("EcalTPG") << " could not find EcalTPGSlidingWindowMap entry for " << id;
58 }
mps_fire.i
i
Definition: mps_fire.py:428
EcalTPGSlidingWindow::getMap
const std::map< uint32_t, uint32_t > & getMap() const
Definition: EcalTPGSlidingWindow.h:14
input
static const std::string input
Definition: EdmProvDump.cc:48
MessageLogger.h
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
EcalEBFenixStripFormatEB.h
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
EcalTPGSlidingWindow
Definition: EcalTPGSlidingWindow.h:9
EcalTPGSlidingWindowMapIterator
std::map< uint32_t, uint32_t >::const_iterator EcalTPGSlidingWindowMapIterator
Definition: EcalTPGSlidingWindow.h:24
EcalEBFenixStripFormatEB::inputPeak_
int inputPeak_
Definition: EcalEBFenixStripFormatEB.h:21
EcalTPGSlidingWindowMap
std::map< uint32_t, uint32_t > EcalTPGSlidingWindowMap
Definition: EcalTPGSlidingWindow.h:23
EcalEBFenixStripFormatEB::setParameters
void setParameters(uint32_t &, const EcalTPGSlidingWindow *&)
Definition: EcalEBFenixStripFormatEB.cc:51
EcalEBFenixStripFormatEB::inputsFGVB_
int inputsFGVB_
Definition: EcalEBFenixStripFormatEB.h:20
EcalEBFenixStripFormatEB::setInput
int setInput(int input, int inputPeak, int inputsFGVB)
Definition: EcalEBFenixStripFormatEB.cc:9
EcalEBFenixStripFormatEB::process
int process()
Definition: EcalEBFenixStripFormatEB.cc:16
EcalTPGSlidingWindow.h
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
EcalEBFenixStripFormatEB::~EcalEBFenixStripFormatEB
virtual ~EcalEBFenixStripFormatEB()
Definition: EcalEBFenixStripFormatEB.cc:7
EcalEBFenixStripFormatEB::shift_
uint32_t shift_
Definition: EcalEBFenixStripFormatEB.h:23
EcalEBFenixStripFormatEB::EcalEBFenixStripFormatEB
EcalEBFenixStripFormatEB()
Definition: EcalEBFenixStripFormatEB.cc:5
edm::Log
Definition: MessageLogger.h:70
EcalEBFenixStripFormatEB::input_
int input_
Definition: EcalEBFenixStripFormatEB.h:22