EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EicMediaHub.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EicMediaHub.h
1 //
2 // AYK (ayk@bnl.gov), 2014/03/11
3 //
4 // EicRoot media interface to TGeo, related FairRoot stuff & Co;
5 //
6 
7 #include <map>
8 
9 #include <TObject.h>
10 #include <TString.h>
11 
12 #include <TGeoMedium.h>
13 
14 #include <FairGeoLoader.h>
15 #include <FairGeoInterface.h>
16 #include <FairGeoMedia.h>
17 #include <FairGeoBuilder.h>
18 
19 #if _LATER_
20 #include <EicStlKey.h>
21 #endif
22 
23 #ifndef _EIC_MEDIA_HUB_
24 #define _EIC_MEDIA_HUB_
25 
26 #if _LATER_
27 typedef std::map<const EicStlKey*, const TGeoMedium*, bool(*)(const EicStlKey*, const EicStlKey*)> mEntry;
28 #endif
29 
30 class EicMediaHub: public TObject {
31  // Do a better access later;
32  friend class EicStlFile;
33 
34  public:
35  EicMediaHub(char *mediaName);
37 #if _LATER_
38  , fMediaMap(0)
39 #endif
40  {};
42 
46  TGeoMedium *GetMedium(const char *medium);
47 
49  TGeoMedium *fSingleMedium;
50 
52  TString fMediaName;
53 
54  void Init();
55 
61  int importMediaMapFile(TString &mediaMapFileName);
62 
63  private:
66 
68  //*! FairRoot geo interface media pointer */
70 
72 
73 #if _LATER_
74  mEntry *fMediaMap;
75 #endif
76 
77  ClassDef(EicMediaHub,2)
78 };
79 
80 #endif