]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MONITOR/AliOnlineReco.h
adding helper component for the automatic generation of compressed TPC cluster data...
[u/mrichter/AliRoot.git] / MONITOR / AliOnlineReco.h
index 529ecbf5c7a8d92414baf39b16ab8e83a4622360..d668584be048e7aa49ee790414015b745a7aadf3 100644 (file)
@@ -7,8 +7,8 @@
  * 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;
 
 //______________________________________________________________________________
@@ -30,10 +33,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; }
 
@@ -54,38 +62,54 @@ public:
   // 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;
-  AliDimIntNotifier *fEOR;
+  // 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);
 };