1+ #ifndef HEPMC3_WRAP_H
2+ #define HEPMC3_WRAP_H
3+
4+ #include " HepMC3/FourVector.h"
5+ #include " HepMC3/GenEvent.h"
6+ #include " HepMC3/GenParticle.h"
7+ #include " HepMC3/GenVertex.h"
8+ #include " HepMC3/ReaderAscii.h"
9+ #include " HepMC3/WriterAscii.h"
10+
11+ #include " jlcxx/jlcxx.hpp"
12+ #include " jlcxx/functions.hpp"
13+ #include < memory>
14+ #include < vector>
15+ #include < string>
16+
17+ // Function to add manual methods to the generated module
18+ void add_manual_hepmc3_methods (jlcxx::Module& mod);
19+
20+ // Forward declarations for manual wrapper functions
21+ extern " C" {
22+ void * create_shared_particle (void * momentum, int pdg_id, int status);
23+ void * create_shared_vertex ();
24+ void add_shared_particle_in (void * vertex, void * particle);
25+ void add_shared_particle_out (void * vertex, void * particle);
26+ void add_shared_vertex_to_event (void * event, void * vertex);
27+
28+ void * create_particle_vector ();
29+ void delete_particle_vector (void * vec);
30+ int particle_vector_size (void * vec);
31+ void * particle_vector_at (void * vec, int index);
32+
33+ void * create_reader_ascii (const char * filename);
34+ bool reader_read_event (void * reader, void * event);
35+ void * create_writer_ascii (const char * filename);
36+
37+ bool writer_write_event (void * writer, void * event);
38+ void writer_close (void * writer);
39+ void reader_close (void * reader);
40+
41+
42+
43+ // Vertex operations
44+ void set_vertex_status (void * vertex, int status);
45+
46+ // Event operations
47+ void shift_event_position (void * event, void * four_vector);
48+
49+ // Event attributes
50+ void * create_gen_pdf_info ();
51+ void delete_gen_pdf_info (void * pdf_info);
52+ void set_pdf_info (void * pdf_info, int id1, int id2, double x1, double x2, double q, double pdf1, double pdf2, int pdf_set_id1, int pdf_set_id2);
53+ void add_pdf_info_attribute (void * event, void * pdf_info);
54+
55+ void * create_gen_cross_section ();
56+ void delete_gen_cross_section (void * cross_section);
57+ void set_cross_section (void * cross_section, double xs, double xs_err);
58+ void add_cross_section_attribute (void * event, void * cross_section);
59+
60+ void * create_gen_heavy_ion ();
61+ void delete_gen_heavy_ion (void * heavy_ion);
62+ void set_heavy_ion_info (void * heavy_ion, int nh, int np, int nt, int nc, int ns, int nsp, int nn, int nw, int nwn, double impact_parameter, double event_plane_angle, double eccentricity, double sigma_inel_nn);
63+ void add_heavy_ion_attribute (void * event, void * heavy_ion);
64+
65+ // Attribute management
66+ void remove_event_attribute (void * event, const char * name);
67+
68+ // Particle attributes
69+ void * create_int_attribute (int value);
70+ void * create_double_attribute (double value);
71+ void * create_string_attribute (const char * value);
72+ void delete_attribute (void * attribute);
73+ void add_particle_attribute (void * particle, const char * name, void * attribute);
74+ void add_vertex_attribute (void * vertex, const char * name, void * attribute);
75+
76+ // Event manipulation
77+ void remove_particle_from_event (void * event, void * particle);
78+
79+
80+ void * get_particles_in (void * vertex);
81+ void * get_particles_out (void * vertex);
82+
83+ // Raw pointer access functions for particles
84+ int get_particle_pdg_id (void * particle_ptr);
85+ int get_particle_status (void * particle_ptr);
86+ int get_particle_id (void * particle_ptr);
87+ double get_particle_px (void * particle_ptr);
88+ double get_particle_py (void * particle_ptr);
89+ double get_particle_pz (void * particle_ptr);
90+ double get_particle_e (void * particle_ptr);
91+
92+ }
93+
94+ #endif
0 commit comments