VMC Examples
Version 6.6
Loading...
Searching...
No Matches
examples
macro
g3libs.C
Go to the documentation of this file.
1
//------------------------------------------------
2
// The Virtual Monte Carlo examples
3
// Copyright (C) 2007 - 2014 Ivana Hrivnacova
4
// All rights reserved.
5
//
6
// For the licensing terms see geant4_vmc/LICENSE.
7
// Contact: root-vmc@cern.ch
8
//-------------------------------------------------
9
10
/// \file g3libs.C
11
/// \brief Macro for loading Geant3 libraries
12
13
#if !defined(__CINT__) || defined(__MAKECINT__)
14
15
#include <iostream>
16
17
#include <TSystem.h>
18
#include <TString.h>
19
20
#endif
21
22
namespace
g3libUtilities
{
23
Bool_t
isLibrary
(
const
char
* libName)
24
{
25
/// Helper function which testes the existence of the given library
26
/// \param libName The library name
27
28
if
(TString(gSystem->DynamicPathName(libName, kTRUE)) != TString(
""
))
29
return
kTRUE;
30
else
31
return
kFALSE;
32
}
33
}
34
35
void
g3libs
()
36
{
37
/// Macro function for loading Geant3 libraries
38
39
// VMC library (optional)
40
if
(
g3libUtilities::isLibrary
(
"libVMCLibrary"
) ) {
41
cout <<
"Loading VMC library ..."
<< endl;
42
gSystem->Load(
"libVMCLibrary"
);
43
}
44
45
if
(
g3libUtilities::isLibrary
(
"libdummies"
))
46
gSystem->Load(
"libdummies"
);
47
// libdummies.so needed from geant3_+vmc version 0.5
48
49
// Load geant3 library
50
gSystem->Load(
"libgeant321"
);
51
52
cout <<
"Loading Geant3 libraries ... finished"
<< endl;
53
}
g3libs
void g3libs()
Definition
g3libs.C:35
g3libUtilities
Definition
g3libs.C:22
g3libUtilities::isLibrary
Bool_t isLibrary(const char *libName)
Definition
g3libs.C:23
Generated on Thu Nov 28 2024 11:31:18 for VMC Examples by
1.12.0