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.

◆ ~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.

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

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

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 }

◆ 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.

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

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 }
int setInput(int input, int inputPeak, int inputsFGVB)
Log< level::Warning, false > LogWarning

◆ setInput()

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

Definition at line 9 of file EcalEBFenixStripFormatEB.cc.

References input, input_, inputPeak_, and inputsFGVB_.

Referenced by process().

9  {
10  inputsFGVB_ = inputsFGVB;
11  inputPeak_ = inputPeak;
12  input_ = input;
13  return 0;
14 }
static std::string const input
Definition: EdmProvDump.cc:47

◆ setParameters()

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

Definition at line 51 of file EcalEBFenixStripFormatEB.cc.

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

Referenced by EcalEBTrigPrimTestAlgo::run().

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 }
const std::map< uint32_t, uint32_t > & getMap() const
std::map< uint32_t, uint32_t > EcalTPGSlidingWindowMap
std::map< uint32_t, uint32_t >::const_iterator EcalTPGSlidingWindowMapIterator

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().