EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
FairGeoLoader.cxx
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file FairGeoLoader.cxx
1
/***************************************************************************
2
FairGeoLoader.cxx - description
3
-------------------
4
begin : Thu Jun 17 2004
5
copyright : (C) 2004 by ilse koenig , M. Al-turany
6
email : m.al-turany@gsi.de
7
***************************************************************************/
8
9
#include "
FairGeoLoader.h
"
10
11
#include "
FairGeoInterface.h
"
12
#include "
FairGeoRootBuilder.h
"
13
//#include "FairGeoG3Builder.h"
14
15
#include "TGeoManager.h"
16
17
#include <iostream>
18
#include <cstdlib>
19
20
using
std::cout;
21
using
std::endl;
22
23
FairGeoLoader
*
FairGeoLoader::fgInstance
=0;
24
//_____________________________________________________________________________
25
FairGeoLoader
*
FairGeoLoader::Instance
()
26
{
27
return
fgInstance
;
28
}
29
//_____________________________________________________________________________
30
FairGeoLoader::FairGeoLoader
()
31
:TNamed(),
32
fInterface(NULL),
33
fGeoBuilder(NULL)
34
{
35
fgInstance
=
this
;
36
}
37
//_____________________________________________________________________________
38
FairGeoLoader::FairGeoLoader
(
const
char
*
Name
,
const
char
*
title
)
39
:TNamed(Name,title),
40
fInterface(NULL),
41
fGeoBuilder(NULL)
42
{
43
if
(
fgInstance
) {
44
Fatal(
"FairGeoLoader"
,
"Singleton instance already exists."
);
45
return
;
46
}
47
fgInstance
=
this
;
48
fInterface
=
new
FairGeoInterface
;
49
if
( strncmp(Name,
"TGeo"
,4) == 0 ) {
50
TGeoManager* geom =
new
TGeoManager(
"FAIRGeom"
,
"FAIR geometry"
);
51
fGeoBuilder
=
new
FairGeoRootBuilder
(
"TGeo builder"
,
"geometry builder"
);
52
((
FairGeoRootBuilder
*)
fGeoBuilder
)->setGeoManager(geom);
53
}
else
if
( strncmp(Name,
"G3Native"
,8) == 0) {
54
cout <<
"-I- FairGeoLoader() : Native G3 Geometry is used: This option is not supported any more!"
<< endl;
55
exit
(0);
56
// gGeoManager = NULL;
57
// fGeoBuilder=new FairGeoG3Builder("G3 builder","geometry builder");
58
}
59
60
fInterface
->
setGeomBuilder
(
fGeoBuilder
);
61
62
}
63
//_____________________________________________________________________________
64
FairGeoLoader::~FairGeoLoader
()
65
{
66
delete
fInterface
;
67
68
}
69
//_____________________________________________________________________________
70
71
ClassImp
(
FairGeoLoader
)
EicRoot
blob
master
geobase
FairGeoLoader.cxx
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:36
using
1.8.2 with
EIC GitHub integration