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

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

Constructor & Destructor Documentation

EcalFenixStripFormatEB::EcalFenixStripFormatEB ( )

Definition at line 5 of file EcalFenixStripFormatEB.cc.

6  : shift_(0)
7 {
8 }
EcalFenixStripFormatEB::~EcalFenixStripFormatEB ( )
virtual

Definition at line 10 of file EcalFenixStripFormatEB.cc.

10  {
11  }

Member Function Documentation

int EcalFenixStripFormatEB::process ( )
private

Definition at line 21 of file EcalFenixStripFormatEB.cc.

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

Referenced by ConfigBuilder.ConfigBuilder::__init__(), ConfigBuilder.ConfigBuilder::addExtraStream(), ConfigBuilder.ConfigBuilder::anyOf(), ConfigBuilder.ConfigBuilder::completeInputCommand(), ConfigBuilder.ConfigBuilder::doNotInlineEventContent(), ConfigBuilder.ConfigBuilder.PrintAllModules::leave(), ConfigBuilder.ConfigBuilder::prepare(), ConfigBuilder.ConfigBuilder::prepare_ALCA(), ConfigBuilder.ConfigBuilder::prepare_DQM(), ConfigBuilder.ConfigBuilder::prepare_FASTSIM(), ConfigBuilder.ConfigBuilder::prepare_HARVESTING(), ConfigBuilder.ConfigBuilder::prepare_HLT(), ConfigBuilder.ConfigBuilder::prepare_LHE(), ConfigBuilder.ConfigBuilder::prepare_VALIDATION(), process(), EcalFenixStrip::process_part2_barrel(), ConfigBuilder.ConfigBuilder::renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder::renameInputTagsInSequence(), and ConfigBuilder.ConfigBuilder::scheduleSequence().

22  {
23  // buffer_=input_>>shift_; //FIXME: buffer why?
24 
25  if(inputPeak_==0) return ((inputsFGVB_&0x1)<<12);
26  // int output=buffer_;
27  int output=input_>>shift_;
28  if(output>0XFFF) output=0XFFF; //ok: barrel saturates at 12 bits
29  // Add stripFGVB
30  output |= ((inputsFGVB_&0x1)<<12);
31 
32  return output;
33  }
void EcalFenixStripFormatEB::process ( std::vector< int > &  sFGVBout,
std::vector< int > &  peakout,
std::vector< int > &  filtout,
std::vector< int > &  output 
)
virtual

Definition at line 35 of file EcalFenixStripFormatEB.cc.

References i, process(), and setInput().

Referenced by ConfigBuilder.ConfigBuilder::__init__(), ConfigBuilder.ConfigBuilder::addExtraStream(), ConfigBuilder.ConfigBuilder::anyOf(), ConfigBuilder.ConfigBuilder::completeInputCommand(), ConfigBuilder.ConfigBuilder::doNotInlineEventContent(), ConfigBuilder.ConfigBuilder.PrintAllModules::leave(), ConfigBuilder.ConfigBuilder::prepare(), ConfigBuilder.ConfigBuilder::prepare_ALCA(), ConfigBuilder.ConfigBuilder::prepare_DQM(), ConfigBuilder.ConfigBuilder::prepare_FASTSIM(), ConfigBuilder.ConfigBuilder::prepare_HARVESTING(), ConfigBuilder.ConfigBuilder::prepare_HLT(), ConfigBuilder.ConfigBuilder::prepare_LHE(), ConfigBuilder.ConfigBuilder::prepare_VALIDATION(), ConfigBuilder.ConfigBuilder::renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder::renameInputTagsInSequence(), and ConfigBuilder.ConfigBuilder::scheduleSequence().

36 {
37  if (peakout.size()!=filtout.size() || sFGVBout.size()!=filtout.size()){
38  edm::LogWarning("EcalTPG")<<" problem in EcalFenixStripFormatEB: sfgvb_out, peak_out and filt_out don't have the same size";
39  }
40  for (unsigned int i =0;i<filtout.size();i++){
41  setInput(filtout[i],peakout[i], sFGVBout[i]);
42 
43  output[i]=process();
44  }
45  return;
46 }
int i
Definition: DBlmapReader.cc:9
int setInput(int input, int inputPeak, int inputsFGVB)
int EcalFenixStripFormatEB::setInput ( int  input,
int  inputPeak,
int  inputsFGVB 
)
private

Definition at line 13 of file EcalFenixStripFormatEB.cc.

References input, input_, inputPeak_, and inputsFGVB_.

Referenced by process().

14  {
15  inputsFGVB_ = inputsFGVB;
16  inputPeak_=inputPeak;
17  input_=input;
18  return 0;
19  }
static std::string const input
Definition: EdmProvDump.cc:44
void EcalFenixStripFormatEB::setParameters ( uint32_t &  id,
const EcalTPGSlidingWindow *&  slWin 
)

Definition at line 48 of file EcalFenixStripFormatEB.cc.

References EBDataFrame::id(), and shift_.

Referenced by EcalFenixStrip::process_part2_barrel().

49 {
50 
51  const EcalTPGSlidingWindowMap &slwinmap = slWin -> getMap();
52  EcalTPGSlidingWindowMapIterator it=slwinmap.find(id);
53  if (it!=slwinmap.end()) shift_=(*it).second;
54  else edm::LogWarning("EcalTPG")<<" could not find EcalTPGSlidingWindowMap entry for "<<id;
55 }
std::map< uint32_t, uint32_t > EcalTPGSlidingWindowMap
std::map< uint32_t, uint32_t >::const_iterator EcalTPGSlidingWindowMapIterator

Member Data Documentation

int EcalFenixStripFormatEB::input_
private

Definition at line 24 of file EcalFenixStripFormatEB.h.

Referenced by process(), and setInput().

int EcalFenixStripFormatEB::inputPeak_
private

Definition at line 23 of file EcalFenixStripFormatEB.h.

Referenced by process(), and setInput().

int EcalFenixStripFormatEB::inputsFGVB_
private

Definition at line 22 of file EcalFenixStripFormatEB.h.

Referenced by process(), and setInput().

uint32_t EcalFenixStripFormatEB::shift_
private

Definition at line 25 of file EcalFenixStripFormatEB.h.

Referenced by process(), and setParameters().