CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
EcalEBFenixStripFormatEB 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 <EcalEBFenixStripFormatEB.h>

Public Member Functions

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

Private Member Functions

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

Private Attributes

int input_
 
int inputPeak_
 
int inputsFGVB_
 
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 EcalEBFenixStripFormatEB.h.

Constructor & Destructor Documentation

◆ EcalEBFenixStripFormatEB()

EcalEBFenixStripFormatEB::EcalEBFenixStripFormatEB ( )

Definition at line 5 of file EcalEBFenixStripFormatEB.cc.

5 : shift_(0) {}

◆ ~EcalEBFenixStripFormatEB()

EcalEBFenixStripFormatEB::~EcalEBFenixStripFormatEB ( )
virtual

Definition at line 7 of file EcalEBFenixStripFormatEB.cc.

7 {}

Member Function Documentation

◆ process() [1/2]

int EcalEBFenixStripFormatEB::process ( )
private

Definition at line 16 of file EcalEBFenixStripFormatEB.cc.

16  {
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 }

References input_, inputPeak_, inputsFGVB_, convertSQLitetoXML_cfg::output, shift_, and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by process(), and EcalEBTrigPrimTestAlgo::run().

◆ process() [2/2]

void EcalEBFenixStripFormatEB::process ( std::vector< int > &  sFGVBout,
std::vector< int > &  peakout,
std::vector< int > &  filtout,
std::vector< int > &  output 
)
virtual

Definition at line 33 of file EcalEBFenixStripFormatEB.cc.

36  {
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 }

References mps_fire::i, convertSQLitetoXML_cfg::output, process(), and setInput().

◆ setInput()

int EcalEBFenixStripFormatEB::setInput ( int  input,
int  inputPeak,
int  inputsFGVB 
)
private

Definition at line 9 of file EcalEBFenixStripFormatEB.cc.

9  {
10  inputsFGVB_ = inputsFGVB;
11  inputPeak_ = inputPeak;
12  input_ = input;
13  return 0;
14 }

References input, input_, inputPeak_, and inputsFGVB_.

Referenced by process().

◆ setParameters()

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

Definition at line 51 of file EcalEBFenixStripFormatEB.cc.

51  {
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 }

References EcalTPGSlidingWindow::getMap(), triggerObjects_cff::id, and shift_.

Referenced by EcalEBTrigPrimTestAlgo::run().

Member Data Documentation

◆ input_

int EcalEBFenixStripFormatEB::input_
private

Definition at line 22 of file EcalEBFenixStripFormatEB.h.

Referenced by process(), and setInput().

◆ inputPeak_

int EcalEBFenixStripFormatEB::inputPeak_
private

Definition at line 21 of file EcalEBFenixStripFormatEB.h.

Referenced by process(), and setInput().

◆ inputsFGVB_

int EcalEBFenixStripFormatEB::inputsFGVB_
private

Definition at line 20 of file EcalEBFenixStripFormatEB.h.

Referenced by process(), and setInput().

◆ shift_

uint32_t EcalEBFenixStripFormatEB::shift_
private

Definition at line 23 of file EcalEBFenixStripFormatEB.h.

Referenced by process(), and setParameters().

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
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
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::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
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
EcalEBFenixStripFormatEB::shift_
uint32_t shift_
Definition: EcalEBFenixStripFormatEB.h:23
edm::Log
Definition: MessageLogger.h:70
EcalEBFenixStripFormatEB::input_
int input_
Definition: EcalEBFenixStripFormatEB.h:22