RooGKCounter

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
/* -*- mode: c++ -*- */

#ifndef Roo_GKCounter
#define Roo_GKCounter

#include <iostream>
#include <string>
#include <ctime>

class RooGKCounter {
public:
  RooGKCounter();
  RooGKCounter(const char* message);
  RooGKCounter(unsigned long int theFirst, unsigned long int theDivider);
  ~RooGKCounter();

  void setCounter(unsigned long int);
  void setDivider(unsigned int);
  void setPrintCount(bool _printCount);
  void setNewLine(bool newLine);
  void setMessage(const char*);
  void count(void);
  unsigned long int getCount(void);
  void increment(long int _incr);

private:
  unsigned long int _count;
  unsigned long int _firstCount;
  unsigned int _divider;
  bool printCount;
  bool firstCountEntry;
  std::string _message;
  bool _newLine;

  time_t initTime, firstTickTime, lastPrintTime, lastTickTime;

  void init(void);

  //ClassDef(RooGKCounter,1)
};

#endif