PandaRoot
PndSttMapCreator.h
Go to the documentation of this file.
1 #ifndef PNDSTTMAPCREATOR_H
2 #define PNDSTTMAPCREATOR_H
3 
4 #include <iostream>
5 #include <map>
6 #include "TObject.h"
7 #include "PndSttGeometryMap.h"
8 
10 class PndSttTube;
11 class PndGeoSttPar;
12 class FairGeoNode;
13 
14 class PndSttMapCreator : public TObject {
15  public:
17  PndSttMapCreator(Int_t geoType);
20 
21  void SetGeneralParameters();
22 
23  // TO BE IMPLEMENTED WITH GEO TYPE n
24  PndSttTubeParameters *CreateTubeParameters(FairGeoNode *pnode);
25  Int_t FillSttTubeParameters(PndGeoSttPar *par, TList *volList);
27 
28  TClonesArray *FillTubeArray();
29  Int_t GetTubeIDFromName(TString name);
31  TString GetPathFromTubeID(Int_t tubeid, Bool_t isCopy);
32  TString GetNameFromPath(TString path);
33  Int_t GetTubeIDFromPath(TString path);
34  PndSttTube *GetTubeFromTubeID(Int_t tubeid);
35 
37 
38  private:
39  Int_t fGeoType;
40  PndGeoSttPar *fSttParameters;
41  Double_t fTubeInRad, fTubeOutRad;
42 
43  // fGeoType1
44  std::map<int, int> copy_map;
45 
47  PndSttMapCreator &operator=(const PndSttMapCreator &) { return *this; };
48 
49  // GEO TYPE 1
50  PndSttTubeParameters *CreateTubeParametersGeoType1(FairGeoNode *pnode);
51  Int_t FillSttTubeParametersGeoType1(PndGeoSttPar *par, TList *volList);
52  TClonesArray *FillTubeArrayGeoType1();
53  TString GetNameFromPathGeoType1(TString path);
54  Int_t GetTubeIDFromNameGeoType1(TString name);
55  PndSttTube *GetTubeFromParametersToFillGeoType1(PndSttTubeParameters *parms);
56  TString GetPathFromTubeIDGeoType1(Int_t tubeid, Bool_t isCopy);
57  Int_t GetTubeIDFromPathGeoType1(TString path);
58  PndSttTube *GetTubeFromTubeIDGeoType1(Int_t tubeid);
59 
60  // GEO TYPE 2 This should not be done like this. There should be individual creators with common interface TS
61  PndSttTubeParameters *CreateTubeParametersGeoType2(FairGeoNode *pnode);
62  TClonesArray *FillTubeArrayGeoType2();
63  TString GetNameFromPathGeoType2(TString path);
64  Int_t GetTubeIDFromNameGeoType2(TString name);
65  PndSttTube *GetTubeFromParametersToFillGeoType2(PndSttTubeParameters *parms);
66  TString GetPathFromTubeIDGeoType2(Int_t tubeid, Bool_t isCopy);
67  Int_t GetTubeIDFromPathGeoType2(TString path);
68  PndSttTube *GetTubeFromTubeIDGeoType2(Int_t tubeid);
69 
70  protected:
71  TClonesArray *fTubeArray;
74 
75  ClassDef(PndSttMapCreator, 1)
76 };
77 
78 #endif
Int_t FillSttTubeParametersType2(PndGeoSttPar *par)
PndSttGeometryMap * GetGeometryMap()
PndSttGeometryMap * fMap
PndSttTube * fSttTube
TClonesArray * FillTubeArray()
TClonesArray * fTubeArray
Int_t FillSttTubeParameters(PndGeoSttPar *par, TList *volList)
Int_t GetTubeIDFromPath(TString path)
void SetGeneralParameters()
PndSttTube * GetTubeFromTubeID(Int_t tubeid)
PndSttTube * GetTubeFromParametersToFill(PndSttTubeParameters *parms)
PndSttTubeParameters * CreateTubeParameters(FairGeoNode *pnode)
Int_t GetTubeIDFromName(TString name)
TString GetPathFromTubeID(Int_t tubeid, Bool_t isCopy)
TString GetNameFromPath(TString path)