25 RegisterJetScapeModule<JetScapeWriterStream<ofstream>>
28 RegisterJetScapeModule<JetScapeWriterStream<ogzstream>>
33 SetOutputFileName(m_file_name_out);
43 VERBOSE(3) <<
"Run JetScapeWriterStream<T>: Write header of event # "
44 << GetCurrentEvent() <<
" ...";
47 std::ostringstream oss;
49 oss << GetId() <<
"sigmaGen " << GetHeader().GetSigmaGen();
50 WriteComment(oss.str());
52 oss << GetId() <<
"sigmaErr " << GetHeader().GetSigmaErr();
53 WriteComment(oss.str());
55 oss << GetId() <<
"weight " << GetHeader().GetEventWeight();
56 WriteComment(oss.str());
58 if (GetHeader().GetNpart() > -1) {
60 oss << GetId() <<
"Npart " << GetHeader().GetNpart();
61 WriteComment(oss.str());
63 if (GetHeader().GetNcoll() > -1) {
65 oss << GetId() <<
"Ncoll " << GetHeader().GetNcoll();
66 WriteComment(oss.str());
68 if (GetHeader().GetTotalEntropy() > -1) {
70 oss << GetId() <<
"TotalEntropy " << GetHeader().GetTotalEntropy();
71 WriteComment(oss.str());
74 if (GetHeader().GetEventPlaneAngle() > -999) {
76 oss << GetId() <<
"EventPlaneAngle " << GetHeader().GetEventPlaneAngle();
77 WriteComment(oss.str());
102 JSINFO <<
"JetScape Stream Writer initialized with output file = "
103 << GetOutputFileName();
120 JSDEBUG <<
"Write XML Main to output file. XML file = "
124 WriteComment(
"Init XML Main file used : " +
130 JSDEBUG <<
"Write XML User to output file. XML file = "
134 WriteComment(
"Init XML User file used : " +
141 auto pShower = ps.lock();
146 "Parton Shower in JetScape format to be used later by GTL graph:");
151 for (nIt = pShower->nodes_begin(), nEnd = pShower->nodes_end(); nIt != nEnd;
153 WriteWhiteSpace(
"[" +
to_string(nIt->id()) +
"] V");
154 Write(pShower->GetVertex(*nIt));
158 for (eIt = pShower->edges_begin(), eEnd = pShower->edges_end(); eIt != eEnd;
160 WriteWhiteSpace(
"[" +
to_string(eIt->source().id()) +
"]=>[" +
162 Write(pShower->GetParton(*eIt));