1 // Author: 2010 Svein Lindal <slindal@fys.uio.no> *
2 // for The ALICE HLT Project. *
4 #include "AliHLTEveHLT.h"
5 #include "AliHLTEvePhos.h"
6 #include "AliHLTEveEmcal.h"
9 #include "AliESDEvent.h"
10 #include "AliEveHLTEventManager.h"
11 #include "AliEveEventBufferOffline.h"
12 #include "AliEveHLTEventManagerHomer.h"
14 #include "AliEveHOMERManager.h"
15 #include "TEveManager.h"
17 #include "TGLOverlayButton.h"
19 ClassImp(AliEveHLTEventManagerHomer)
21 AliEveHLTEventManagerHomer::AliEveHLTEventManagerHomer() :
22 AliEveHLTEventManager(),
24 fNextEventTimer(NULL),
27 // see header file for class documentation
29 fEventBuffer = new AliEveEventBufferHomer();
30 fEventBuffer->StartBufferMonitor();
32 fNextEventTimer = new TTimer();
33 fNextEventTimer->Connect("Timeout()", "AliEveHLTEventManagerHomer", this, "TryNextEvent()" );
40 AliEveHLTEventManagerHomer::~AliEveHLTEventManagerHomer() {
43 //DestroyDetectorElements();
50 ///________________________________________________________________________________
51 void AliEveHLTEventManagerHomer::ProcessList(TList * blockList) {
53 ProcessEvent(blockList);
57 void AliEveHLTEventManagerHomer::NextEvent() {
58 fNextEventTimer->Start(1000);
61 ///________________________________________________________________________________
62 void AliEveHLTEventManagerHomer::TryNextEvent() {
63 //See header file for documentation
65 if ( fEventBuffer->LockMutex() ) {
66 cout << "try again in 1 sec"<<endl;
70 fNextEventTimer->Stop();
72 cout << "Mutex is freeee!!"<<endl;
73 TList * aSyncEvent = fEventBuffer->GetASyncEvent();
74 TList * event = static_cast<TList*>(fEventBuffer->NextEvent());
76 cout << "Got the event, reset the display " <<endl;
78 cout << "Process event"<<endl;
81 cout << "Process asynchroneous event" << endl;
82 ProcessEvent(aSyncEvent);
84 cout << "Could not get async event"<<endl;
87 cout << "Upate the display"<<endl;
91 cout << "couldn't get the sync event"<<endl;
95 fEventBuffer->UnLockMutex();
99 ///____________________________________________________________________________________
100 void AliEveHLTEventManagerHomer::NavigateFwd() {
101 //See header file for documentation
102 TList * fEvent = dynamic_cast<TList*>(fEventBuffer->Fwd());
105 ProcessEvent(fEvent);
108 cout << "couldn't get the fwd event"<<endl;
113 ///______________________________________________________________________________________
114 void AliEveHLTEventManagerHomer::NavigateBack() {
115 //See header file for documentation
116 TList * fEvent = dynamic_cast<TList*>(fEventBuffer->Back());
119 ProcessEvent(fEvent);
122 cout << "couldn't get the back event"<<endl;