]>
Commit | Line | Data |
---|---|---|
c6d78c69 | 1 | // @(#)root/eve:$Id$ |
2 | // Author: Matevz Tadel 2007 | |
3 | ||
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 | **************************************************************************/ | |
9 | ||
48c0589a | 10 | #ifndef ALIONLINERECO_H |
11 | #define ALIONLINERECO_H | |
c6d78c69 | 12 | |
13 | #include "TObject.h" | |
a15a9f84 | 14 | #include "TString.h" |
c6d78c69 | 15 | #include <TGFrame.h> |
16 | ||
17 | #include <map> | |
18 | ||
19 | class AliDimIntNotifier; | |
20 | ||
dc836d53 | 21 | class TTimer; |
22 | ||
c6d78c69 | 23 | class TGTextButton; |
dc836d53 | 24 | class TGCheckButton; |
c6d78c69 | 25 | class TGListBox; |
26 | ||
27 | //______________________________________________________________________________ | |
28 | // Short description of AliOnlineReco | |
29 | // | |
30 | ||
31 | ||
32 | class AliOnlineReco : public TGMainFrame | |
33 | { | |
34 | public: | |
35 | AliOnlineReco(); | |
dc836d53 | 36 | virtual ~AliOnlineReco(); |
c6d78c69 | 37 | |
e35c7687 | 38 | AliDimIntNotifier* GetSOR(Int_t i) const { return fSOR[i]; } |
39 | AliDimIntNotifier* GetEOR(Int_t i) const { return fEOR[i]; } | |
c6d78c69 | 40 | |
dc836d53 | 41 | Int_t GetLastRun() const; |
42 | ||
43 | Bool_t GetAutoRunMode() const; | |
44 | void SetAutoRunMode(Bool_t ar); | |
45 | ||
c6d78c69 | 46 | void SetTestMode() { fTestMode = kTRUE; } |
47 | ||
48 | //------------------------------------------------------------------------------ | |
49 | // Handlers of DIM signals. | |
50 | //------------------------------------------------------------------------------ | |
51 | ||
52 | void StartOfRun(Int_t run); | |
53 | void EndOfRun(Int_t run); | |
54 | ||
55 | //------------------------------------------------------------------------------ | |
56 | // Handlers of OS signals. | |
57 | //------------------------------------------------------------------------------ | |
58 | ||
93624d6b | 59 | void ChildProcTerm(Int_t pid, Int_t status); |
c6d78c69 | 60 | |
61 | //------------------------------------------------------------------------------ | |
62 | // Handlers of button signals. | |
63 | //------------------------------------------------------------------------------ | |
64 | ||
dc836d53 | 65 | void DoAutoRun(); |
c6d78c69 | 66 | void DoStart(); |
67 | void DoStop(); | |
dc836d53 | 68 | void DoExit(); |
c6d78c69 | 69 | |
70 | virtual void CloseWindow(); | |
71 | ||
a15a9f84 | 72 | Int_t RetrieveGRP(UInt_t run, TString &gdc); |
73 | ||
48c0589a | 74 | // Things that should be private but have to be public for CINT. |
75 | void AutoRunTimerTimeout(); | |
76 | ||
c6d78c69 | 77 | private: |
78 | AliOnlineReco(const AliOnlineReco&); // Not implemented | |
79 | AliOnlineReco& operator=(const AliOnlineReco&); // Not implemented | |
80 | ||
81 | // GUI components. | |
48c0589a | 82 | TGListBox *fRunList; // List-box for listing current runs. |
83 | TGCheckButton *fAutoRun; // Check-box toggling auto-run when a new run starts. | |
84 | TGTextButton *fStartButt; // Start for selected run. | |
85 | TGTextButton *fStopButt; // Stop for selected run. | |
86 | TGTextButton *fExitButt; // Exit button. | |
c6d78c69 | 87 | |
dc836d53 | 88 | // DIM interface. Could do without members and just leak them ... |
48c0589a | 89 | AliDimIntNotifier *fSOR[5]; // DIM listeners for SOR. |
90 | AliDimIntNotifier *fEOR[5]; // DIM listeners for EOR. | |
c6d78c69 | 91 | |
dc836d53 | 92 | // AutoRun state and timer |
48c0589a | 93 | TTimer *fAutoRunTimer; // Timer for auto-run on new run. |
94 | Int_t fAutoRunScheduled; // Run for which auto-run is scheduled. | |
95 | Int_t fAutoRunRunning; // Run for which auto-run was executed. | |
dc836d53 | 96 | |
c6d78c69 | 97 | // Run-state, process mngmnt |
98 | typedef std::map<Int_t, Int_t> mIntInt_t; // value should be struct { pid, state, ... }; | |
99 | typedef mIntInt_t::iterator mIntInt_i; | |
100 | ||
48c0589a | 101 | mIntInt_t fRun2PidMap; // Map from run-number to process id. |
c6d78c69 | 102 | |
48c0589a | 103 | Bool_t fTestMode; // Flag for test mode (run xclock instead of alieve). |
c6d78c69 | 104 | |
105 | mIntInt_i FindMapEntryByPid(Int_t pid); | |
106 | ||
dc836d53 | 107 | void StartAliEve(mIntInt_i& mi); |
108 | void KillPid(Int_t pid); | |
109 | ||
110 | void StartAutoRunTimer(Int_t run); | |
111 | void StopAutoRunTimer(); | |
112 | ||
c6d78c69 | 113 | ClassDef(AliOnlineReco, 0); |
114 | }; | |
115 | ||
116 | #endif |