#include "horaslowchanraw.h"
#include "TDatime.h"
ClassImp(HOraSlowChanRaw)
HOraSlowChanRaw::HOraSlowChanRaw() {
nanoSeconds=0;
value=0.;
status=0;
}
void HOraSlowChanRaw::fill(const Char_t* t,Int_t nano,Double_t val,Int_t sevr) {
timestamp=t;
nanoSeconds=nano;
value=val;
if (sevr==3904||sevr==3872||sevr==3874) status=1;
else status=0;
}
void HOraSlowChanRaw::fill(const Char_t* t,Int_t nano,Int_t val,Int_t sevr) {
timestamp=t;
nanoSeconds=nano;
value=(Double_t)val;
if (sevr==3904||sevr==3872||sevr==3874) status=1;
else status=0;
}
Int_t HOraSlowChanRaw::getTimeDiff(const Char_t* t) {
TDatime t1(t);
TDatime t2(timestamp);
return (t2.Convert()-t1.Convert());
}
void HOraSlowChanRaw::print(Int_t valPrec) {
cout.setf(ios::fixed,ios::floatfield);
cout<<timestamp<<setw(11)<<nanoSeconds
<<cout.precision(valPrec)<<setw(valPrec+10)<<value
<<setw(3)<<status<<'\n';
}
void HOraSlowChanRaw::write(fstream& fout,Int_t valPrec) {
fout.setf(ios::fixed,ios::floatfield);
fout<<timestamp<<setw(11)<<nanoSeconds
<<fout.precision(valPrec)<<setw(valPrec+10)<<value
<<setw(3)<<status<<'\n';
}
Last change: Sat May 22 13:05:25 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.