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
EcalFenixTcpFgvbEE Class Reference

calculation of Fgvb for Fenix Tcp, format endcap calculates fgvb for the endcap More...

#include <EcalFenixTcpFgvbEE.h>

Public Member Functions

 EcalFenixTcpFgvbEE (int maxNrSamples)
 
void process (std::vector< std::vector< int > > &bypasslin_out, int nStr, int bitMask, std::vector< int > &output)
 
void setParameters (uint32_t towid, const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE)
 
virtual ~EcalFenixTcpFgvbEE ()
 

Private Attributes

uint32_t fgee_lut_
 
std::vector< int > indexLut_
 

Detailed Description

calculation of Fgvb for Fenix Tcp, format endcap calculates fgvb for the endcap

input : 5x 11th bit of Bypasslin ouput output: 1 bit

the five bit_strips + 3 bits (nb of strips) (are used to make a LUT_tower address (max size :2**8=256) the output is 1 value.

Definition at line 23 of file EcalFenixTcpFgvbEE.h.

Constructor & Destructor Documentation

EcalFenixTcpFgvbEE::EcalFenixTcpFgvbEE ( int  maxNrSamples)

Definition at line 7 of file EcalFenixTcpFgvbEE.cc.

References indexLut_.

8 {
9  indexLut_.resize(maxNrSamples);
10 }//---------------------------------------------------------------
std::vector< int > indexLut_
EcalFenixTcpFgvbEE::~EcalFenixTcpFgvbEE ( )
virtual

Definition at line 11 of file EcalFenixTcpFgvbEE.cc.

12 {
13 }

Member Function Documentation

void EcalFenixTcpFgvbEE::process ( std::vector< std::vector< int > > &  bypasslin_out,
int  nStr,
int  bitMask,
std::vector< int > &  output 
)

Definition at line 15 of file EcalFenixTcpFgvbEE.cc.

References fgee_lut_, i, and indexLut_.

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(), EcalFenixTcp::process_part2_endcap(), ConfigBuilder.ConfigBuilder::renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder::renameInputTagsInSequence(), and ConfigBuilder.ConfigBuilder::scheduleSequence().

16 {
17  // std::vector<int> indexLut(output.size());
18 
19  for (unsigned int i=0;i<output.size();i++) {
20  output[i]=0;
21  indexLut_[i]=0;
22  }
23 
24  for (unsigned int i=0;i<output.size();i++) {
25  for (int istrip=0;istrip<nStr;istrip++) {
26  int res = (bypasslin_out[istrip])[i];
27  res = (res >>bitMask) & 1; //res is FGVB at this stage
28  indexLut_[i]= indexLut_[i] | (res << istrip);
29  }
30  indexLut_[i]= indexLut_[i] | (nStr << 5);
31 
32  int mask = 1<<indexLut_[i];
33  output[i]= fgee_lut_ & mask;
34  if (output[i]>0) output[i]=1;
35  }
36  return;
37 }
int i
Definition: DBlmapReader.cc:9
std::vector< int > indexLut_
void EcalFenixTcpFgvbEE::setParameters ( uint32_t  towid,
const EcalTPGFineGrainTowerEE ecaltpgFineGrainTowerEE 
)

Definition at line 41 of file EcalFenixTcpFgvbEE.cc.

References fgee_lut_.

Referenced by EcalFenixTcp::process_part2_endcap().

42 {
43 
44  const EcalTPGFineGrainTowerEEMap &fgee_map = ecaltpgFineGrainTowerEE -> getMap();
45 
46  EcalTPGFineGrainTowerEEMapIterator it=fgee_map.find(towid);
47  if (it!=fgee_map.end()) fgee_lut_=(*it).second;
48  else edm::LogWarning("EcalTPG")<<" could not find EcalTPGFineGrainTowerEEMap for "<<towid;
49 }
std::map< uint32_t, uint32_t >::const_iterator EcalTPGFineGrainTowerEEMapIterator
std::map< uint32_t, uint32_t > EcalTPGFineGrainTowerEEMap

Member Data Documentation

uint32_t EcalFenixTcpFgvbEE::fgee_lut_
private

Definition at line 26 of file EcalFenixTcpFgvbEE.h.

Referenced by process(), and setParameters().

std::vector<int> EcalFenixTcpFgvbEE::indexLut_
private

Definition at line 27 of file EcalFenixTcpFgvbEE.h.

Referenced by EcalFenixTcpFgvbEE(), and process().