All parameter containers, which do not use HadAscii, can or could use "HCondParIo" for read and write.
This I/O is implemented for Oracle, ROOT and ASCII and automatically created.Bool_t XXX::init(HParIo* inp,Int_t* set) { HDetParIo* input=inp->getDetParIo("HCondParIo"); if (input) return (input->init(this,set)); return kFALSE; } Int_t XXX::write(HParIo* output) { HDetParIo* out=output->getDetParIo("HCondParIo"); if (out) return out->write(this); return -1; }
HParamList contains now a second list for binaries and provides functions to fill the list (for write) and to read from the list (for initialization).
Write:
void addBinary(const Text_t*,const UChar_t*,const Int_t); | |
void addBinary(const Text_t*,const Short_t*,const Int_t); | |
void addBinary(const Text_t*,const Int_t*,const Int_t); | |
void addBinary(const Text_t*,const Float_t*,const Int_t); | |
void addBinary(const Text_t*,const Double_t*,const Int_t); | |
void addBinary(const Text_t*,TObject*); |
Init:
Two different kinds of fill-functions exist for fixed and variable array sizes.
Bool_t fillBinary(const Text_t*,UChar_t*,const Int_t); | |
Bool_t fillBinary(const Text_t*,Short_t*,const Int_t); | |
Bool_t fillBinary(const Text_t*,Int_t*,const Int_t); | |
Bool_t fillBinary(const Text_t*,Float_t*,const Int_t); | |
Bool_t fillBinary(const Text_t*,Double_t*,const Int_t); |
The second kind recreates the array and returns the array size. These functions also accept NULL pointers.
Int_t fillBinary(const Text_t*,UChar_t*); | |
Int_t fillBinary(const Text_t*,Short_t*); | |
Int_t fillBinary(const Text_t*,Int_t*); | |
Int_t fillBinary(const Text_t*,Float_t*); | |
Int_t fillBinary(const Text_t*,Double_t*); |
Int_t fillBinary(const Text_t*,TObject*); |
The ASCII files for the arrays look the same as for non-binary data, except for the type names:
hBin for an array of Short_t | |
iBin for an array of Int_t | |
fBin for an array of Float_t | |
dBin for an array of Double_t |
The code has been committed, but the old code for non_binary data still works.
The ORACLE WebDB GUI was updated and supports now also binary data. But it is not possible to decode the data in the GUI.
To be not completely blind regarding the data in the LOAD tables, the Oracle interface for conditions contains a function, which allows to initialize the container with a specified version from the LOAD tables.