#include "TList.h"
#include "AliEveHOMERManager.h"
#include "TEveManager.h"
+#include "TTimer.h"
+#include "TGLOverlayButton.h"
ClassImp(AliEveHLTEventManagerHomer)
AliEveHLTEventManagerHomer::AliEveHLTEventManagerHomer() :
AliEveHLTEventManager(),
- fEventBuffer(NULL)
+ fEventBuffer(NULL),
+ fNextEventTimer(NULL),
+ fInfoButton(NULL)
{
// see header file for class documentation
- // or
- // refer to README to build package
- // or
- // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
fEventBuffer = new AliEveEventBufferHomer();
fEventBuffer->StartBufferMonitor();
- //AliEveHOMERManager * hm = fEventBuffer->GetHomerManager();
- //if(hm) GetEveManager()->AddToListTree(hm, kTRUE);
+
+ fNextEventTimer = new TTimer();
+ fNextEventTimer->Connect("Timeout()", "AliEveHLTEventManagerHomer", this, "TryNextEvent()" );
+
}
UpdateDisplay();
}
-
-
+void AliEveHLTEventManagerHomer::NextEvent() {
+ fNextEventTimer->Start(1000);
+}
///________________________________________________________________________________
-void AliEveHLTEventManagerHomer::NextEvent() {
+void AliEveHLTEventManagerHomer::TryNextEvent() {
//See header file for documentation
- if(fEventBuffer->LockMutex() ) {
- cout << "event buffer already busy"<<endl;
+
+ if ( fEventBuffer->LockMutex() ) {
+ cout << "try again in 1 sec"<<endl;
return;
- } else {
-
+ }
+
+ fNextEventTimer->Stop();
+
+ cout << "Mutex is freeee!!"<<endl;
TList * aSyncEvent = fEventBuffer->GetASyncEvent();
TList * event = static_cast<TList*>(fEventBuffer->NextEvent());
if(event) {
cout << "couldn't get the sync event"<<endl;
}
- // cout << "doint async block"<<endl;
- // TList * async = static_cast<TList*>(fEventBuffer->GetAList());
- // if(async) {
- // ProcessEvent(async);
- // } else {
- // cout << "No async bloc"<<endl;
- // }
- }
fEventBuffer->UnLockMutex();
}
+// Author: 2010 Svein Lindal <slindal@fys.uio.no> *
+// for The ALICE HLT Project. *
+
#ifndef ALIEVEHLTEVENTMANAGERHOMER_H
#define ALIEVEHLTEVENTMANAGERHOMER_H
#include "AliEveEventBufferHomer.h"
#include "AliEveEventBuffer.h"
class TList;
+class TTimer;
+class TGLOverlayButton;
class AliEveHLTEventManagerHomer : public AliEveHLTEventManager {
virtual ~AliEveHLTEventManagerHomer();
+ //Get Next Event
void NextEvent();
+ //Try to get the next event
+ void TryNextEvent();
+ //Get next event in buffer
void NavigateFwd();
+ //Get Previous event in buffer
void NavigateBack();
+ //Process block list
void ProcessList(TList * blockList);
private:
/** assignment operator prohibited */
AliEveHLTEventManagerHomer& operator=(const AliEveHLTEventManagerHomer&);
- AliEveEventBufferHomer * fEventBuffer;
+ AliEveEventBufferHomer * fEventBuffer; //Event buffer
+ ///Get event buffer
AliEveEventBuffer * GetEventBuffer() { return dynamic_cast<AliEveEventBuffer*>(fEventBuffer); }
+
+ TTimer * fNextEventTimer; //Timer to fetch next event
+ TGLOverlayButton * fInfoButton; //Information button
+
+
ClassDef(AliEveHLTEventManagerHomer, 0);
+
+
};
#endif