Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
externals
mirroring
DD4hep
Commits
54dcf463
Commit
54dcf463
authored
1 year ago
by
Andre Sailer
Browse files
Options
Downloads
Patches
Plain Diff
HepMCFileReader: set_run_info only in latest HepMC
parent
76f24549
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DDG4/hepmc/HepMC3FileReader.cpp
+3
-0
3 additions, 0 deletions
DDG4/hepmc/HepMC3FileReader.cpp
with
3 additions
and
0 deletions
DDG4/hepmc/HepMC3FileReader.cpp
+
3
−
0
View file @
54dcf463
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include
"DDG4/RunParameters.h"
#include
"DDG4/RunParameters.h"
#include
<HepMC3/ReaderFactory.h>
#include
<HepMC3/ReaderFactory.h>
#include
<HepMC3/Version.h>
/// Namespace for the AIDA detector description toolkit
/// Namespace for the AIDA detector description toolkit
namespace
dd4hep
{
namespace
dd4hep
{
...
@@ -127,6 +128,7 @@ HEPMC3FileReader::HEPMC3FileReader(const std::string& nam)
...
@@ -127,6 +128,7 @@ HEPMC3FileReader::HEPMC3FileReader(const std::string& nam)
{
{
printout
(
INFO
,
"HEPMC3FileReader"
,
"Created file reader. Try to open input %s"
,
nam
.
c_str
());
printout
(
INFO
,
"HEPMC3FileReader"
,
"Created file reader. Try to open input %s"
,
nam
.
c_str
());
m_reader
=
HepMC3
::
deduce_reader
(
nam
);
m_reader
=
HepMC3
::
deduce_reader
(
nam
);
#if HEPMC3_VERSION_CODE >= 3002006
// to get the runInfo in the Ascii reader we have to force HepMC to read the first event
// to get the runInfo in the Ascii reader we have to force HepMC to read the first event
m_reader
->
skip
(
1
);
m_reader
->
skip
(
1
);
// then we get the run info (shared pointer)
// then we get the run info (shared pointer)
...
@@ -137,6 +139,7 @@ HEPMC3FileReader::HEPMC3FileReader(const std::string& nam)
...
@@ -137,6 +139,7 @@ HEPMC3FileReader::HEPMC3FileReader(const std::string& nam)
m_reader
=
HepMC3
::
deduce_reader
(
nam
);
m_reader
=
HepMC3
::
deduce_reader
(
nam
);
// and set the run info object now
// and set the run info object now
m_reader
->
set_run_info
(
runInfo
);
m_reader
->
set_run_info
(
runInfo
);
#endif
m_directAccess
=
false
;
m_directAccess
=
false
;
}
}
...
...
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