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 Attributes
EcalFenixMaxof2 Class Reference

#include <EcalFenixMaxof2.h>

Public Member Functions

 EcalFenixMaxof2 (int maxNrSamples, int nbMaxStrips)
 
void process (std::vector< std::vector< int > > &, int nStr, int bitMask, std::vector< int > &out)
 
virtual ~EcalFenixMaxof2 ()
 

Private Attributes

int nbMaxStrips_
 
std::vector< std::vector< int > > sumby2_
 

Detailed Description

finds max sum of two adjacent samples

input: 5x 12 bits (les 12 premiers bits sortant du bypasslin) output: 12 bits

computes 4 sums of 2 strips and gives the max max limited by 0xfff

Definition at line 18 of file EcalFenixMaxof2.h.

Constructor & Destructor Documentation

EcalFenixMaxof2::EcalFenixMaxof2 ( int  maxNrSamples,
int  nbMaxStrips 
)

Definition at line 6 of file EcalFenixMaxof2.cc.

References nbMaxStrips_, and sumby2_.

6  : nbMaxStrips_(nbMaxStrips)
7 {
8  std::vector<int> vec(maxNrSamples,0);
9  for (int i2strip =0;i2strip<nbMaxStrips_-1;++i2strip)
10  sumby2_.push_back(vec);
11 }
std::vector< std::vector< int > > sumby2_
EcalFenixMaxof2::~EcalFenixMaxof2 ( )
virtual

Definition at line 13 of file EcalFenixMaxof2.cc.

13  {
14 }

Member Function Documentation

void EcalFenixMaxof2::process ( std::vector< std::vector< int > > &  bypasslinout,
int  nStr,
int  bitMask,
std::vector< int > &  out 
)

Definition at line 16 of file EcalFenixMaxof2.cc.

References i, and sumby2_.

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

17 {
18  int mask = (1<<bitMask)-1;
19  for (int i2strip =0;i2strip<nstrip-1;++i2strip)
20  for (unsigned int i=0;i<output.size();i++) sumby2_[i2strip][i]=0;
21  for (unsigned int i=0;i<output.size();i++) output[i] = 0;
22 
23  for (unsigned int i=0;i<output.size();i++){
24  if (nstrip-1==0){
25  output[i]=((bypasslinout[0][i])&mask);
26  }else {
27  for ( int i2strip=0; i2strip< nstrip-1;++i2strip){
28  sumby2_[i2strip][i]= ((bypasslinout[i2strip][i])&mask)+((bypasslinout[i2strip+1][i])&mask);
29  if (sumby2_[i2strip][i]>output[i]){
30  output[i]=sumby2_[i2strip][i];
31  }
32  }
33  }
34  }
35  return;
36 }
int i
Definition: DBlmapReader.cc:9
std::vector< std::vector< int > > sumby2_

Member Data Documentation

int EcalFenixMaxof2::nbMaxStrips_
private

Definition at line 26 of file EcalFenixMaxof2.h.

Referenced by EcalFenixMaxof2().

std::vector<std::vector<int> > EcalFenixMaxof2::sumby2_
private

Definition at line 27 of file EcalFenixMaxof2.h.

Referenced by EcalFenixMaxof2(), and process().