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

Definition at line 9 of file EcalFenixStripFormatEE.cc.

EcalFenixStripFormatEE::~EcalFenixStripFormatEE ( )
virtual

Definition at line 12 of file EcalFenixStripFormatEE.cc.

12 {}

Member Function Documentation

int EcalFenixStripFormatEE::process ( )
private

Definition at line 24 of file EcalFenixStripFormatEE.cc.

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

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

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

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

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

Definition at line 16 of file EcalFenixStripFormatEE.cc.

References fgvb_, input, input_, and inputPeak_.

Referenced by process().

16  {
17  inputPeak_ = inputPeak;
18  input_ = input;
19  fgvb_ = fgvb;
20  return 0;
21 }
static std::string const input
Definition: EdmProvDump.cc:48
void EcalFenixStripFormatEE::setParameters ( uint32_t  id,
const EcalTPGSlidingWindow *&  slWin,
const EcalTPGStripStatus stripStatus 
)

Definition at line 65 of file EcalFenixStripFormatEE.cc.

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

Referenced by EcalFenixStrip::process_part2_endcap().

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

Member Data Documentation

int EcalFenixStripFormatEE::fgvb_
private

Definition at line 24 of file EcalFenixStripFormatEE.h.

Referenced by process(), and setInput().

int EcalFenixStripFormatEE::input_
private

Definition at line 22 of file EcalFenixStripFormatEE.h.

Referenced by process(), and setInput().

int EcalFenixStripFormatEE::inputPeak_
private

Definition at line 21 of file EcalFenixStripFormatEE.h.

Referenced by process(), and setInput().

uint32_t EcalFenixStripFormatEE::shift_
private

Definition at line 23 of file EcalFenixStripFormatEE.h.

Referenced by process(), and setParameters().

uint16_t EcalFenixStripFormatEE::stripStatus_
private

Definition at line 25 of file EcalFenixStripFormatEE.h.

Referenced by process(), and setParameters().