using namespace std;
#include "hades.h"
#include "hparset.h"
#include "hrichdetector.h"
#include "hrichparasciifileio.h"
#include "hspectrometer.h"
#include <iomanip>
#include <iostream>
ClassImp(HRichParAsciiFileIo)
HRichParAsciiFileIo::HRichParAsciiFileIo(fstream* f)
: HDetParAsciiFileIo(f) {
fName = "HRichParIo";
}
Bool_t
HRichParAsciiFileIo::init(HParSet* pPar, Int_t* set) {
const Text_t* name = ((TNamed*)pPar)->GetName();
if ( NULL != pFile )
{
if ( 0 == strncmp(name, "RichAnalysisParameters",
strlen("RichAnalysisParameters")) )
{
return HDetParAsciiFileIo::readCond((HParCond*)pPar);
}
if ( 0 == strncmp(name, "RichCorrelatorParameters",
strlen("RichCorrelatorParameters")) )
{
return HDetParAsciiFileIo::readCond((HParCond*)pPar);
}
if ( 0 == strncmp(name, "RichDigitisationParameters",
strlen("RichDigitisationParameters")) )
{
return HDetParAsciiFileIo::readCond((HParCond*)pPar);
}
}
Error("init", "Initialization of %s not possible from ASCII file!", name);
return kFALSE;
}
Int_t
HRichParAsciiFileIo::write(HParSet* pPar) {
const Text_t* name = ((TNamed*)pPar)->GetName();
if ( NULL != pFile )
{
if ( 0 == strncmp(name, "RichAnalysisParameters",
strlen("RichAnalysisParameter")) )
{
return HDetParAsciiFileIo::writeCond((HParCond*)pPar);
}
if ( 0 == strncmp(name, "RichCorrelatorParameters",
strlen("RichCorrelatorParameters")) )
{
return HDetParAsciiFileIo::writeCond((HParCond*)pPar);
}
if ( 0 == strncmp(name, "RichDigitisationParameters",
strlen("RichDigitisationParameters")) )
{
return HDetParAsciiFileIo::writeCond((HParCond*)pPar);
}
}
Error("write", "%s could not be written to ASCII file", name);
return kFALSE;
}
Bool_t
HRichParAsciiFileIo::write(HDetector* p) {
return kTRUE;
}
Last change: Sat May 22 13:09:42 2010
Last generated: 2010-05-22 13:09
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.