Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:15:06

0001 /* -*- mode: c++ -*- */
0002 
0003 #ifndef Roo_GKCounter
0004 #define Roo_GKCounter
0005 
0006 #include <iostream>
0007 #include <string>
0008 #include <ctime>
0009 
0010 class RooGKCounter {
0011 public:
0012   RooGKCounter();
0013   RooGKCounter(const char* message);
0014   RooGKCounter(unsigned long int theFirst, unsigned long int theDivider);
0015   ~RooGKCounter();
0016 
0017   void setCounter(unsigned long int);
0018   void setDivider(unsigned int);
0019   void setPrintCount(bool _printCount);
0020   void setNewLine(bool newLine);
0021   void setMessage(const char*);
0022   void count(void);
0023   unsigned long int getCount(void);
0024   void increment(long int _incr);
0025 
0026 private:
0027   unsigned long int _count;
0028   unsigned long int _firstCount;
0029   unsigned int _divider;
0030   bool printCount;
0031   bool firstCountEntry;
0032   std::string _message;
0033   bool _newLine;
0034 
0035   time_t initTime, firstTickTime, lastPrintTime, lastTickTime;
0036 
0037   void init(void);
0038 
0039   //ClassDef(RooGKCounter,1)
0040 };
0041 
0042 #endif