EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
BeastMagneticField
delphes_EIC
Doxygen_Assist
east
eic-smear
EicRoot
eicsmear-jetexample
eicsmeardetectors
EicToyModel
estarlight
Fun4All-lmon
fun4all_coresoftware
blob
master
calibrations
generators
decayFinder
FermiMotionAfterburner
flowAfterburner
hijing
JETSCAPE
JEWEL
phhepmc
PHPythia6
PHPythia8
PHSartre
sHEPGen
sHijing
cfortran.h
getaddr.cxx
ghijcrdn.F
ghijjet1.F
ghijjet2.F
ghijjet4.F
ghimain1.F
ghimain2.F
ghiparnt.F
ghistrng.F
granseed.F
HijCrdn.h
Hijing.cxx
HijJet1.h
HijJet2.h
HijJet4.h
HiMain1.h
HiMain2.h
HiParnt.h
HiStrng.h
RanSeed.h
xml_test.C
offline
simulation
fun4all_eic_qa
fun4all_eic_tutorials
fun4all_eicdetectors
fun4all_eicmacros
fun4all_g4jleic
fun4all_GenFit
fun4all_macros
fun4all_tutorials
g4exampledetector
g4lblvtx
online_distribution
PEPSI
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
xml_test.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file xml_test.C
1
// Allows the user to generate hijing events and store the results in
2
// a HepMC file.
3
//
4
// Inspired by code from ATLAS. Thanks!
5
//
6
#include <iostream>
7
#include <cstdlib>
8
#include <string>
9
#include <memory>
10
#include <vector>
11
#include <numeric>
12
#include <cmath>
13
14
#include <boost/property_tree/ptree.hpp>
15
#include <boost/property_tree/xml_parser.hpp>
16
#include <boost/foreach.hpp>
17
#include <boost/lexical_cast.hpp>
18
#include <boost/algorithm/string.hpp>
19
20
#define f2cFortran
21
#define gFortran
22
#include "
cfortran.h
"
23
24
using namespace
boost;
25
using namespace
std;
26
27
float
28
atl_ran
(
int
*)
29
{
30
return
0.0;
31
}
32
// This prevents cppcheck to flag the next line as error
33
// cppcheck-suppress *
34
FCALLSCFUN1
(
FLOAT
,
atl_ran
, ATL_RAN,
atl_ran
, PINT)
35
36
using namespace boost::property_tree;
37
38
int
39
main
()
40
{
41
iptree pt, null;
42
43
std::ifstream
config_file
(
"xml_test.xml"
);
44
if
(config_file)
45
{
46
read_xml (config_file, pt);
47
}
48
49
iptree &
it
= pt.get_child(
"HIJING.FASTJET"
, null);
50
BOOST_FOREACH(
iptree::value_type
&
v
, it)
51
{
52
if
(to_upper_copy(v.first) !=
"ALGORITHM"
)
continue
;
53
string
name
= v.second.get(
"NAME"
,
"ANTIKT"
);
54
float
R
= v.second.get(
"R"
,0.4);
55
cout << name <<
" "
<< R << endl;
56
}
57
58
return
0;
59
}
fun4all_coresoftware
blob
master
generators
sHijing
xml_test.C
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:42
using
1.8.2 with
EIC GitHub integration