IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
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
Model registry
Operate
Environments
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
Air Shower Physics
corsika
Commits
2fc039c2
Commit
2fc039c2
authored
4 years ago
by
Remy Prechelt
Browse files
Options
Downloads
Patches
Plain Diff
Add GetOutput() method to base interface.
parent
bbe4d337
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!317
Output infrastructure and Python analysis library.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Outputs/BaseOutput.h
+5
-0
5 additions, 0 deletions
Outputs/BaseOutput.h
Outputs/ObservationPlaneWriterParquet.h
+8
-8
8 additions, 8 deletions
Outputs/ObservationPlaneWriterParquet.h
with
13 additions
and
8 deletions
Outputs/BaseOutput.h
+
5
−
0
View file @
2fc039c2
...
@@ -52,6 +52,11 @@ namespace corsika::output {
...
@@ -52,6 +52,11 @@ namespace corsika::output {
* Get the configuration of this output.
* Get the configuration of this output.
*/
*/
virtual
YAML
::
Node
GetConfig
()
const
=
0
;
virtual
YAML
::
Node
GetConfig
()
const
=
0
;
/**
* Get final text outputs for the config file.
*/
virtual
YAML
::
Node
GetOutput
()
=
0
;
};
};
}
// namespace corsika::output
}
// namespace corsika::output
This diff is collapsed.
Click to expand it.
Outputs/ObservationPlaneWriterParquet.h
+
8
−
8
View file @
2fc039c2
...
@@ -52,20 +52,22 @@ namespace corsika::output {
...
@@ -52,20 +52,22 @@ namespace corsika::output {
/**
/**
* Called at the start of each event/shower.
* Called at the start of each event/shower.
*/
*/
void
StartOfEvent
()
final
{
++
event_
;
void
StartOfEvent
()
final
{
++
event_
;
}
}
/**
/**
* Called at the end of each event/shower.
* Called at the end of each event/shower.
*/
*/
void
EndOfEvent
()
final
{
void
EndOfEvent
()
final
{}
}
/**
/**
* Called at the end of each run.
* Called at the end of each run.
*/
*/
void
EndOfRun
()
final
{
streamer_
.
Close
();
void
EndOfRun
()
final
{
streamer_
.
Close
();
}
}
/**
* Get final text outputs for the config file.
*/
YAML
::
Node
GetOutput
()
final
{
return
YAML
::
Node
();
}
protected
:
protected
:
/**
/**
...
@@ -79,10 +81,8 @@ namespace corsika::output {
...
@@ -79,10 +81,8 @@ namespace corsika::output {
// write the next row
// write the next row
writer_
<<
event_
<<
static_cast
<
int
>
(
particles
::
GetPDG
(
pid
))
<<
energy
/
1
_eV
writer_
<<
event_
<<
static_cast
<
int
>
(
particles
::
GetPDG
(
pid
))
<<
energy
/
1
_eV
<<
distance
/
1
_m
<<
parquet
::
EndRow
;
<<
distance
/
1
_m
<<
parquet
::
EndRow
;
}
}
std
::
string
const
name_
;
///< The name of this output.
std
::
string
const
name_
;
///< The name of this output.
private
:
private
:
...
...
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