#include "hparrootfileio.h"
#include "hparset.h"
#include "hrichparrootfileio.h"
#include "richdef.h"
#include "hrich700geompar.h"
using namespace std;
ClassImp(HRichParRootFileIo)
HRichParRootFileIo::HRichParRootFileIo(HParRootFile* f)
: HDetParRootFileIo(f)
{
fName = "HRichParIo";
initModules = new TArrayI(RICH_MAX_SECTORS);
}
HRichParRootFileIo::~HRichParRootFileIo()
{
if (NULL != modulesFound) {
delete modulesFound;
modulesFound = NULL;
}
if (NULL != initModules) {
delete initModules;
initModules = NULL;
}
}
Bool_t
HRichParRootFileIo::init(HParSet* pPar, Int_t* set)
{
if (kFALSE == isActiv) {
readModules("Rich");
}
const Text_t* name = pPar->GetName();
if (NULL != pFile) {
if (0 == strncmp(name, "RichGeometryParameters", strlen("RichGeometryParameters"))) {
return read(pPar);
}
if (0 == strncmp(name, "RichCalPar", strlen("RichCalPar"))) {
return read(pPar);
}
if (0 == strncmp(name, "RichMappingParameters", strlen("RichMappingParameters"))) {
return read(pPar);
}
if (0 == strncmp(name, "Rich700Trb3Lookup", strlen("Rich700Trb3Lookup"))) {
return read(pPar);
}
if (0 == strncmp(name, "Rich700ThresholdPar", strlen("Rich700ThresholdPar"))) {
return read(pPar);
}
if (0 ==strncmp(name,"Rich700GeomPar",strlen("Rich700GeomPar"))){
return HDetParRootFileIo::read((HRich700GeomPar*)pPar,set);
}
}
Error("init", "initialization of %s not possible from ROOT file!", name);
return kFALSE;
}