10 int main(
int argc,
char** argv)
12 vector<stdhep_entry> new_event;
16 printf(
"<input stdhep filenames> <output stdhep filename>\n");
19 int n_events = 500000;
21 int n_inputs = argc - 2;
22 for (
int i = 0; i < n_inputs; i++) {
26 int ostream = n_inputs;
30 bool end_of_files =
false;
33 for (
int i = 0; i < n_inputs; i++)
36 printf(
"End of file %s\n", argv[i+1]);
38 if (!end_of_files && i != 0) {
39 printf(
"fail; %s has fewer events than %s\n", argv[i+1], argv[1]);
45 printf(
"fail; %s has too many events\n", argv[i+1]);
48 if (nevhep != new_nevhep) printf(
"Expected nevhep = %d, got %d in file %s\n", nevhep, new_nevhep, argv[i+1]);
int main(int argc, char **argv)
void open_write(char *filename, int ostream, int n_events)
int open_read(char *filename, int istream, int n_events)
void write_stdhep(vector< stdhep_entry > *new_event, int nevhep)
int read_stdhep(vector< stdhep_entry > *new_event)
bool read_next(int istream)
void close_read(int istream)
void write_file(int ostream)
void close_write(int ostream)