CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
EcalFenixEtTot Class Reference

class for calculation of Et for Fenix tcp calculates the sum More...

#include <EcalFenixEtTot.h>

Public Member Functions

 EcalFenixEtTot ()
 
virtual std::vector< int > process (const std::vector< EBDataFrame * > &)
 
void process (std::vector< std::vector< int > > &, int nStr, int bitMask, std::vector< int > &out)
 
virtual ~EcalFenixEtTot ()
 

Detailed Description

class for calculation of Et for Fenix tcp calculates the sum

inputs: -5x 12 bits (12 first bits of output of passlin or take 13 bits and select the first 12 ones in the class... for EBDataFrame 5X 10 bits (10 first bits) according to the second parameter) -number of interesting bits according EE or EBDataFrame

output :12 bits (EB) or 10(EE)

in case of overflow, result is set to (2**12)-1 or (2**10)-1

Definition at line 24 of file EcalFenixEtTot.h.

Constructor & Destructor Documentation

EcalFenixEtTot::EcalFenixEtTot ( )

Definition at line 4 of file EcalFenixEtTot.cc.

5 {}
EcalFenixEtTot::~EcalFenixEtTot ( )
virtual

Definition at line 7 of file EcalFenixEtTot.cc.

8 {}

Member Function Documentation

std::vector< int > EcalFenixEtTot::process ( const std::vector< EBDataFrame * > &  calodatafr)
virtual
void EcalFenixEtTot::process ( std::vector< std::vector< int > > &  bypasslinout,
int  nStr,
int  bitMask,
std::vector< int > &  out 
)

Definition at line 16 of file EcalFenixEtTot.cc.

References i.

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

17 {
18 
19  for (unsigned int i=0;i<output.size();i++){
20  output[i]= 0;
21  }
22 
23  int mask = (1<<bitMask)-1;
24  for(int istrip=0;istrip<nStr;istrip++){
25  for (unsigned int i=0;i<bypasslinout[istrip].size();i++) {
26  output[i]+= (bypasslinout[istrip][i] & mask) ; //fix bug inn case of EE: MSB are set for FG, so need to apply mask in summation.
27  if (output[i]>mask) output[i]= mask;
28  }
29  }
30  return;
31 }
int i
Definition: DBlmapReader.cc:9