HepMC3 event record library
test
testRootTree300.cc
1
// -*- C++ -*-
2
//
3
// This file is part of HepMC
4
// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
5
//
6
#include "
HepMC3/GenEvent.h
"
7
#include "
HepMC3/ReaderRootTree.h
"
8
using namespace
HepMC3
;
9
int
main
()
10
{
11
ReaderRootTree
inputA(
"inputRootTree300.root"
);
12
if
(inputA.failed())
return
1;
13
int
particles=0;
14
while
( !inputA.failed() )
15
{
16
GenEvent
evt(Units::GEV,Units::MM);
17
inputA.read_event(evt);
18
if
( inputA.failed() ) {
19
printf(
"End of file reached. Exit.\n"
);
20
break
;
21
}
22
particles+=evt.particles().size();
23
evt.clear();
24
}
25
inputA.close();
26
return
(particles!=1200);
27
}
GenEvent.h
Definition of class GenEvent.
HepMC3::GenEvent
Stores event-related information.
Definition:
GenEvent.h:41
HepMC3
HepMC3 main namespace.
Definition:
AnalysisExample.h:19
ReaderRootTree.h
Definition of class ReaderRootTree.
HepMC3::ReaderRootTree
GenEvent I/O parsing and serialization for root files based on root TTree.
Definition:
ReaderRootTree.h:35
main
int main(int argc, char **argv)
Definition:
rootIOTree_example_read.cc:23
Generated on Mon Jul 27 2020 00:00:00 for HepMC3 event record library by
1.8.18