2 // Author: Matevz Tadel 2007
4 /**************************************************************************
5 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
7 * full copyright notice. *
8 **************************************************************************/
10 #ifndef ALIONLINERECO_H
11 #define ALIONLINERECO_H
19 class AliDimIntNotifier;
28 //______________________________________________________________________________
29 // Short description of AliOnlineReco
33 class AliOnlineReco : public TGMainFrame
37 virtual ~AliOnlineReco();
39 AliDimIntNotifier* GetSOR(Int_t i) const { return fSOR[i]; }
40 AliDimIntNotifier* GetEOR(Int_t i) const { return fEOR[i]; }
42 Int_t GetLastRun() const;
44 Bool_t GetAutoRunMode() const;
45 void SetAutoRunMode(Bool_t ar);
47 void SetTestMode() { fTestMode = kTRUE; }
49 //------------------------------------------------------------------------------
50 // Handlers of DIM signals.
51 //------------------------------------------------------------------------------
53 void StartOfRun(Int_t run);
54 void EndOfRun(Int_t run);
56 //------------------------------------------------------------------------------
57 // Handlers of OS signals.
58 //------------------------------------------------------------------------------
60 void ChildProcTerm(Int_t pid, Int_t status); // *SIGNAL*
61 void ExitLoopChildProcTerm();
63 //------------------------------------------------------------------------------
64 // Handlers of button signals.
65 //------------------------------------------------------------------------------
72 virtual void CloseWindow();
74 Int_t RetrieveGRP(UInt_t run, TString &gdc);
76 // Things that should be private but have to be public for CINT.
77 void AutoRunTimerTimeout();
80 AliOnlineReco(const AliOnlineReco&); // Not implemented
81 AliOnlineReco& operator=(const AliOnlineReco&); // Not implemented
84 TGListBox *fRunList; // List-box for listing current runs.
85 TGCheckButton *fAutoRun; // Check-box toggling auto-run when a new run starts.
86 TGTextButton *fStartButt; // Start for selected run.
87 TGTextButton *fStopButt; // Stop for selected run.
88 TGTextButton *fExitButt; // Exit button.
90 // DIM interface. Could do without members and just leak them ...
91 AliDimIntNotifier *fSOR[5]; // DIM listeners for SOR.
92 AliDimIntNotifier *fEOR[5]; // DIM listeners for EOR.
94 // AutoRun state and timer
95 TTimer *fAutoRunTimer; // Timer for auto-run on new run.
96 Int_t fAutoRunScheduled; // Run for which auto-run is scheduled.
97 Int_t fAutoRunRunning; // Run for which auto-run was executed.
99 // Run-state, process mngmnt
100 typedef std::map<Int_t, Int_t> mIntInt_t; // value should be struct { pid, state, ... };
101 typedef mIntInt_t::iterator mIntInt_i;
103 mIntInt_t fRun2PidMap; // Map from run-number to process id.
105 Bool_t fTestMode; // Flag for test mode (run alitestproc instead of alieve).
106 Bool_t fDoExit; // Flag for exit mode
108 mIntInt_i FindMapEntryByPid(Int_t pid);
110 void StartAliEve(mIntInt_i& mi);
111 void KillPid(Int_t pid);
113 void StartAutoRunTimer(Int_t run);
114 void StopAutoRunTimer();
116 ClassDef(AliOnlineReco, 0);