10 #include <TObjString.h>
25 int main(
int argc,
char* argv[]) {
30 TFile
file(filename.c_str(),
"recreate");
31 TTree
tree(
"EICTree",
"Output direct from pythia!");
33 factory.Branch(tree,
"event");
35 std::stringstream stream;
40 erhic::EventPythia*
event = factory.Create();
41 event->SetN(tree.GetEntries() + 1);
44 std::cout << std::endl;
60 static struct option long_options[] = {
66 {
"out", required_argument, NULL,
'o'},
72 while((code = getopt_long(argc, argv,
"o:r:",
73 long_options, &option_index)) not_eq -1) {
76 if(long_options[option_index].flag not_eq 0) {
79 printf(
"option %s", long_options[option_index].
name);
81 printf (
" with arg %s", optarg);
114 std::stringstream stream;
117 stream <<
pari(1) * 1000.;
118 text.SetString(stream.str().c_str());
119 file.WriteObject(&text,
"crossSection");
124 text.SetString(stream.str().c_str());
125 file.WriteObject(&text,
"nEvents");
129 stream <<
ngen(0, 3);
130 text.SetString(stream.str().c_str());
131 file.WriteObject(&text,
"nTrials");