Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F19251581
check_hepmc.cc
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
669 B
Referenced Files
None
Subscribers
None
check_hepmc.cc
View Options
/**
* \authors The HEJ collaboration (see AUTHORS for details)
* \date 2019
* \copyright GPLv2 or later
*/
#include
<iostream>
#include
<stdexcept>
#include
"HepMC/ReaderAscii.h"
static
constexpr
double
ep
=
1e-3
;
int
main
(
int
argn
,
char
**
argv
)
{
if
(
argn
!=
2
){
std
::
cerr
<<
"Usage: check_hepmc hepmc_file
\n
"
;
return
EXIT_FAILURE
;
}
HepMC
::
ReaderAscii
input
{
argv
[
1
]};
if
(
input
.
failed
())
throw
std
::
runtime_error
{
"failed to open HepMC file"
};
while
(
true
){
HepMC
::
GenEvent
ev
{};
if
(
!
input
.
read_event
(
ev
)
||
ev
.
event_number
()
==
0
)
break
;
if
(
input
.
failed
())
throw
std
::
runtime_error
{
"failed to read HepMC event"
};
}
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Tue, Sep 30, 6:08 AM (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6490747
Default Alt Text
check_hepmc.cc (669 B)
Attached To
Mode
rHEJ HEJ
Attached
Detach File
Event Timeline
Log In to Comment