CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/CaloOnlineTools/HcalOnlineDb/interface/RooGKCounter.h

Go to the documentation of this file.
00001 /* -*- mode: c++ -*- */
00002 
00003 #ifndef Roo_GKCounter
00004 #define Roo_GKCounter
00005 
00006 #include <iostream>
00007 #include <string>
00008 #include <time.h>
00009 
00010 class RooGKCounter {
00011   
00012  public:
00013   RooGKCounter();
00014   RooGKCounter( const char *message );
00015   RooGKCounter( unsigned long int theFirst, unsigned long int theDivider );
00016   ~RooGKCounter();
00017 
00018   void setCounter( unsigned long int );
00019   void setDivider( unsigned int );
00020   void setPrintCount( bool _printCount );
00021   void setNewLine( bool newLine );
00022   void setMessage( const char* );
00023   void count( void );
00024   unsigned long int getCount( void );
00025   void increment( long int _incr );
00026 
00027  private:
00028   unsigned long int _count;
00029   unsigned long int _firstCount;
00030   unsigned int _divider;
00031   bool printCount;
00032   bool firstCountEntry;
00033   std::string _message;
00034   bool _newLine;
00035 
00036   time_t initTime, firstTickTime, lastPrintTime, lastTickTime;
00037 
00038   void init( void );
00039 
00040   //ClassDef(RooGKCounter,1)
00041 };
00042 
00043 #endif