//*-- Author : Joern Adamczewski-Musch //*-- Created : 17.02.2021 //_HADES_CLASS_DESCRIPTION ///////////////////////////////////////////////////////////// // HStsGeomPar // // This class contains Forward Sts detector geometry parameters according to geant // ///////////////////////////////////////////////////////////// #include "hstsgeompar.h" #include "hdetpario.h" #include "hgeomcompositevolume.h" #include "hpario.h" #include "hstsdetector.h" #include #include using namespace std; ClassImp(HStsGeomPar); HStsGeomPar::HStsGeomPar(const Char_t *name, const Char_t *title, const Char_t *context) : HDetGeomPar(name, title, context, "Sts") { } Bool_t HStsGeomPar::init(HParIo *inp, Int_t *set) { // intitializes the container from an input HDetParIo *input = inp->getDetParIo("HStsParIo"); if (input) return (input->init(this, set)); return kFALSE; } Int_t HStsGeomPar::write(HParIo *output) { // writes the container to an output HDetParIo *out = output->getDetParIo("HStsParIo"); if (out) return out->write(this); return -1; } Int_t HStsGeomPar::getCompNum(const TString &name) { // JAM this is used in hdetparascifileio // we have names of kind A1ST137,...,A2ST42, A1HT73 if(name.Length() < 5) Error("getCompNum()","Name = '%s' is too short!",name.Data()); return TString(name).Remove(0, 4).Atoi() - 1; }