CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 10 of file EcalFenixStripFormatEE.cc.

11  : shift_(0)
12 {
13 }
EcalFenixStripFormatEE::~EcalFenixStripFormatEE ( )
virtual

Definition at line 16 of file EcalFenixStripFormatEE.cc.

16  {
17 }

Member Function Documentation

int EcalFenixStripFormatEE::process ( )
private

Definition at line 30 of file EcalFenixStripFormatEE.cc.

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

Referenced by ConfigBuilder.ConfigBuilder::addExtraStream(), ConfigBuilder.ConfigBuilder::completeInputCommand(), ConfigBuilder.ConfigBuilder::doNotInlineEventContent(), ConfigBuilder.ConfigBuilder.PrintAllModules::leave(), ConfigBuilder.ConfigBuilder::prepare_HLT(), ConfigBuilder.ConfigBuilder::prepare_LHE(), ConfigBuilder.ConfigBuilder::prepare_PATFILTER(), ConfigBuilder.ConfigBuilder::prepare_VALIDATION(), process(), EcalFenixStrip::process_part2_endcap(), ConfigBuilder.ConfigBuilder::renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder::renameInputTagsInSequence(), and ConfigBuilder.ConfigBuilder::scheduleSequence().

30  {
31  // Bad strip - zero everything
32  if(stripStatus_ != 0) return 0;
33 
34  // Peak not found - only return fgvb
35  if(inputPeak_==0) return ((fgvb_ & 0x1) << 12);
36 
37  int output=input_>>shift_;
38 
39  //barrel saturates at 12 bits, endcap at 10!
40  // Pascal: finally no,endcap has 12 bits as in EB (bug in FENIX!!!!)
41  if(output>0XFFF) output=0XFFF;
42  output=output|((fgvb_ & 0x1) << 12); //Pascal (was 10)
43 
44  return output;
45 }
void EcalFenixStripFormatEE::process ( std::vector< int > &  fgvbout,
std::vector< int > &  peakout,
std::vector< int > &  filtout,
std::vector< int > &  output 
)
virtual

Definition at line 48 of file EcalFenixStripFormatEE.cc.

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

Referenced by ConfigBuilder.ConfigBuilder::addExtraStream(), ConfigBuilder.ConfigBuilder::completeInputCommand(), ConfigBuilder.ConfigBuilder::doNotInlineEventContent(), ConfigBuilder.ConfigBuilder.PrintAllModules::leave(), ConfigBuilder.ConfigBuilder::prepare_HLT(), ConfigBuilder.ConfigBuilder::prepare_LHE(), ConfigBuilder.ConfigBuilder::prepare_PATFILTER(), ConfigBuilder.ConfigBuilder::prepare_VALIDATION(), ConfigBuilder.ConfigBuilder::renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder::renameInputTagsInSequence(), and ConfigBuilder.ConfigBuilder::scheduleSequence().

49  {
50  if (peakout.size()!=filtout.size()){
51  edm::LogWarning("EcalTPG")<<" problem in EcalFenixStripFormatEE: peak_out and filt_out don't 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 }
int i
Definition: DBlmapReader.cc:9
int setInput(int input, int inputPeak, int fgvb)
tuple cout
Definition: gather_cfg.py:145
int EcalFenixStripFormatEE::setInput ( int  input,
int  inputPeak,
int  fgvb 
)
private

Definition at line 22 of file EcalFenixStripFormatEE.cc.

References fgvb_, input, input_, and inputPeak_.

Referenced by process().

22  {
23  inputPeak_=inputPeak;
24  input_=input;
25  fgvb_=fgvb;
26  return 0;
27 }
static std::string const input
Definition: EdmProvDump.cc:44
void EcalFenixStripFormatEE::setParameters ( uint32_t  id,
const EcalTPGSlidingWindow *&  slWin,
const EcalTPGStripStatus stripStatus 
)

Definition at line 62 of file EcalFenixStripFormatEE.cc.

References EcalTPGStripStatus::getMap(), EBDataFrame::id(), shift_, crabStatusFromReport::statusMap, and stripStatus_.

Referenced by EcalFenixStrip::process_part2_endcap().

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