CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
L1RPCConeBuilder::TCompressedCon Struct Reference

#include <L1RPCConeBuilder.h>

Public Member Functions

void addStrip (unsigned char strip)
 
int getLogStrip (int strip, const L1RPCConeDefinition::TLPSizeVec &LPSizeVec) const
 
 TCompressedCon ()
 

Public Attributes

unsigned char m_logplane
 
signed char m_mul
 
signed short m_offset
 
unsigned char m_PAC
 
signed char m_tower
 
unsigned char m_validForStripFirst
 
unsigned char m_validForStripLast
 

Detailed Description

Definition at line 50 of file L1RPCConeBuilder.h.

Constructor & Destructor Documentation

L1RPCConeBuilder::TCompressedCon::TCompressedCon ( )
inline

Member Function Documentation

void L1RPCConeBuilder::TCompressedCon::addStrip ( unsigned char  strip)
inline

Definition at line 90 of file L1RPCConeBuilder.h.

References m_validForStripFirst, and m_validForStripLast.

Referenced by RPCStripsRing::compressConnections().

90  {
91  if (m_validForStripFirst==0) {
92  m_validForStripFirst = strip;
93  m_validForStripLast = strip;
94  } else if (strip < m_validForStripFirst){
95  m_validForStripFirst = strip;
96  }
97  else if (strip > m_validForStripLast){
98  m_validForStripLast = strip;
99  }
100 
101  }
int L1RPCConeBuilder::TCompressedCon::getLogStrip ( int  strip,
const L1RPCConeDefinition::TLPSizeVec LPSizeVec 
) const
inline

Definition at line 62 of file L1RPCConeBuilder.h.

References abs, m_logplane, m_mul, m_offset, m_tower, m_validForStripFirst, m_validForStripLast, and run_regression::ret.

62  {
63  int ret = -1;
64  if ( strip >= m_validForStripFirst && strip <= m_validForStripLast ){
65  ret = int(m_mul)*strip+int(m_offset);
66 
67  int lpSize = -1;
68  L1RPCConeDefinition::TLPSizeVec::const_iterator it = LPSizeVec.begin();
69  L1RPCConeDefinition::TLPSizeVec::const_iterator itEnd = LPSizeVec.end();
70  for (;it!=itEnd;++it){
71 
72  if (it->m_tower != std::abs(m_tower) || it->m_LP != m_logplane-1) continue;
73  lpSize = it->m_size;
74 
75  }
76 
77  //FIXME
78  if (lpSize==-1) {
79  //throw cms::Exception("getLogStrip") << " lpSize==-1\n";
80  }
81 
82  //if (ret<0 || ret > LPSizesInTowers.at(std::abs(m_tower)).at(m_logplane-1) )
83  if (ret<0 || ret > lpSize )
84  return -1;
85 
86  }
87  return ret;
88  }
#define abs(x)
Definition: mlp_lapack.h:159

Member Data Documentation

unsigned char L1RPCConeBuilder::TCompressedCon::m_logplane

Definition at line 54 of file L1RPCConeBuilder.h.

Referenced by RPCStripsRing::compressConnections(), and getLogStrip().

signed char L1RPCConeBuilder::TCompressedCon::m_mul

Definition at line 52 of file L1RPCConeBuilder.h.

Referenced by RPCStripsRing::compressConnections(), and getLogStrip().

signed short L1RPCConeBuilder::TCompressedCon::m_offset

Definition at line 57 of file L1RPCConeBuilder.h.

Referenced by RPCStripsRing::compressConnections(), and getLogStrip().

unsigned char L1RPCConeBuilder::TCompressedCon::m_PAC

Definition at line 53 of file L1RPCConeBuilder.h.

Referenced by RPCStripsRing::compressConnections().

signed char L1RPCConeBuilder::TCompressedCon::m_tower

Definition at line 51 of file L1RPCConeBuilder.h.

Referenced by RPCStripsRing::compressConnections(), and getLogStrip().

unsigned char L1RPCConeBuilder::TCompressedCon::m_validForStripFirst

Definition at line 55 of file L1RPCConeBuilder.h.

Referenced by addStrip(), and getLogStrip().

unsigned char L1RPCConeBuilder::TCompressedCon::m_validForStripLast

Definition at line 56 of file L1RPCConeBuilder.h.

Referenced by addStrip(), and getLogStrip().