22 HEPMC3_WARNING(
"WriterHEPEVT::WriterHEPEVT: HEPEVT format is outdated. Please use HepMC3 format instead." )
29 HEPMC3_WARNING(
"WriterHEPEVT::WriterHEPEVT: HEPEVT format is outdated. Please use HepMC3 format instead." )
37 char* cursor=&(buf[0]);
51 unsigned long length = cursor - &(buf[0]);
60 unsigned long length = cursor - &(buf[0]);
75 std::ofstream* ofs =
dynamic_cast<std::ofstream*
>(
m_stream);
76 if (ofs && !ofs->is_open())
return;
77 if (ofs) ofs->close();
82 return (
bool)
m_file.rdstate();
static double m(const int &index)
Get generated mass.
Definition of class WriterHEPEVT.
static int last_child(const int &index)
Get index of last daughter.
std::ofstream m_file
Output file.
static double z(const int &index)
Get Z Production vertex.
char * hepevtbuffer
Pointer to HEPEVT Fortran common block/C struct.
#define HEPMC3_WARNING(MESSAGE)
Macro for printing HEPMC3_HEPMC3_WARNING messages.
static double y(const int &index)
Get Y Production vertex.
static double t(const int &index)
Get production time.
int m_events_count
Events count. Needed to generate unique object name.
static int status(const int &index)
Get status code.
static int event_number()
Get event number.
static double x(const int &index)
Get X Production vertex.
static double pz(const int &index)
Get Z momentum.
virtual void write_hepevt_particle(int index, bool iflong=true)
Write particle to file.
static double e(const int &index)
Get Energy.
bool get_vertices_positions_present() const
get flag if vertex positions are available. The flag is deduced from m_options. If the m_options have...
WriterHEPEVT(const std::string &filename)
Default constructor.
static void set_hepevt_address(char *c)
Set Fortran block address.
std::ostream * m_stream
Output stream.
virtual void write_hepevt_event_header()
Write event header to file.
static bool fix_daughters()
Tries to fix list of daughters.
Stores event-related information.
void close() override
Close file stream.
void write_event(const GenEvent &evt) override
Write event to file.
static double py(const int &index)
Get Y momentum.
Fortran common block HEPEVT.
static int first_child(const int &index)
Get index of 1st daughter.
void set_vertices_positions_present(bool iflong)
set flag if vertex positions are available. Effectively this adds or removes key "vertices_positions_...
static int id(const int &index)
Get PDG particle id.
bool failed() override
Get stream error state flag.
Definition of static class Print.
static bool GenEvent_to_HEPEVT(const GenEvent *evt)
Convert GenEvent to HEPEVT.
static int first_parent(const int &index)
Get index of 1st mother.
static double px(const int &index)
Get X momentum.
static int last_parent(const int &index)
Get index of last mother.
std::map< std::string, std::string > m_options
options
Definition of class HEPEVT_Wrapper.
static int number_entries()
Get number of entries.