]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpFiles.h
Update for station2:
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpFiles.h
1 // $Id$
2 // Category: sector
3 //
4 // Class AliMpFiles
5 // ----------------
6 // Class for generating file names and paths.
7 // The input files:
8 // zones.dat, zones_special.dat - sector description
9 // motif*.dat   - motif description (generated from Exceed)
10 // padPos*.dat  - pad positions in motif
11 //
12 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
13
14 #ifndef ALI_MP_FILES_H
15 #define ALI_MP_FILES_H
16
17 #include <TObject.h>
18 #include <TString.h>
19
20 #include "AliMpStationType.h"
21 #include "AliMpPlaneType.h"
22
23 class AliMpFiles : public TObject
24 {
25   public:
26     AliMpFiles();
27     // --> protected
28     //AliMpFiles(const AliMpFiles& right);
29     virtual ~AliMpFiles();
30     
31     // static access method
32     static AliMpFiles* Instance();
33
34     // methods
35     TString SectorFilePath(AliMpStationType station, 
36                            AliMpPlaneType plane) const;
37     TString SectorSpecialFilePath(AliMpStationType station, 
38                            AliMpPlaneType plane) const;
39     TString SectorSpecialFilePath2(AliMpStationType station, 
40                            AliMpPlaneType plane) const;
41     TString MotifFilePath(AliMpStationType station, AliMpPlaneType plane, 
42                           const TString& motifTypeID) const;
43     TString MotifSpecialFilePath(AliMpStationType station, 
44                           AliMpPlaneType plane, const TString& motifID) const;
45     TString PadPosFilePath(AliMpStationType station, 
46                           AliMpPlaneType plane, const TString& motifTypeID) const;
47     TString BergToGCFilePath(AliMpStationType station) const;
48
49     // set methods
50     void SetTopPath(const TString& topPath);
51                               
52   protected:
53     AliMpFiles(const AliMpFiles& right);
54     
55     // operators
56     AliMpFiles& operator=(const AliMpFiles& right);    
57     
58   private: 
59     // methods
60     TString PlaneDataDir(AliMpStationType station, AliMpPlaneType plane) const; 
61     TString StationDataDir(AliMpStationType station) const; 
62   
63     // static data members  
64     static AliMpFiles*   fgInstance;       //this instance
65     static const TString fgkDefaultTop;    //top directory path (default)
66     static const TString fgkDataDir;       //data directory
67     static const TString fgkStationDir;    //station directory
68     static const TString fgkBendingDir;    //bending plane directory
69     static const TString fgkNonBendingDir; //non-bending plane directory
70     static const TString fgkSector;        //sector data file name
71     static const TString fgkSectorSpecial; //sector special data file name
72     static const TString fgkSectorSpecial2;//sector special data file name
73     static const TString fgkMotifPrefix;   //motif data file name
74     static const TString fgkMotifSpecialPrefix; //special motif data file name 
75     static const TString fgkPadPosPrefix;  //pad position data file name
76     static const TString fgkDataExt;       //file extension
77     static const TString fgkBergToGCFileName; //name of the file with BergToGC mapping
78     
79     // data members
80     TString  fTop; // top directory path
81     
82
83   ClassDef(AliMpFiles, 1) //File names and paths 
84 };  
85
86 // inline functions
87
88 inline void AliMpFiles::SetTopPath(const TString& topPath)
89 { fTop = topPath; }
90
91 #endif //ALI_MP_FILES_H