CMS 3D CMS Logo

Lut.cc File Reference

#include "L1Trigger/DTTraco/interface/Lut.h"

Go to the source code of this file.

Functions

char exaDigit (int i)
std::string lutFmt (int i)


Function Documentation

char exaDigit ( int  i  ) 

Definition at line 128 of file Lut.cc.

Referenced by lutFmt().

00128                        {
00129   if ( i < 10 ) return (   i        + '0' );
00130   else          return ( ( i - 10 ) + 'A' );
00131 }

std::string lutFmt ( int  i  ) 

Definition at line 133 of file Lut.cc.

References exaDigit(), j2, j3, and s.

00133                           {
00134   char* buf = new char[6];
00135   buf[2] = ' ';
00136   buf[5] = '\0';
00137   int j4 = i % 16;
00138   i /= 16;
00139   int j3 = i % 16;
00140   i /= 16;
00141   int j2 = i % 16;
00142   i /= 16;
00143   int j1 = i % 16;
00144   buf[0] = exaDigit( j1 );
00145   buf[1] = exaDigit( j2 );
00146   buf[3] = exaDigit( j3 );
00147   buf[4] = exaDigit( j4 );
00148   std::string s( buf );
00149   return s;
00150 }


Generated on Tue Jun 9 17:54:36 2009 for CMSSW by  doxygen 1.5.4