]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TEvtGen/Photos/examples/photos_hepevt_example_interface.cxx
TENDER becomes Tender, removing .so
[u/mrichter/AliRoot.git] / TEvtGen / Photos / examples / photos_hepevt_example_interface.cxx
1 /**
2  * Interface for FORTRAN example of use of Photos++
3  *
4  * @author Tomasz Przedzinski
5  * @date 21 August 2013
6  */
7 #include "Photos/Photos.h"
8 #include "Photos/PhotosHEPEVTEvent.h"
9 using namespace Photospp;
10
11 extern "C" {
12
13   void photos_init_()
14   {
15     Photos::initialize();
16   }
17
18   void photos_process_()
19   {
20     PhotosHEPEVTEvent *event = new PhotosHEPEVTEvent();
21
22     PhotosHEPEVTEvent::read_event_from_HEPEVT(event);
23     //event->print();
24
25     event->process();
26     //event->print();
27
28     PhotosHEPEVTEvent::write_event_to_HEPEVT(event);
29
30     delete event;
31   }
32
33   void photos_process_particle_(int *i)
34   {
35     PhotosHEPEVTEvent *event = new PhotosHEPEVTEvent();
36
37     PhotosHEPEVTEvent::read_event_from_HEPEVT(event);
38     //event->print();
39
40     PhotosParticle *p = event->getParticle(*i - 1);
41
42     Photos::processParticle(p);
43     //event->print();
44
45     PhotosHEPEVTEvent::write_event_to_HEPEVT(event);
46
47     delete event;
48   }
49
50   void photos_process_branch_(int *i)
51   {
52     PhotosHEPEVTEvent *event = new PhotosHEPEVTEvent();
53
54     PhotosHEPEVTEvent::read_event_from_HEPEVT(event);
55     //event->print();
56
57     PhotosParticle *p = event->getParticle(*i - 1);
58
59     Photos::processBranch(p);
60     //event->print();
61
62     PhotosHEPEVTEvent::write_event_to_HEPEVT(event);
63
64     delete event;
65   }
66 }