Page MenuHomeHEPForge

check_hepmc.cc
No OneTemporary

Size
669 B
Referenced Files
None
Subscribers
None

check_hepmc.cc

/**
* \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

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)

Event Timeline