* full copyright notice. *
**************************************************************************/
-#ifndef AliOnlineReco_H
-#define AliOnlineReco_H
+#ifndef ALIONLINERECO_H
+#define ALIONLINERECO_H
#include "TObject.h"
#include "TString.h"
class AliDimIntNotifier;
+class TTimer;
+
class TGTextButton;
+class TGCheckButton;
class TGListBox;
//______________________________________________________________________________
{
public:
AliOnlineReco();
- virtual ~AliOnlineReco() {}
+ virtual ~AliOnlineReco();
AliDimIntNotifier* GetSOR(Int_t i) const { return fSOR[i]; }
AliDimIntNotifier* GetEOR(Int_t i) const { return fEOR[i]; }
+ Int_t GetLastRun() const;
+
+ Bool_t GetAutoRunMode() const;
+ void SetAutoRunMode(Bool_t ar);
+
void SetTestMode() { fTestMode = kTRUE; }
//------------------------------------------------------------------------------
// Handlers of button signals.
//------------------------------------------------------------------------------
+ void DoAutoRun();
void DoStart();
void DoStop();
- void DoXyzz();
+ void DoExit();
virtual void CloseWindow();
Int_t RetrieveGRP(UInt_t run, TString &gdc);
+ // Things that should be private but have to be public for CINT.
+ void AutoRunTimerTimeout();
+
private:
AliOnlineReco(const AliOnlineReco&); // Not implemented
AliOnlineReco& operator=(const AliOnlineReco&); // Not implemented
// GUI components.
- TGListBox *fRunList;
- TGTextButton *fStartButt;
- TGTextButton *fStopButt;
- TGTextButton *fXyzzButt;
+ TGListBox *fRunList; // List-box for listing current runs.
+ TGCheckButton *fAutoRun; // Check-box toggling auto-run when a new run starts.
+ TGTextButton *fStartButt; // Start for selected run.
+ TGTextButton *fStopButt; // Stop for selected run.
+ TGTextButton *fExitButt; // Exit button.
- // DIM interface. Could do without ...
- AliDimIntNotifier *fSOR[5];
- AliDimIntNotifier *fEOR[5];
+ // DIM interface. Could do without members and just leak them ...
+ AliDimIntNotifier *fSOR[5]; // DIM listeners for SOR.
+ AliDimIntNotifier *fEOR[5]; // DIM listeners for EOR.
+
+ // AutoRun state and timer
+ TTimer *fAutoRunTimer; // Timer for auto-run on new run.
+ Int_t fAutoRunScheduled; // Run for which auto-run is scheduled.
+ Int_t fAutoRunRunning; // Run for which auto-run was executed.
// Run-state, process mngmnt
typedef std::map<Int_t, Int_t> mIntInt_t; // value should be struct { pid, state, ... };
typedef mIntInt_t::iterator mIntInt_i;
- mIntInt_t fRun2PidMap;
+ mIntInt_t fRun2PidMap; // Map from run-number to process id.
- Bool_t fTestMode;
+ Bool_t fTestMode; // Flag for test mode (run xclock instead of alieve).
mIntInt_i FindMapEntryByPid(Int_t pid);
+ void StartAliEve(mIntInt_i& mi);
+ void KillPid(Int_t pid);
+
+ void StartAutoRunTimer(Int_t run);
+ void StopAutoRunTimer();
+
ClassDef(AliOnlineReco, 0);
};