CMS 3D CMS Logo

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>

List of all members.

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.

  : shift_(0)
{
}
EcalFenixStripFormatEE::~EcalFenixStripFormatEE ( ) [virtual]

Definition at line 16 of file EcalFenixStripFormatEE.cc.

                                                {
}

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 process(), and EcalFenixStrip::process_part2_endcap().

                                   {
  // Bad strip - zero everything
  if(stripStatus_ != 0) return 0;

  // Peak not found - only return fgvb
  if(inputPeak_==0) return ((fgvb_ & 0x1) << 12);
    
  int output=input_>>shift_;

  //barrel saturates at 12 bits, endcap at 10!
  // Pascal: finally no,endcap has 12 bits as in EB (bug in FENIX!!!!)
  if(output>0XFFF) output=0XFFF; 
  output=output|((fgvb_ & 0x1) << 12); //Pascal (was 10)

  return output;    
} 
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().

                                                                                     {
  if  (peakout.size()!=filtout.size()){
    edm::LogWarning("EcalTPG")<<" problem in EcalFenixStripFormatEE: peak_out and filt_out don't have the same size";
    std::cout<<" Size peak_out"<< peakout.size()<<", size filt_out:"<<filtout.size()<<std::flush<<std::endl;
  }
  for  (unsigned int i =0;i<filtout.size();i++){
    setInput(filtout[i],peakout[i],fgvbout[i]);
    output[i]=process();
  }
  return;
}
int EcalFenixStripFormatEE::setInput ( int  input,
int  inputPeak,
int  fgvb 
) [private]

Definition at line 22 of file EcalFenixStripFormatEE.cc.

References fgvb_, collect_tpl::input, input_, and inputPeak_.

Referenced by process().

                                                                        {
  inputPeak_=inputPeak;
  input_=input;
  fgvb_=fgvb;
  return 0;
}  
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().

                                                                                                                              {

  const EcalTPGSlidingWindowMap &slwinmap = slWin -> getMap();
  EcalTPGSlidingWindowMapIterator it=slwinmap.find(id);
  if (it!=slwinmap.end()) shift_=(*it).second;
  else edm::LogWarning("EcalTPG")<<" could not find EcalTPGSlidingWindowMap entry for "<<id;

  const EcalTPGStripStatusMap &statusMap = stripStatus->getMap();
  EcalTPGStripStatusMapIterator sit = statusMap.find(id);
  if(sit != statusMap.end())
  {
    stripStatus_ = (*sit).second;
  }
  else
  {
    stripStatus_ = 0; // Assume strip OK
  }
}

Member Data Documentation

Definition at line 24 of file EcalFenixStripFormatEE.h.

Referenced by process(), and setInput().

Definition at line 22 of file EcalFenixStripFormatEE.h.

Referenced by process(), and setInput().

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

Definition at line 25 of file EcalFenixStripFormatEE.h.

Referenced by process(), and setParameters().