CMS 3D CMS Logo

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 ()
 
 EcalFenixStripFormatEB ()
 
virtual void process (std::vector< int > &, std::vector< int > &, std::vector< int > &, std::vector< int > &)
 
virtual void process (std::vector< int > &, std::vector< int > &, std::vector< int > &, std::vector< int > &)
 
void setParameters (uint32_t &, const EcalTPGSlidingWindow *&)
 
void setParameters (uint32_t &, const EcalTPGSlidingWindow *&)
 
virtual ~EcalFenixStripFormatEB ()
 
virtual ~EcalFenixStripFormatEB ()
 

Private Member Functions

int process ()
 
int process ()
 
int setInput (int input, int inputPeak, int inputsFGVB)
 
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 EcalFenixStripFormatEB.h.

Constructor & Destructor Documentation

◆ EcalFenixStripFormatEB() [1/2]

EcalFenixStripFormatEB::EcalFenixStripFormatEB ( )

Definition at line 5 of file EcalFenixStripFormatEB.cc.

5 : shift_(0) {}

◆ ~EcalFenixStripFormatEB() [1/2]

EcalFenixStripFormatEB::~EcalFenixStripFormatEB ( )
virtual

Definition at line 7 of file EcalFenixStripFormatEB.cc.

7 {}

◆ EcalFenixStripFormatEB() [2/2]

EcalFenixStripFormatEB::EcalFenixStripFormatEB ( )

◆ ~EcalFenixStripFormatEB() [2/2]

virtual EcalFenixStripFormatEB::~EcalFenixStripFormatEB ( )
virtual

Member Function Documentation

◆ process() [1/4]

int EcalFenixStripFormatEB::process ( )
private

Definition at line 16 of file EcalFenixStripFormatEB.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 << " EcalFenixStripFormatEB::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 << " EcalFenixStripFormatEB::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(), EcalFenixStrip::process_part2_barrel(), and EcalEBTrigPrimTestAlgo::run().

◆ process() [2/4]

int EcalFenixStripFormatEB::process ( )
private

◆ process() [3/4]

virtual void EcalFenixStripFormatEB::process ( std::vector< int > &  ,
std::vector< int > &  ,
std::vector< int > &  ,
std::vector< int > &   
)
virtual

◆ process() [4/4]

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

Definition at line 33 of file EcalFenixStripFormatEB.cc.

36  {
37  if (peakout.size() != filtout.size() || sFGVBout.size() != filtout.size()) {
38  edm::LogWarning("EcalTPG")
39  << " problem in EcalFenixStripFormatEB: sfgvb_out, peak_out and filt_out don't have the same size";
40  }
41  //std::cout << " EcalFenixStripFormatEB::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() [1/2]

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

◆ setInput() [2/2]

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

Definition at line 9 of file EcalFenixStripFormatEB.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() [1/2]

void EcalFenixStripFormatEB::setParameters ( uint32_t &  ,
const EcalTPGSlidingWindow *&   
)

◆ setParameters() [2/2]

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

Definition at line 51 of file EcalFenixStripFormatEB.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 EcalFenixStrip::process_part2_barrel(), and EcalEBTrigPrimTestAlgo::run().

Member Data Documentation

◆ input_

int EcalFenixStripFormatEB::input_
private

Definition at line 22 of file EcalFenixStripFormatEB.h.

Referenced by process(), and setInput().

◆ inputPeak_

int EcalFenixStripFormatEB::inputPeak_
private

Definition at line 21 of file EcalFenixStripFormatEB.h.

Referenced by process(), and setInput().

◆ inputsFGVB_

int EcalFenixStripFormatEB::inputsFGVB_
private

Definition at line 20 of file EcalFenixStripFormatEB.h.

Referenced by process(), and setInput().

◆ shift_

uint32_t EcalFenixStripFormatEB::shift_
private

Definition at line 23 of file EcalFenixStripFormatEB.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
EcalFenixStripFormatEB::shift_
uint32_t shift_
Definition: EcalFenixStripFormatEB.h:23
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
EcalFenixStripFormatEB::setInput
int setInput(int input, int inputPeak, int inputsFGVB)
Definition: EcalFenixStripFormatEB.cc:9
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
EcalFenixStripFormatEB::inputsFGVB_
int inputsFGVB_
Definition: EcalFenixStripFormatEB.h:20
EcalTPGSlidingWindowMapIterator
std::map< uint32_t, uint32_t >::const_iterator EcalTPGSlidingWindowMapIterator
Definition: EcalTPGSlidingWindow.h:24
EcalTPGSlidingWindowMap
std::map< uint32_t, uint32_t > EcalTPGSlidingWindowMap
Definition: EcalTPGSlidingWindow.h:23
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
EcalFenixStripFormatEB::process
int process()
Definition: EcalFenixStripFormatEB.cc:16
EcalFenixStripFormatEB::input_
int input_
Definition: EcalFenixStripFormatEB.h:22
edm::Log
Definition: MessageLogger.h:70
EcalFenixStripFormatEB::inputPeak_
int inputPeak_
Definition: EcalFenixStripFormatEB.h:21