IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pranav Sampathkumar
corsika
Commits
43901980
Commit
43901980
authored
3 years ago
by
ralfulrich
Browse files
Options
Downloads
Patches
Plain Diff
more std boost filesystem use
parent
93f844fb
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
corsika/detail/framework/utility/SaveBoostHistogram.inl
+1
-2
1 addition, 2 deletions
corsika/detail/framework/utility/SaveBoostHistogram.inl
examples/cascade_proton_example.cpp
+2
-2
2 additions, 2 deletions
examples/cascade_proton_example.cpp
examples/corsika.cpp
+0
-2
0 additions, 2 deletions
examples/corsika.cpp
with
3 additions
and
6 deletions
corsika/detail/framework/utility/SaveBoostHistogram.inl
+
1
−
2
View file @
43901980
...
@@ -25,8 +25,7 @@ namespace corsika {
...
@@ -25,8 +25,7 @@ namespace corsika {
template
<
class
Axes
,
class
Storage
>
template
<
class
Axes
,
class
Storage
>
inline
void
save_hist
(
boost
::
histogram
::
histogram
<
Axes
,
Storage
>
const
&
h
,
inline
void
save_hist
(
boost
::
histogram
::
histogram
<
Axes
,
Storage
>
const
&
h
,
std
::
string
const
&
filename
,
bool
overwrite
)
{
std
::
string
const
&
filename
,
bool
overwrite
)
{
if
(
boost
::
filesystem
::
status
(
filename
).
type
()
!=
if
(
boost
::
filesystem
::
exists
(
filename
))
{
boost
::
filesystem
::
file_type
::
file_not_found
)
{
if
(
overwrite
)
{
if
(
overwrite
)
{
boost
::
filesystem
::
remove
(
filename
);
boost
::
filesystem
::
remove
(
filename
);
}
else
{
}
else
{
...
...
This diff is collapsed.
Click to expand it.
examples/cascade_proton_example.cpp
+
2
−
2
View file @
43901980
...
@@ -80,7 +80,7 @@ int main() {
...
@@ -80,7 +80,7 @@ int main() {
UniformMagneticField
<
HomogeneousMedium
<
setup
::
EnvironmentInterface
>>>
;
UniformMagneticField
<
HomogeneousMedium
<
setup
::
EnvironmentInterface
>>>
;
world
->
setModelProperties
<
MyHomogeneousModel
>
(
world
->
setModelProperties
<
MyHomogeneousModel
>
(
Medium
::
AirDry1Atm
,
MagneticFieldVector
(
rootCS
,
0
_T
,
0
_T
,
1
_T
),
Medium
::
AirDry1Atm
,
MagneticFieldVector
(
rootCS
,
0
_T
,
0
_T
,
1
_
m
T
),
1
_kg
/
(
1
_m
*
1
_m
*
1
_m
),
1
_kg
/
(
1
_m
*
1
_m
*
1
_m
),
NuclearComposition
(
std
::
vector
<
Code
>
{
Code
::
Hydrogen
},
NuclearComposition
(
std
::
vector
<
Code
>
{
Code
::
Hydrogen
},
std
::
vector
<
float
>
{(
float
)
1.
}));
std
::
vector
<
float
>
{(
float
)
1.
}));
...
@@ -92,7 +92,7 @@ int main() {
...
@@ -92,7 +92,7 @@ int main() {
stack
.
clear
();
stack
.
clear
();
const
Code
beamCode
=
Code
::
Proton
;
const
Code
beamCode
=
Code
::
Proton
;
const
HEPMassType
mass
=
Proton
::
mass
;
const
HEPMassType
mass
=
Proton
::
mass
;
const
HEPEnergyType
E0
=
10
00
_GeV
;
const
HEPEnergyType
E0
=
2
00
_GeV
;
double
theta
=
0.
;
double
theta
=
0.
;
double
phi
=
0.
;
double
phi
=
0.
;
...
...
This diff is collapsed.
Click to expand it.
examples/corsika.cpp
+
0
−
2
View file @
43901980
...
@@ -88,13 +88,11 @@ void registerRandomStreams(int seed) {
...
@@ -88,13 +88,11 @@ void registerRandomStreams(int seed) {
RNGManager
<>::
getInstance
().
registerRandomStream
(
"pythia"
);
RNGManager
<>::
getInstance
().
registerRandomStream
(
"pythia"
);
RNGManager
<>::
getInstance
().
registerRandomStream
(
"urqmd"
);
RNGManager
<>::
getInstance
().
registerRandomStream
(
"urqmd"
);
RNGManager
<>::
getInstance
().
registerRandomStream
(
"proposal"
);
RNGManager
<>::
getInstance
().
registerRandomStream
(
"proposal"
);
if
(
seed
==
0
)
{
if
(
seed
==
0
)
{
std
::
random_device
rd
;
std
::
random_device
rd
;
seed
=
rd
();
seed
=
rd
();
cout
<<
"new random seed (auto) "
<<
seed
<<
endl
;
cout
<<
"new random seed (auto) "
<<
seed
<<
endl
;
}
}
RNGManager
<>::
getInstance
().
setSeed
(
seed
);
RNGManager
<>::
getInstance
().
setSeed
(
seed
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment