#ifndef HSTSCALGEOMPAR_H #define HSTSCALGEOMPAR_H #include "hparset.h" #include #include #include "stsdef.h" class HStsCalGeomParCellKind : public TObject { protected: Float_t readoutPos; // location of straw readout electronic in module local coordinate system Float_t strawLength; // straw length Float_t propTime; // propagation time public: HStsCalGeomParCellKind() { clear(); } void clear(); Float_t getReadoutPos() { return readoutPos; } Float_t getStrawLength() { return strawLength; } Float_t getPropTime() { return propTime; } void getData(Float_t *data) { data[0] = readoutPos; data[1] = strawLength; data[2] = propTime; } void setReadoutPos(Float_t v) { readoutPos = v; } void setStrawLength(Float_t v) { strawLength = v; } void setPropTime(Float_t v) { propTime = v; } void fill(Float_t, Float_t, Float_t); void fill(Float_t *); void fill(HStsCalGeomParCellKind &); ClassDef(HStsCalGeomParCellKind, 1) // Chan level of the STS Geometry parameters }; class HStsCalGeomParCell : public TObject { protected: TObjArray *array; // pointer array containing HStsCalGeomParCell objects public: HStsCalGeomParCell(Int_t n = STS_MAX_UDCONF); virtual ~HStsCalGeomParCell(); HStsCalGeomParCellKind &operator[](Int_t i) { return *static_cast((*array)[i]); } Int_t getSize() { return array->GetEntries(); } ClassDef(HStsCalGeomParCell, 1) // Sector level of STS Geometry calibration parameters }; class HStsCalGeomParSec : public TObject { protected: TObjArray *array; // pointer array containing HStsCalGeomParCell objects public: HStsCalGeomParSec(Int_t n = STS_MAX_CELLS); virtual ~HStsCalGeomParSec(); HStsCalGeomParCell &operator[](Int_t i) { return *static_cast((*array)[i]); } Int_t getSize() { return array->GetEntries(); } ClassDef(HStsCalGeomParSec, 1) // Sector level of STS Geometry calibration parameters }; class HStsCalGeomParMod : public TObject { protected: TObjArray *array; // pointer array containing HStsCalGeomParCell objects public: HStsCalGeomParMod(Int_t n = STS_MAX_LAYERS); virtual ~HStsCalGeomParMod(); HStsCalGeomParSec &operator[](Int_t i) { return *static_cast((*array)[i]); } Int_t getSize() { return array->GetEntries(); } ClassDef(HStsCalGeomParMod, 1) // Sector level of STS Geometry calibration parameters }; class HStsCalGeomPar : public HParSet { protected: TObjArray *array; // array of pointers of type HStsCalGeomParSec public: HStsCalGeomPar(const Char_t *name, const Char_t *title, const Char_t *context); HStsCalGeomPar() : array(0) { ; } // for streamer? see segv in root file io JAM virtual ~HStsCalGeomPar(); HStsCalGeomParMod &operator[](Int_t i) { return *static_cast((*array)[i]); } Int_t getSize() { return array->GetEntries(); } Bool_t init(HParIo *input, Int_t *set); Int_t write(HParIo *output); void clear(); void printParams(); void readline(const Char_t *, Int_t *); void putAsciiHeader(TString &); void write(std::fstream &); ClassDef(HStsCalGeomPar, 1) // Container for the physical parameters of the STS Geometry }; #endif /*!HSTSCALGEOMPAR_H*/