PandaRoot
PndSttMapCreator.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 #ifndef PNDSTTMAPCREATOR_H
14 #define PNDSTTMAPCREATOR_H
15 
16 #include <iostream>
17 #include <map>
18 #include "TObject.h"
19 #include "PndSttGeometryMap.h"
20 
22 class PndSttTube;
23 class PndGeoSttPar;
24 class FairGeoNode;
25 
26 class PndSttMapCreator : public TObject {
27  public:
29  PndSttMapCreator(Int_t geoType);
32 
33  void SetGeneralParameters();
34 
35  // TO BE IMPLEMENTED WITH GEO TYPE n
36  PndSttTubeParameters *CreateTubeParameters(FairGeoNode *pnode);
37  Int_t FillSttTubeParameters(PndGeoSttPar *par, TList *volList);
39 
40  TClonesArray *FillTubeArray();
41  Int_t GetTubeIDFromName(TString name);
43  TString GetPathFromTubeID(Int_t tubeid, Bool_t isCopy);
44  TString GetNameFromPath(TString path);
45  Int_t GetTubeIDFromPath(TString path);
46  PndSttTube *GetTubeFromTubeID(Int_t tubeid);
47 
49 
50  private:
51  Int_t fGeoType;
52  PndGeoSttPar *fSttParameters;
53  Double_t fTubeInRad, fTubeOutRad;
54 
55  // fGeoType1
56  std::map<int, int> copy_map;
57 
59  PndSttMapCreator &operator=(const PndSttMapCreator &) { return *this; };
60 
61  // GEO TYPE 1
62  PndSttTubeParameters *CreateTubeParametersGeoType1(FairGeoNode *pnode);
63  Int_t FillSttTubeParametersGeoType1(PndGeoSttPar *par, TList *volList);
64  TClonesArray *FillTubeArrayGeoType1();
65  TString GetNameFromPathGeoType1(TString path);
66  Int_t GetTubeIDFromNameGeoType1(TString name);
67  PndSttTube *GetTubeFromParametersToFillGeoType1(PndSttTubeParameters *parms);
68  TString GetPathFromTubeIDGeoType1(Int_t tubeid, Bool_t isCopy);
69  Int_t GetTubeIDFromPathGeoType1(TString path);
70  PndSttTube *GetTubeFromTubeIDGeoType1(Int_t tubeid);
71 
72  // GEO TYPE 2 This should not be done like this. There should be individual creators with common interface TS
73  PndSttTubeParameters *CreateTubeParametersGeoType2(FairGeoNode *pnode);
74  TClonesArray *FillTubeArrayGeoType2();
75  TString GetNameFromPathGeoType2(TString path);
76  Int_t GetTubeIDFromNameGeoType2(TString name);
77  PndSttTube *GetTubeFromParametersToFillGeoType2(PndSttTubeParameters *parms);
78  TString GetPathFromTubeIDGeoType2(Int_t tubeid, Bool_t isCopy);
79  Int_t GetTubeIDFromPathGeoType2(TString path);
80  PndSttTube *GetTubeFromTubeIDGeoType2(Int_t tubeid);
81 
82  protected:
83  TClonesArray *fTubeArray;
86 
87  ClassDef(PndSttMapCreator, 1)
88 };
89 
90 #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)