]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MONITOR/AliOnlineReco.h
Solve bug #89021 - macros do not neet to do gEve->GetDefaultGeometry() but AliEveEven...
[u/mrichter/AliRoot.git] / MONITOR / AliOnlineReco.h
index 550f6b911709082d746c04408d8b6a6df26c0a21..d20eec29e9f2188d73b5a42e6c5ffe177e44dd16 100644 (file)
@@ -7,19 +7,24 @@
  * full copyright notice.                                                 *
  **************************************************************************/
 
-#ifndef AliOnlineReco_H
-#define AliOnlineReco_H
+#ifndef ALIONLINERECO_H
+#define ALIONLINERECO_H
 
 #include "TObject.h"
+#include "TString.h"
 #include <TGFrame.h>
 
 #include <map>
 
 class AliDimIntNotifier;
 
+class TTimer;
+
 class TGTextButton;
+class TGCheckButton;
 class TGListBox;
 
+
 //______________________________________________________________________________
 // Short description of AliOnlineReco
 //
@@ -29,10 +34,15 @@ class AliOnlineReco : public TGMainFrame
 {
 public:
   AliOnlineReco();
-  virtual ~AliOnlineReco() {}
+  virtual ~AliOnlineReco();
+  
+  AliDimIntNotifier* GetSOR(Int_t i) const { return fSOR[i]; }
+  AliDimIntNotifier* GetEOR(Int_t i) const { return fEOR[i]; }
 
-  AliDimIntNotifier* GetSOR() const { return fSOR; }
-  AliDimIntNotifier* GetEOR() const { return fEOR; }
+  Int_t  GetLastRun() const;
+
+  Bool_t GetAutoRunMode() const;
+  void   SetAutoRunMode(Bool_t ar);
 
   void SetTestMode() { fTestMode = kTRUE; }
 
@@ -47,42 +57,62 @@ public:
   // Handlers of OS signals.
   //------------------------------------------------------------------------------
 
-  void ChildProcTerm(Int_t pid, Int_t status);
+  void ChildProcTerm(Int_t pid, Int_t status); // *SIGNAL*
+  void ExitLoopChildProcTerm();
 
   //------------------------------------------------------------------------------
   // 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 members and just leak them ...
+  AliDimIntNotifier *fSOR[5]; // DIM listeners for SOR.
+  AliDimIntNotifier *fEOR[5]; // DIM listeners for EOR.
 
-  // DIM interface. Could do without ...
-  AliDimIntNotifier *fSOR;
-  AliDimIntNotifier *fEOR;
+  // 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 alitestproc instead of alieve).
+  Bool_t         fDoExit;     // Flag for exit mode
 
   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);
 };