HPS-MC
stdhep_util.cpp File Reference
#include <stdhep_util.hh>
#include <stdhep_mcfio.h>
#include <math.h>
#include <stdhep.h>
#include <hepev4.h>
#include <stdio.h>

Go to the source code of this file.

Functions

int read_stdhep (vector< stdhep_entry > *new_event)
 
void read_stdhep (stdhep_event *new_event)
 
void write_stdhep (vector< stdhep_entry > *new_event, int nevhep)
 
void write_stdhep (stdhep_event *new_event)
 
void add_filler_particle (vector< stdhep_entry > *new_event)
 
int append_stdhep (vector< stdhep_entry > *event, const vector< stdhep_entry > *new_event)
 
int open_read (char *filename, int istream, int n_events)
 
void open_write (char *filename, int ostream, int n_events)
 
bool read_next (int istream)
 
void close_write (int ostream)
 
void write_file (int ostream)
 
void close_read (int istream)
 
void print_entry (stdhep_entry entry)
 

Variables

bool xdr_init_done = false
 
bool has_hepev4 = false
 
static vector< stdhep_entry * > vect_for_Memoery_Release
 

Function Documentation

◆ add_filler_particle()

void add_filler_particle ( vector< stdhep_entry > *  new_event)

< stable particle

< photon

Parameters
new_eventadd a 10 MeV photon in the beam direction

Definition at line 128 of file stdhep_util.cpp.

◆ append_stdhep()

int append_stdhep ( vector< stdhep_entry > *  event,
const vector< stdhep_entry > *  new_event 
)

Definition at line 145 of file stdhep_util.cpp.

◆ close_read()

void close_read ( int  istream)

Definition at line 223 of file stdhep_util.cpp.

◆ close_write()

void close_write ( int  ostream)

Definition at line 208 of file stdhep_util.cpp.

◆ open_read()

int open_read ( char *  filename,
int  istream,
int  n_events 
)

Definition at line 162 of file stdhep_util.cpp.

◆ open_write()

void open_write ( char *  filename,
int  ostream,
int  n_events 
)

Definition at line 175 of file stdhep_util.cpp.

◆ print_entry()

void print_entry ( stdhep_entry  entry)

Definition at line 228 of file stdhep_util.cpp.

◆ read_next()

bool read_next ( int  istream)

Definition at line 188 of file stdhep_util.cpp.

◆ read_stdhep() [1/2]

void read_stdhep ( stdhep_event new_event)

Definition at line 38 of file stdhep_util.cpp.

◆ read_stdhep() [2/2]

int read_stdhep ( vector< stdhep_entry > *  new_event)

Definition at line 14 of file stdhep_util.cpp.

◆ write_file()

void write_file ( int  ostream)

Definition at line 214 of file stdhep_util.cpp.

◆ write_stdhep() [1/2]

void write_stdhep ( stdhep_event new_event)

Definition at line 92 of file stdhep_util.cpp.

◆ write_stdhep() [2/2]

void write_stdhep ( vector< stdhep_entry > *  new_event,
int  nevhep 
)

Definition at line 69 of file stdhep_util.cpp.

Variable Documentation

◆ has_hepev4

bool has_hepev4 = false

Definition at line 10 of file stdhep_util.cpp.

◆ vect_for_Memoery_Release

vector<stdhep_entry*> vect_for_Memoery_Release
static

Definition at line 12 of file stdhep_util.cpp.

◆ xdr_init_done

bool xdr_init_done = false

Definition at line 9 of file stdhep_util.cpp.