+
+void AliEveEventManager::SetAutoLoad(Bool_t autoLoad)
+{
+ // Set the automatic event loading mode
+ fAutoLoad = autoLoad;
+ StartStopAutoLoadTimer();
+}
+
+void AliEveEventManager::SetAutoLoadTime(Double_t time)
+{
+ // Set the auto-load time in seconds
+ fAutoLoadTime = time;
+ StartStopAutoLoadTimer();
+}
+
+void AliEveEventManager::StartStopAutoLoadTimer()
+{
+ // Create if needed and start
+ // the automatic event loading timer
+ if (fAutoLoad) {
+ if (!fAutoLoadTimer) {
+ fAutoLoadTimer = new TTimer;
+ fAutoLoadTimer->Connect("Timeout()","AliEveEventManager",this,"NextEvent()");
+ }
+ fAutoLoadTimer->Start((Long_t)fAutoLoadTime*1000,kTRUE);
+ }
+ else {
+ if (fAutoLoadTimer) fAutoLoadTimer->Stop();
+ }
+}
+
+void AliEveEventManager::PrevEvent()
+{
+ // Loads previous event
+ // only in case of manual mode
+ if (!fIsOnline) {
+ GotoEvent(fEventId - 1);
+ StartStopAutoLoadTimer();
+ }
+}
+
+void AliEveEventManager::NextEvent()
+{
+ // Loads next event
+ // either in automatic (online) or
+ // manual mode
+
+ if (fIsOnline) {
+ if (fAutoLoadTimer) fAutoLoadTimer->Stop();
+
+ DestroyElements();
+
+ gSystem->ExitLoop();
+ }
+ else {
+ GotoEvent(fEventId + 1);
+ StartStopAutoLoadTimer();
+ }
+}
+
+const char* AliEveEventManager::GetEventInfo() const
+{
+ // Dumps the event-header contents
+
+ static TString eventInfo;
+
+ if (!fRawReader) return "No event information is available";
+
+ const UInt_t* id = fRawReader->GetEventId();
+ const UInt_t* pattern = fRawReader->GetTriggerPattern();
+ const UInt_t* attr = fRawReader->GetAttributes();
+ eventInfo.Form("Run#: %d\nEvent type: %d\nPeriod: %x\nOrbit: %x\nBC: %x\nTrigger: %x-%x\nDetectors: %x\nAttributes:%x-%x-%x",
+ fRawReader->GetRunNumber(),fRawReader->GetType(),
+ (((id)[0]>>4)&0x0fffffff),((((id)[0]<<20)&0xf00000)|(((id)[1]>>12)&0xfffff)),((id)[1]&0x00000fff),
+ pattern[0],pattern[1],
+ *fRawReader->GetDetectorPattern(),
+ attr[0],attr[1],attr[2]);
+
+ return eventInfo.Data();
+}
+