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
EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
BeastMagneticField
delphes_EIC
Doxygen_Assist
east
eic-smear
EicRoot
blob
master
base
cbmbase
cbmdata
dbase
eic
ayk
base
EicAsciiBoxGenerator.cxx
EicAsciiBoxGenerator.h
eicbaseLinkDef.h
EicBlackHole.cxx
EicBlackHole.h
EicBoxGenerator.cxx
EicBoxGenerator.h
EicContFact.cxx
EicContFact.h
EicDetector.cxx
EicDetector.h
EicDetName.cxx
EicDetName.h
EicDigiHitProducer.cxx
EicDigiHitProducer.h
EicDigiParData.cxx
EicDigiParData.h
EicEnergyMonitor.cxx
EicEnergyMonitor.h
EicEventManager.cxx
EicEventManager.h
EicFieldGradDetector.cxx
EicFieldGradDetector.h
EicFieldMapDetector.cxx
EicFieldMapDetector.h
EicFileNameExpansion.cxx
EicFileNameExpansion.h
EicGeo.cxx
EicGeo.h
EicGeoMap.cxx
EicGeoMap.h
EicGeoPar.cxx
EicGeoPar.h
EicGeoParData.cxx
EicGeoParData.h
EicLibrary.cxx
EicLibrary.h
EicMCApplication.cxx
EicMCApplication.h
EicMoCaPoint.cxx
EicMoCaPoint.h
EicNamePatternHub.cxx
EicNamePatternHub.h
EicRunAna.cxx
EicRunAna.h
EicRunDigi.cxx
EicRunDigi.h
EicRunSim.cxx
EicRunSim.h
EicUnits.h
cad
calorimetry
detectors
event
field
htc
htree
infrastructure
jana
proto
tracking
eventdisplay
examples
fairtools
field
gconfig
geane
genfit
GenfitTools
geobase
geometry
input
littrack
parbase
passive
pCDR-2018
pid
pnddata
PndTools
rich
trackbase
eicsmear-jetexample
eicsmeardetectors
EicToyModel
estarlight
Fun4All-lmon
fun4all_coresoftware
fun4all_eic_qa
fun4all_eic_tutorials
fun4all_eicdetectors
fun4all_eicmacros
fun4all_g4jleic
fun4all_GenFit
fun4all_macros
fun4all_tutorials
g4exampledetector
g4lblvtx
online_distribution
PEPSI
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
EicLibrary.cxx
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file EicLibrary.cxx
1
//
2
// AYK (ayk@bnl.gov), 2014/09/04
3
//
4
// Few common-use library routines with no particular class affiliation;
5
//
6
7
#include <stdlib.h>
8
9
#include <
EicLibrary.h
>
10
11
// =======================================================================================
12
13
//
14
// Basically a signature, that file name expansion is not needed at all (absolute
15
// path or a path with respect to the currect directory);
16
//
17
18
bool
IsSortOfAbsolutePath
(
const
char
*fileName)
19
{
20
if
(!fileName)
return
false
;
21
22
// Make life easier;
23
TString str(fileName);
24
25
return
(str.BeginsWith(
"/"
) || str.BeginsWith(
"./"
) || str.BeginsWith(
"../"
));
26
}
// IsSortOfAbsolutePath()
27
28
// ---------------------------------------------------------------------------------------
29
30
TString
ExpandedFileName
(
const
char
*prefix,
const
char
*fileName)
31
{
32
if
(!fileName)
return
TString(
""
);
33
34
// Well, I guess in this case just ignore prefix;
35
if
(
IsSortOfAbsolutePath
(fileName))
return
TString(fileName);
36
37
TString expandedFileName(fileName);
38
39
// Prepend prefix if given; THINK: take care to put '/' if missing?;
40
if
(prefix) expandedFileName = prefix + expandedFileName;
41
//expandedFileName = TString(prefix) + (prefix[strlen(prefix)-1] == '/' ? "" : "/") +
42
// expandedFileName;
43
44
return
TString(getenv(
"VMCWORKDIR"
)) +
"/"
+ expandedFileName;
45
}
// ExpandedFileName()
46
47
// ---------------------------------------------------------------------------------------
48
49
TString
ExpandedFileName
(
const
char
*fileName)
50
{
51
return
ExpandedFileName
(0, fileName);
52
}
// ExpandedFileName()
53
54
// =======================================================================================
EicRoot
blob
master
eic
base
EicLibrary.cxx
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:33
using
1.8.2 with
EIC GitHub integration