CMS 3D CMS Logo

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

Public Member Functions

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

Private Member Functions

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

Private Attributes

int fgvb_
 
int input_
 
int inputPeak_
 
uint32_t shift_
 
uint16_t stripStatus_
 

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 19 of file EcalFenixStripFormatEE.h.

Constructor & Destructor Documentation

◆ EcalFenixStripFormatEE()

EcalFenixStripFormatEE::EcalFenixStripFormatEE ( )

Definition at line 9 of file EcalFenixStripFormatEE.cc.

9 : shift_(0) {}

◆ ~EcalFenixStripFormatEE()

EcalFenixStripFormatEE::~EcalFenixStripFormatEE ( )
virtual

Definition at line 12 of file EcalFenixStripFormatEE.cc.

12 {}

Member Function Documentation

◆ process() [1/2]

int EcalFenixStripFormatEE::process ( )
private

Definition at line 24 of file EcalFenixStripFormatEE.cc.

24  {
25  // Bad strip - zero everything
26  if (stripStatus_ != 0)
27  return 0;
28 
29  // Peak not found - only return fgvb
30  if (inputPeak_ == 0)
31  return ((fgvb_ & 0x1) << 12);
32 
33  int output = input_ >> shift_;
34 
35  // barrel saturates at 12 bits, endcap at 10!
36  // Pascal: finally no,endcap has 12 bits as in EB (bug in FENIX!!!!)
37  if (output > 0XFFF)
38  output = 0XFFF;
39  output = output | ((fgvb_ & 0x1) << 12); // Pascal (was 10)
40 
41  return output;
42 }

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

Referenced by process(), and EcalFenixStrip::process_part2_endcap().

◆ process() [2/2]

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

Definition at line 45 of file EcalFenixStripFormatEE.cc.

48  {
49  if (peakout.size() != filtout.size()) {
50  edm::LogWarning("EcalTPG") << " problem in EcalFenixStripFormatEE: peak_out and filt_out don't "
51  "have the same size";
52  std::cout << " Size peak_out" << peakout.size() << ", size filt_out:" << filtout.size() << std::flush << std::endl;
53  }
54  for (unsigned int i = 0; i < filtout.size(); i++) {
55  setInput(filtout[i], peakout[i], fgvbout[i]);
56  output[i] = process();
57  }
58  return;
59 }

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

◆ setInput()

int EcalFenixStripFormatEE::setInput ( int  input,
int  inputPeak,
int  fgvb 
)
private

Definition at line 16 of file EcalFenixStripFormatEE.cc.

16  {
17  inputPeak_ = inputPeak;
18  input_ = input;
19  fgvb_ = fgvb;
20  return 0;
21 }

References fgvb_, input, input_, and inputPeak_.

Referenced by process().

◆ setParameters()

void EcalFenixStripFormatEE::setParameters ( uint32_t  id,
const EcalTPGSlidingWindow *&  slWin,
const EcalTPGStripStatus stripStatus 
)

Definition at line 62 of file EcalFenixStripFormatEE.cc.

64  {
65  const EcalTPGSlidingWindowMap &slwinmap = slWin->getMap();
66  EcalTPGSlidingWindowMapIterator it = slwinmap.find(id);
67  if (it != slwinmap.end())
68  shift_ = (*it).second;
69  else
70  edm::LogWarning("EcalTPG") << " could not find EcalTPGSlidingWindowMap entry for " << id;
71 
72  const EcalTPGStripStatusMap &statusMap = stripStatus->getMap();
73  EcalTPGStripStatusMapIterator sit = statusMap.find(id);
74  if (sit != statusMap.end()) {
75  stripStatus_ = (*sit).second;
76  } else {
77  stripStatus_ = 0; // Assume strip OK
78  }
79 }

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

Referenced by EcalFenixStrip::process_part2_endcap().

Member Data Documentation

◆ fgvb_

int EcalFenixStripFormatEE::fgvb_
private

Definition at line 24 of file EcalFenixStripFormatEE.h.

Referenced by process(), and setInput().

◆ input_

int EcalFenixStripFormatEE::input_
private

Definition at line 22 of file EcalFenixStripFormatEE.h.

Referenced by process(), and setInput().

◆ inputPeak_

int EcalFenixStripFormatEE::inputPeak_
private

Definition at line 21 of file EcalFenixStripFormatEE.h.

Referenced by process(), and setInput().

◆ shift_

uint32_t EcalFenixStripFormatEE::shift_
private

Definition at line 23 of file EcalFenixStripFormatEE.h.

Referenced by process(), and setParameters().

◆ stripStatus_

uint16_t EcalFenixStripFormatEE::stripStatus_
private

Definition at line 25 of file EcalFenixStripFormatEE.h.

Referenced by process(), and setParameters().

EcalTPGStripStatusMap
std::map< uint32_t, uint16_t > EcalTPGStripStatusMap
Definition: EcalTPGStripStatus.h:24
EcalFenixStripFormatEE::setInput
int setInput(int input, int inputPeak, int fgvb)
Definition: EcalFenixStripFormatEE.cc:16
mps_fire.i
i
Definition: mps_fire.py:355
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:32
gather_cfg.cout
cout
Definition: gather_cfg.py:144
EcalFenixStripFormatEE::process
int process()
Definition: EcalFenixStripFormatEE.cc:24
EcalFenixStripFormatEE::inputPeak_
int inputPeak_
Definition: EcalFenixStripFormatEE.h:21
EcalFenixStripFormatEE::fgvb_
int fgvb_
Definition: EcalFenixStripFormatEE.h:24
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
EcalTPGStripStatus::getMap
const std::map< uint32_t, uint16_t > & getMap() const
Definition: EcalTPGStripStatus.h:15
EcalTPGSlidingWindowMapIterator
std::map< uint32_t, uint32_t >::const_iterator EcalTPGSlidingWindowMapIterator
Definition: EcalTPGSlidingWindow.h:24
edm::LogWarning
Definition: MessageLogger.h:141
EcalTPGSlidingWindowMap
std::map< uint32_t, uint32_t > EcalTPGSlidingWindowMap
Definition: EcalTPGSlidingWindow.h:23
EcalFenixStripFormatEE::input_
int input_
Definition: EcalFenixStripFormatEE.h:22
EcalTPGStripStatusMapIterator
std::map< uint32_t, uint16_t >::const_iterator EcalTPGStripStatusMapIterator
Definition: EcalTPGStripStatus.h:25
EcalFenixStripFormatEE::stripStatus_
uint16_t stripStatus_
Definition: EcalFenixStripFormatEE.h:25
EcalFenixStripFormatEE::shift_
uint32_t shift_
Definition: EcalFenixStripFormatEE.h:23
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31