FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PixelGeo.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 #ifndef PIXELGEO_H
9 #define PIXELGEO_H
10 
11 #include "FairGeoSet.h" // for FairGeoSet
12 
13 #include <Rtypes.h> // for PixelGeo::Class, ClassDef, PixelGeo::Streamer
14 #include <TString.h> // for TString
15 
16 class PixelGeo : public FairGeoSet
17 {
18  protected:
19  char modName[20]; // name of module
20  char eleName[20]; // substring for elements in module
21 
22  public:
23  PixelGeo();
24  ~PixelGeo() {}
25  const char* getModuleName(Int_t);
26  const char* getEleName(Int_t);
27  inline Int_t getModNumInMod(const TString&);
28 
29  ClassDef(PixelGeo, 1);
30 };
31 
32 inline Int_t PixelGeo::getModNumInMod(const TString& name)
33 {
39  return static_cast<Int_t>((name[5] - '0') - 1); //
40 }
41 
42 #endif
~PixelGeo()
Definition: PixelGeo.h:24
Int_t getModNumInMod(const TString &)
Definition: PixelGeo.h:32
char modName[20]
Definition: PixelGeo.h:19
const char * getModuleName(Int_t)
Definition: PixelGeo.cxx:27
ClassDef(PixelGeo, 1)
PixelGeo()
Definition: PixelGeo.cxx:14
const char * getEleName(Int_t)
Definition: PixelGeo.cxx:38
char eleName[20]
Definition: PixelGeo.h:20