30e7579c |
1 | // Author: 2010 Svein Lindal <slindal@fys.uio.no> * |
2 | // for The ALICE HLT Project. * |
3 | |
4 | #include "AliHLTEveHLT.h" |
5 | #include "AliHLTEvePhos.h" |
6 | #include "AliHLTEveEmcal.h" |
7 | |
8 | |
9 | #include "AliESDEvent.h" |
10 | #include "AliEveHLTEventManager.h" |
11 | #include "AliEveEventBufferOffline.h" |
12 | #include "AliEveHLTEventManagerHomer.h" |
13 | #include "TList.h" |
14 | #include "AliEveHOMERManager.h" |
15 | #include "TEveManager.h" |
16 | |
17 | ClassImp(AliEveHLTEventManagerHomer) |
18 | |
19 | AliEveHLTEventManagerHomer::AliEveHLTEventManagerHomer() : |
20 | AliEveHLTEventManager(), |
21 | fEventBuffer(NULL) |
22 | { |
23 | // see header file for class documentation |
24 | // or |
25 | // refer to README to build package |
26 | // or |
27 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt |
28 | fEventBuffer = new AliEveEventBufferHomer(); |
29 | //AliEveHOMERManager * hm = fEventBuffer->GetHomerManager(); |
30 | //if(hm) GetEveManager()->AddToListTree(hm, kTRUE); |
31 | |
32 | |
33 | } |
34 | |
35 | |
36 | AliEveHLTEventManagerHomer::~AliEveHLTEventManagerHomer() { |
37 | |
38 | //DestroyElements(); |
39 | //DestroyDetectorElements(); |
40 | if(fEventBuffer) |
41 | delete fEventBuffer; |
42 | fEventBuffer = NULL; |
43 | |
44 | } |
45 | |
46 | |
47 | ///________________________________________________________________________________ |
48 | void AliEveHLTEventManagerHomer::NextEvent() { |
49 | //See header file for documentation |
50 | TList * fEvent = static_cast<TList*>(fEventBuffer->NextEvent()); |
51 | if(fEvent) { |
52 | cout << "Got the event " <<endl; |
53 | ProcessEvent(fEvent); |
30e7579c |
54 | } else { |
d5180d24 |
55 | cout << "could't get the sync event"<<endl; |
30e7579c |
56 | } |
d5180d24 |
57 | |
58 | // cout << "doint async block"<<endl; |
59 | // TList * async = static_cast<TList*>(fEventBuffer->GetAList()); |
60 | // if(async) { |
61 | // ProcessEvent(async); |
62 | // } else { |
63 | // cout << "No async bloc"<<endl; |
64 | // } |
65 | |
b088c0a1 |
66 | |
d5180d24 |
67 | fEventBuffer->SetBusy(kFALSE); |
30e7579c |
68 | } |
69 | |
70 | |
71 | ///____________________________________________________________________________________ |
72 | void AliEveHLTEventManagerHomer::NavigateFwd() { |
73 | //See header file for documentation |
74 | TList * fEvent = dynamic_cast<TList*>(fEventBuffer->Fwd()); |
75 | if(fEvent) { |
76 | ProcessEvent(fEvent); |
77 | } else { |
78 | cout << "couldn't get the fwd event"<<endl; |
79 | } |
80 | } |
81 | |
82 | |
83 | ///______________________________________________________________________________________ |
84 | void AliEveHLTEventManagerHomer::NavigateBack() { |
85 | //See header file for documentation |
86 | TList * fEvent = dynamic_cast<TList*>(fEventBuffer->Back()); |
87 | if(fEvent) { |
88 | ProcessEvent(fEvent); |
89 | } else { |
90 | cout << "couldn't get the back event"<<endl; |
91 | } |
92 | } |
93 | |