#ifndef HGEOMFRPC_H #define HGEOMFRPC_H #include "hgeomset.h" #include #include "TString.h" class HGeomFRpc : public HGeomSet { protected: Char_t modName[5]; // name of module Char_t eleName[3]; // substring for elements in module public: HGeomFRpc(); ~HGeomFRpc() {} inline const Char_t* getModuleName(Int_t); inline const Char_t* getEleName(Int_t); inline Int_t getModNumInMod(const TString&); ClassDef(HGeomFRpc,0) // Class for geometry of the new forward detector }; inline const Char_t* HGeomFRpc::getModuleName(Int_t m) { // Returns the name of module m std::memcpy(modName,Form("BD%iM",m+1),5); return modName; } inline const Char_t* HGeomFRpc::getEleName(Int_t m) { // Returns the element name in module m std::memcpy(eleName,Form("B%i",m+1),3); return eleName; } inline Int_t HGeomFRpc::getModNumInMod(const TString& name) { // returns the module index retrieved from BDxM return (Int_t)(name[2]-'0')-1; } #endif /* !HGEOMFRPC_H */