//*-- 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';
}

Last change: Sat May 22 13:05:05 2010
Last generated: 2010-05-22 13:05

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.