LogCounter Class Reference

#include <LogCounter.h>

List of all members.

Public Member Functions

 LogCounter (double scale=10)
bool Increment (void)
bool Test (void)

Public Attributes

int fCount
int fCurrentBreak
int fNextBreak
double fScale

Detailed Description

Definition at line 6 of file LogCounter.h.


Constructor & Destructor Documentation

LogCounter::LogCounter ( double  scale = 10  )  [inline]

Definition at line 10 of file LogCounter.h.

References fCount, fCurrentBreak, fNextBreak, fScale, and Test().

00010 { fCount = 0; fCurrentBreak=-1; fNextBreak = 0; fScale = scale; Test(); };  


Member Function Documentation

bool LogCounter::Increment ( void   )  [inline]

Definition at line 11 of file LogCounter.h.

References fCount, and Test().

Referenced by CompareToReroot::Ana().

00011 { fCount++; return Test(); };

bool LogCounter::Test ( void   ) 

Definition at line 20 of file LogCounter.h.

References fCount, fCurrentBreak, and fNextBreak.

Referenced by Increment(), and LogCounter().

00021 {
00022   if(fCount==fCurrentBreak) return true;
00023   if(fCount>=fNextBreak) {
00024     fCurrentBreak = fNextBreak;
00025     if(fCount==0) fNextBreak = 1;
00026     else fNextBreak = (int) pow(10,log10((double)fCount)+0.1);
00027     return true;
00028   }
00029   return false;
00030 }


Member Data Documentation

Definition at line 14 of file LogCounter.h.

Referenced by CompareToReroot::Ana(), Increment(), LogCounter(), and Test().

Definition at line 15 of file LogCounter.h.

Referenced by LogCounter(), and Test().

Definition at line 16 of file LogCounter.h.

Referenced by LogCounter(), and Test().

Definition at line 17 of file LogCounter.h.

Referenced by LogCounter().


The documentation for this class was generated from the following file:

Generated on 22 May 2017 for loon by  doxygen 1.6.1