ROOT logo
//*-- AUTHOR : Ilse Koenig
//*-- Created : 13/08/2004 by Ilse Koenig

//_HADES_CLASS_DESCRIPTION 
//////////////////////////////////////////////////////////////////////////////
//
// HOraSlowArchRateObj
//
// Class for the slowcontrol archiver rate (entries per minute)
//
//////////////////////////////////////////////////////////////////////////////

#include "horaslowarchrateobj.h"
#include "TDatime.h"

ClassImp(HOraSlowArchRateObj)

HOraSlowArchRateObj::HOraSlowArchRateObj() {
  // Default constructor
  rate=0;
}

HOraSlowArchRateObj::HOraSlowArchRateObj(const Char_t* t,Int_t n) {
  // Constructor with arguments : starttime t and rate n 
  startTime=t;
  rate=n;
}

Int_t HOraSlowArchRateObj::getTimeDiff(const Char_t* t) {
  // Returns the time difference (in seconds) relative to time t
  TDatime t1(t);
  TDatime t2(startTime);
  return (t2.Convert()-t1.Convert());
}

void HOraSlowArchRateObj::print() {
  // Prints the timestamp and rate to stdout
  cout<<startTime<<"  "<<setw(12)<<rate<<'\n';
}

void HOraSlowArchRateObj::write(fstream& fout) {
  // Streams the timestamp and rate 
  fout<<startTime<<"  "<<setw(12)<<rate<<'\n';
}
 horaslowarchrateobj.cc:1
 horaslowarchrateobj.cc:2
 horaslowarchrateobj.cc:3
 horaslowarchrateobj.cc:4
 horaslowarchrateobj.cc:5
 horaslowarchrateobj.cc:6
 horaslowarchrateobj.cc:7
 horaslowarchrateobj.cc:8
 horaslowarchrateobj.cc:9
 horaslowarchrateobj.cc:10
 horaslowarchrateobj.cc:11
 horaslowarchrateobj.cc:12
 horaslowarchrateobj.cc:13
 horaslowarchrateobj.cc:14
 horaslowarchrateobj.cc:15
 horaslowarchrateobj.cc:16
 horaslowarchrateobj.cc:17
 horaslowarchrateobj.cc:18
 horaslowarchrateobj.cc:19
 horaslowarchrateobj.cc:20
 horaslowarchrateobj.cc:21
 horaslowarchrateobj.cc:22
 horaslowarchrateobj.cc:23
 horaslowarchrateobj.cc:24
 horaslowarchrateobj.cc:25
 horaslowarchrateobj.cc:26
 horaslowarchrateobj.cc:27
 horaslowarchrateobj.cc:28
 horaslowarchrateobj.cc:29
 horaslowarchrateobj.cc:30
 horaslowarchrateobj.cc:31
 horaslowarchrateobj.cc:32
 horaslowarchrateobj.cc:33
 horaslowarchrateobj.cc:34
 horaslowarchrateobj.cc:35
 horaslowarchrateobj.cc:36
 horaslowarchrateobj.cc:37
 horaslowarchrateobj.cc:38
 horaslowarchrateobj.cc:39
 horaslowarchrateobj.cc:40
 horaslowarchrateobj.cc:41
 horaslowarchrateobj.cc:42
 horaslowarchrateobj.cc:43
 horaslowarchrateobj.cc:44