Added run number to frame
[u/mrichter/AliRoot.git] / EVE / EveHLT / AliEveHLTEventManagerHomer.cxx
CommitLineData
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
17ClassImp(AliEveHLTEventManagerHomer)
18
19AliEveHLTEventManagerHomer::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
36AliEveHLTEventManagerHomer::~AliEveHLTEventManagerHomer() {
37
38 //DestroyElements();
39 //DestroyDetectorElements();
40 if(fEventBuffer)
41 delete fEventBuffer;
42 fEventBuffer = NULL;
43
44}
45
46
47///________________________________________________________________________________
48void AliEveHLTEventManagerHomer::NextEvent() {
49 //See header file for documentation
d63d227e 50 if(fEventBuffer->GetBusy() ) {
51 cout << "event buffer already busy"<<endl;
52 return;
53 }else {
54 fEventBuffer->SetBusy(kTRUE);
55 }
56
30e7579c 57 TList * fEvent = static_cast<TList*>(fEventBuffer->NextEvent());
58 if(fEvent) {
59 cout << "Got the event " <<endl;
60 ProcessEvent(fEvent);
d63d227e 61
30e7579c 62 } else {
d5180d24 63 cout << "could't get the sync event"<<endl;
30e7579c 64 }
d5180d24 65
66 // cout << "doint async block"<<endl;
67 // TList * async = static_cast<TList*>(fEventBuffer->GetAList());
68 // if(async) {
69 // ProcessEvent(async);
70 // } else {
71 // cout << "No async bloc"<<endl;
72 // }
73
b088c0a1 74
d5180d24 75fEventBuffer->SetBusy(kFALSE);
30e7579c 76}
77
78
79///____________________________________________________________________________________
80void AliEveHLTEventManagerHomer::NavigateFwd() {
81 //See header file for documentation
82 TList * fEvent = dynamic_cast<TList*>(fEventBuffer->Fwd());
83 if(fEvent) {
84 ProcessEvent(fEvent);
85 } else {
86 cout << "couldn't get the fwd event"<<endl;
87 }
88}
89
90
91///______________________________________________________________________________________
92void AliEveHLTEventManagerHomer::NavigateBack() {
93 //See header file for documentation
94 TList * fEvent = dynamic_cast<TList*>(fEventBuffer->Back());
95 if(fEvent) {
96 ProcessEvent(fEvent);
97 } else {
98 cout << "couldn't get the back event"<<endl;
99 }
100}
101