ROOT logo
#ifndef HTOFGEOMPAR_H
#define HTOFGEOMPAR_H

#include "hdetgeompar.h"

class HGeomShapes;

class HTofGeomPar : public HDetGeomPar {
public:
  HTofGeomPar(const Char_t* name="TofGeomPar",
              const Char_t* title="Tof geometry parameters",
              const Char_t* context="GeomProduction");
  ~HTofGeomPar() {}
  Bool_t init(HParIo*,Int_t*);
  Int_t write(HParIo*);
  inline Int_t getSecNum(const TString&);
  inline Int_t getModNumInMod(const TString&);
  inline Int_t getModNumInComp(const TString&);
  inline Int_t getCompNum(const TString&);
  ClassDef(HTofGeomPar,1) // Container for the Tof geometry parameters
};

inline Int_t HTofGeomPar::getSecNum(const TString& name) {
  // returns the module index retrieved from the module name TxxFx
  return (Int_t)(name[4]-'0')-1;
}

inline Int_t HTofGeomPar::getModNumInMod(const TString& name) {
  // returns the module index retrieved from the module name TxxFx
  return (-((Int_t)(name[1]-'0')*10+(Int_t)(name[2]-'0')-maxModules));
}

inline Int_t HTofGeomPar::getModNumInComp(const TString& name) {
  // returns the module index retrieved from the  name TxxSx
  return (-((Int_t)(name[1]-'0')*10+(Int_t)(name[2]-'0')-maxModules));
}

inline Int_t HTofGeomPar::getCompNum(const TString& name) {
  // returns the layer index retrieved from the layer name TxxSx
  return (8-(Int_t)(name[4]-'0'));
}

#endif /* !HTOFGEOMPAR_H */
 htofgeompar.h:1
 htofgeompar.h:2
 htofgeompar.h:3
 htofgeompar.h:4
 htofgeompar.h:5
 htofgeompar.h:6
 htofgeompar.h:7
 htofgeompar.h:8
 htofgeompar.h:9
 htofgeompar.h:10
 htofgeompar.h:11
 htofgeompar.h:12
 htofgeompar.h:13
 htofgeompar.h:14
 htofgeompar.h:15
 htofgeompar.h:16
 htofgeompar.h:17
 htofgeompar.h:18
 htofgeompar.h:19
 htofgeompar.h:20
 htofgeompar.h:21
 htofgeompar.h:22
 htofgeompar.h:23
 htofgeompar.h:24
 htofgeompar.h:25
 htofgeompar.h:26
 htofgeompar.h:27
 htofgeompar.h:28
 htofgeompar.h:29
 htofgeompar.h:30
 htofgeompar.h:31
 htofgeompar.h:32
 htofgeompar.h:33
 htofgeompar.h:34
 htofgeompar.h:35
 htofgeompar.h:36
 htofgeompar.h:37
 htofgeompar.h:38
 htofgeompar.h:39
 htofgeompar.h:40
 htofgeompar.h:41
 htofgeompar.h:42
 htofgeompar.h:43