CMS 3D CMS Logo

BinCounters Class Reference

#include <DQM/SiStripMonitorHardware/interface/BinCounters.h>

List of all members.

Public Member Functions

 BinCounters ()
bool convert (unsigned int input, int bitval)
int getBinCounters (int counterNumber)
int invert8 (int input)
void setBinCounters (unsigned int number_)
 ~BinCounters ()

Private Attributes

int counter0
int counter1
int counter10
int counter11
int counter12
int counter13
int counter14
int counter15
int counter16
int counter17
int counter18
int counter19
int counter2
int counter20
int counter21
int counter22
int counter23
int counter24
int counter25
int counter26
int counter27
int counter28
int counter29
int counter3
int counter30
int counter31
int counter4
int counter5
int counter6
int counter7
int counter8
int counter9
int f
unsigned int number_


Detailed Description

Definition at line 4 of file BinCounters.h.


Constructor & Destructor Documentation

BinCounters::BinCounters (  ) 

Definition at line 3 of file BinCounters.cc.

00004         :f(32),
00005         number_(0),
00006         counter0(0),
00007         counter1(0),
00008         counter2(0),
00009         counter3(0),
00010         counter4(0),
00011         counter5(0),
00012         counter6(0),
00013         counter7(0),
00014         counter8(0),
00015         counter9(0),
00016         counter10(0),
00017         counter11(0),
00018         counter12(0),
00019         counter13(0),
00020         counter14(0),
00021         counter15(0),
00022         counter16(0),
00023         counter17(0),
00024         counter18(0),
00025         counter19(0),
00026         counter20(0),
00027         counter21(0),
00028         counter22(0),
00029         counter23(0),
00030         counter24(0),
00031         counter25(0),
00032         counter26(0),
00033         counter27(0),
00034         counter28(0),
00035         counter29(0),
00036         counter30(0),
00037         counter31(0)
00038 
00039 {
00040 //nada
00041 }

BinCounters::~BinCounters (  ) 

Definition at line 43 of file BinCounters.cc.

00043                          {
00044 }


Member Function Documentation

bool BinCounters::convert ( unsigned int  input,
int  bitval 
)

Definition at line 125 of file BinCounters.cc.

Referenced by setBinCounters().

00125                                                        {
00126 
00127       return ( 0x1 & (input >> bitval));
00128 }

int BinCounters::getBinCounters ( int  counterNumber  ) 

Definition at line 88 of file BinCounters.cc.

References counter0, counter1, counter10, counter11, counter12, counter13, counter14, counter15, counter16, counter17, counter18, counter19, counter2, counter20, counter21, counter22, counter23, counter24, counter25, counter26, counter27, counter28, counter29, counter3, counter30, counter31, counter4, counter5, counter6, counter7, counter8, and counter9.

00088                                                 {
00089 
00090   if(counterNumber == 0)return counter0;
00091   else if(counterNumber == 1)return counter1;
00092   else if(counterNumber == 2)return counter2;
00093   else if(counterNumber == 3)return counter3;
00094   else if(counterNumber == 4)return counter4;
00095   else if(counterNumber == 5)return counter5;
00096   else if(counterNumber == 6)return counter6;
00097   else if(counterNumber == 7)return counter7;
00098   else if(counterNumber == 8)return counter8;
00099   else if(counterNumber == 9)return counter9;
00100   else if(counterNumber == 10)return counter10;
00101   else if(counterNumber == 11)return counter11;
00102   else if(counterNumber == 12)return counter12;
00103   else if(counterNumber == 13)return counter13;
00104   else if(counterNumber == 14)return counter14;
00105   else if(counterNumber == 15)return counter15;
00106   else if(counterNumber == 16)return counter16;
00107   else if(counterNumber == 17)return counter17;
00108   else if(counterNumber == 18)return counter18;
00109   else if(counterNumber == 19)return counter19;
00110   else if(counterNumber == 20)return counter20;
00111   else if(counterNumber == 21)return counter21;
00112   else if(counterNumber == 22)return counter22;
00113   else if(counterNumber == 23)return counter23;
00114   else if(counterNumber == 24)return counter24;
00115   else if(counterNumber == 25)return counter25;
00116   else if(counterNumber == 26)return counter26;
00117   else if(counterNumber == 27)return counter27;
00118   else if(counterNumber == 28)return counter28;
00119   else if(counterNumber == 29)return counter29;
00120   else if(counterNumber == 30)return counter30;
00121   else if(counterNumber == 31)return counter31;
00122   else return 0;
00123 }

int BinCounters::invert8 ( int  input  ) 

Definition at line 130 of file BinCounters.cc.

00130                                  {
00131 
00132         int inverted = ( ( ((0x1 & (input >> 0))&0xFF)<<7) |
00133                          ( ((0x1 & (input >> 1))&0xFF)<<6) |
00134                          ( ((0x1 & (input >> 2))&0xFF)<<5) |
00135                          ( ((0x1 & (input >> 3))&0xFF)<<4) |
00136                          ( ((0x1 & (input >> 4))&0xFF)<<3) |
00137                          ( ((0x1 & (input >> 5))&0xFF)<<2) |
00138                          ( ((0x1 & (input >> 6))&0xFF)<<1) |
00139                          ( ((0x1 & (input >> 7))&0xFF)<<0)   );
00140 
00141         return inverted;
00142 }

void BinCounters::setBinCounters ( unsigned int  number_  ) 

Definition at line 47 of file BinCounters.cc.

References convert(), counter0, counter1, counter10, counter11, counter12, counter13, counter14, counter15, counter16, counter17, counter18, counter19, counter2, counter20, counter21, counter22, counter23, counter24, counter25, counter26, counter27, counter28, counter29, counter3, counter30, counter31, counter4, counter5, counter6, counter7, counter8, counter9, f, and i.

00047                                                     {
00048 
00049         for(int i = (f-1); i>=0; i--){
00050                 if( convert(number_, i) == 0 ){
00051                   if(i == 31)counter31++;
00052                   else if(i == 30)counter30++;
00053                   else if(i == 29)counter29++;
00054                   else if(i == 28)counter28++;
00055                   else if(i == 27)counter27++;
00056                   else if(i == 26)counter26++;
00057                   else if(i == 25)counter25++;
00058                   else if(i == 24)counter24++;
00059                   else if(i == 23)counter23++;
00060                   else if(i == 22)counter22++;
00061                   else if(i == 21)counter21++;
00062                   else if(i == 20)counter20++;
00063                   else if(i == 19)counter19++;
00064                   else if(i == 18)counter18++;
00065                   else if(i == 17)counter17++;
00066                   else if(i == 16)counter16++;
00067                   else if(i == 15)counter15++;
00068                   else if(i == 14)counter14++;
00069                   else if(i == 13)counter13++;
00070                   else if(i == 12)counter12++;
00071                   else if(i == 11)counter11++;
00072                   else if(i == 10)counter10++;
00073                   else if(i == 9)counter9++;
00074                   else if(i == 8)counter8++;
00075                   else if(i == 7)counter7++;
00076                   else if(i == 6)counter6++;
00077                   else if(i == 5)counter5++;
00078                   else if(i == 4)counter4++;
00079                   else if(i == 3)counter3++;
00080                   else if(i == 2)counter2++;
00081                   else if(i == 1)counter1++;
00082                   else if(i == 0)counter0++;
00083                 }
00084         }
00085 
00086 }


Member Data Documentation

int BinCounters::counter0 [private]

Definition at line 22 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter1 [private]

Definition at line 23 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter10 [private]

Definition at line 32 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter11 [private]

Definition at line 33 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter12 [private]

Definition at line 34 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter13 [private]

Definition at line 35 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter14 [private]

Definition at line 36 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter15 [private]

Definition at line 37 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter16 [private]

Definition at line 38 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter17 [private]

Definition at line 39 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter18 [private]

Definition at line 40 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter19 [private]

Definition at line 41 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter2 [private]

Definition at line 24 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter20 [private]

Definition at line 42 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter21 [private]

Definition at line 43 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter22 [private]

Definition at line 44 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter23 [private]

Definition at line 45 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter24 [private]

Definition at line 46 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter25 [private]

Definition at line 47 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter26 [private]

Definition at line 48 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter27 [private]

Definition at line 49 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter28 [private]

Definition at line 50 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter29 [private]

Definition at line 51 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter3 [private]

Definition at line 25 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter30 [private]

Definition at line 52 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter31 [private]

Definition at line 53 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter4 [private]

Definition at line 26 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter5 [private]

Definition at line 27 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter6 [private]

Definition at line 28 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter7 [private]

Definition at line 29 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter8 [private]

Definition at line 30 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::counter9 [private]

Definition at line 31 of file BinCounters.h.

Referenced by getBinCounters(), and setBinCounters().

int BinCounters::f [private]

Definition at line 17 of file BinCounters.h.

Referenced by setBinCounters().

unsigned int BinCounters::number_ [private]

Definition at line 18 of file BinCounters.h.


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:15:01 2009 for CMSSW by  doxygen 1.5.4