1 #ifndef HDETPARASCIIFILEIO_H
2 #define HDETPARASCIIFILEIO_H
24 Bool_t findContainer(
const Text_t* name);
25 Bool_t checkAllFound(Int_t*, Int_t);
26 void writeHeader(
const Text_t*,
const Text_t* context =
"",
27 const Text_t* author =
"",
const Text_t* description =
"");
29 void readComment(
const Char_t*,
HParSet*);
30 Bool_t readLabPositions(
const Text_t*,
HDetGeomPar*, Int_t*, Int_t, Int_t);
40 Bool_t read(HTrb3Calpar*);
43 template<
class T> Bool_t readFile(T* pPar);
44 template<
class T> Int_t writeFile(T* pPar);
49 template<
class T> Bool_t
56 if (kFALSE == findContainer(pPar->GetName())) {
61 const Int_t maxbuf = 155;
64 while (!pFile->eof() &&
rc) {
65 pFile->getline(buf, maxbuf);
69 if (buf[0] !=
'/' && buf[0] !=
'\0') {
70 rc = pPar->readline(buf);
74 pPar->setInputVersion(1, inputNumber);
76 Info(
"readFile",
"%s initialized from Ascii file", pPar->GetName());
81 template<
class T> Int_t
89 pPar->putAsciiHeader(fHeader);
90 writeHeader(pPar->GetName(), pPar->getParamContext());
92 pFile->write(sepLine, strlen(sepLine));
93 pPar->setChanged(kFALSE);
96 Error(
"writeFile",
"Output is not writable");
fstream * pFile
comment line
virtual Bool_t write(HDetector *)
pointer to ascii file
Int_t writeFile(HDetGeomPar *)
TString sepLine
header of container output in file
virtual ~HDetParAsciiFileIo()