Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
ecf82e0e
Commit
ecf82e0e
authored
Dec 18, 2018
by
Simon Spannagel
Browse files
Make file paths read from the config relative to the config, not to the execution folder
parent
0eb03d97
Changes
6
Show whitespace changes
Inline
Side-by-side
src/modules/EventLoaderATLASpix/EventLoaderATLASpix.cpp
View file @
ecf82e0e
...
...
@@ -9,8 +9,8 @@ EventLoaderATLASpix::EventLoaderATLASpix(Configuration config, std::shared_ptr<D
m_timewalkCorrectionFactors
=
m_config
.
getArray
<
double
>
(
"timewalkCorrectionFactors"
,
std
::
vector
<
double
>
());
m_inputDirectory
=
m_config
.
get
<
std
::
string
>
(
"inputDirectory"
);
m_calibrationFile
=
m_config
.
get
<
std
::
string
>
(
"calibrationFile"
,
std
::
string
()
);
m_inputDirectory
=
m_config
.
get
Path
(
"inputDirectory"
);
m_calibrationFile
=
m_config
.
get
Path
(
"calibrationFile"
);
m_clockCycle
=
m_config
.
get
<
double
>
(
"clockCycle"
,
static_cast
<
double
>
(
Units
::
convert
(
6.25
,
"ns"
)));
...
...
src/modules/EventLoaderCLICpix/EventLoaderCLICpix.cpp
View file @
ecf82e0e
...
...
@@ -13,7 +13,7 @@ void EventLoaderCLICpix::initialise() {
// File structure is RunX/CLICpix/RunX.dat
// Take input directory from global parameters
string
inputDirectory
=
m_config
.
get
<
std
::
string
>
(
"inputDirectory"
)
+
"/CLICpix"
;
string
inputDirectory
=
m_config
.
get
Path
(
"inputDirectory"
)
+
"/CLICpix"
;
// Open the root directory
DIR
*
directory
=
opendir
(
inputDirectory
.
c_str
());
...
...
src/modules/EventLoaderCLICpix2/EventLoaderCLICpix2.cpp
View file @
ecf82e0e
...
...
@@ -17,7 +17,7 @@ EventLoaderCLICpix2::EventLoaderCLICpix2(Configuration config, std::shared_ptr<D
void
EventLoaderCLICpix2
::
initialise
()
{
// Take input directory from global parameters
string
inputDirectory
=
m_config
.
get
<
std
::
string
>
(
"inputDirectory"
);
string
inputDirectory
=
m_config
.
get
Path
(
"inputDirectory"
);
// Open the root directory
DIR
*
directory
=
opendir
(
inputDirectory
.
c_str
());
...
...
src/modules/EventLoaderTimepix1/EventLoaderTimepix1.cpp
View file @
ecf82e0e
...
...
@@ -34,7 +34,7 @@ bool EventLoaderTimepix1::sortByTime(string filename1, string filename2) {
void
EventLoaderTimepix1
::
initialise
()
{
// Take input directory from global parameters
m_inputDirectory
=
m_config
.
get
<
std
::
string
>
(
"inputDirectory"
);
m_inputDirectory
=
m_config
.
get
Path
(
"inputDirectory"
);
// Each input directory contains a series of .txt files. Each of these
// contains several events (frames) with different times
...
...
src/modules/EventLoaderTimepix3/EventLoaderTimepix3.cpp
View file @
ecf82e0e
...
...
@@ -18,7 +18,7 @@ EventLoaderTimepix3::EventLoaderTimepix3(Configuration config, std::shared_ptr<D
m_shutterOpen
(
false
)
{
// Take input directory from global parameters
m_inputDirectory
=
m_config
.
get
<
std
::
string
>
(
"inputDirectory"
);
m_inputDirectory
=
m_config
.
get
Path
(
"inputDirectory"
);
m_triggerLatency
=
m_config
.
get
<
double
>
(
"triggerLatency"
,
0.0
);
m_minNumberOfPlanes
=
m_config
.
get
<
int
>
(
"minNumerOfPlanes"
,
1
);
...
...
@@ -26,7 +26,7 @@ EventLoaderTimepix3::EventLoaderTimepix3(Configuration config, std::shared_ptr<D
m_numberPixelHits
=
m_config
.
get
<
size_t
>
(
"number_of_pixelhits"
,
2000
);
// Calibration parameters
calibrationPath
=
m_config
.
get
<
std
::
string
>
(
"calibrationPath"
,
""
);
calibrationPath
=
m_config
.
get
Path
(
"calibrationPath"
,
""
);
threshold
=
m_config
.
get
<
std
::
string
>
(
"threshold"
,
""
);
}
...
...
src/modules/FileReader/FileReader.cpp
View file @
ecf82e0e
...
...
@@ -9,7 +9,7 @@ FileReader::FileReader(Configuration config, std::vector<std::shared_ptr<Detecto
m_readPixels
=
m_config
.
get
<
bool
>
(
"readPixels"
,
true
);
m_readClusters
=
m_config
.
get
<
bool
>
(
"readClusters"
,
false
);
m_readTracks
=
m_config
.
get
<
bool
>
(
"readTracks"
,
false
);
m_fileName
=
m_config
.
get
<
std
::
string
>
(
"fileName"
,
"outputTuples.root"
);
m_fileName
=
m_config
.
get
Path
(
"fileName"
,
"outputTuples.root"
);
m_timeWindow
=
m_config
.
get
<
double
>
(
"timeWindow"
,
static_cast
<
double
>
(
Units
::
convert
(
1.
,
"s"
)));
m_readMCParticles
=
m_config
.
get
<
bool
>
(
"readMCParticles"
,
false
);
// checking if DUT parameter is in the configuration file, if so then check if should only output the DUT
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment