TstampFilter.h 854 Bytes
Newer Older
1 2 3 4 5 6 7 8
#ifndef TSTAMPFILTER_H_INCLUDED
#define TSTAMPFILTER_H_INCLUDED

#include <memory.h>
#include <string>

typedef unsigned long long ULong64_t;
typedef unsigned int       UInt_t;
dino's avatar
 
dino committed
9
typedef          int        Int_t;
10 11 12 13 14 15 16 17
typedef bool               Bool_t;

class TstampFilter
{
public:
  Bool_t      fFromFile;
  std::string fTstampFile;
  FILE       *fTstampFILE;
dino's avatar
 
dino committed
18
  Int_t       fMyId;
19 20 21
  ULong64_t   fTolerance;
  ULong64_t   fTimestamp;
  UInt_t      fCount;
22
  //UInt_t      fStats[1000];
23 24

  TstampFilter();
dino's avatar
 
dino committed
25
  TstampFilter(std::string tstampFile, int tolerance, int id = -1);
26 27
  virtual ~TstampFilter();
  void Reset();
dino's avatar
 
dino committed
28
  bool Initialize(std::string tstampFile, int tolerance, int id = -1);
29 30
  bool IsReady() {return fFromFile;}
  bool CheckTstamp(ULong64_t timestamp);
dino's avatar
dino committed
31
  void NextTstamp();
32 33 34 35
};


#endif //TSTAMPFILTER_H_INCLUDED