]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - MONITOR/AliOnlineReco.h
New line added.
[u/mrichter/AliRoot.git] / MONITOR / AliOnlineReco.h
... / ...
CommitLineData
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
10#ifndef AliOnlineReco_H
11#define AliOnlineReco_H
12
13#include "TObject.h"
14#include "TString.h"
15#include <TGFrame.h>
16
17#include <map>
18
19class AliDimIntNotifier;
20
21class TTimer;
22
23class TGTextButton;
24class TGCheckButton;
25class TGListBox;
26
27//______________________________________________________________________________
28// Short description of AliOnlineReco
29//
30
31
32class AliOnlineReco : public TGMainFrame
33{
34public:
35 AliOnlineReco();
36 virtual ~AliOnlineReco();
37
38 AliDimIntNotifier* GetSOR(Int_t i) const { return fSOR[i]; }
39 AliDimIntNotifier* GetEOR(Int_t i) const { return fEOR[i]; }
40
41 Int_t GetLastRun() const;
42
43 Bool_t GetAutoRunMode() const;
44 void SetAutoRunMode(Bool_t ar);
45
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
59 void ChildProcTerm(Int_t pid, Int_t status);
60
61 //------------------------------------------------------------------------------
62 // Handlers of button signals.
63 //------------------------------------------------------------------------------
64
65 void DoAutoRun();
66 void DoStart();
67 void DoStop();
68 void DoExit();
69
70 virtual void CloseWindow();
71
72 Int_t RetrieveGRP(UInt_t run, TString &gdc);
73
74private:
75 AliOnlineReco(const AliOnlineReco&); // Not implemented
76 AliOnlineReco& operator=(const AliOnlineReco&); // Not implemented
77
78 // GUI components.
79 TGListBox *fRunList;
80 TGCheckButton *fAutoRun;
81 TGTextButton *fStartButt;
82 TGTextButton *fStopButt;
83 TGTextButton *fExitButt;
84
85 // DIM interface. Could do without members and just leak them ...
86 AliDimIntNotifier *fSOR[5];
87 AliDimIntNotifier *fEOR[5];
88
89 // AutoRun state and timer
90 TTimer *fAutoRunTimer;
91 Int_t fAutoRunScheduled;
92 Int_t fAutoRunRunning;
93
94 // Run-state, process mngmnt
95 typedef std::map<Int_t, Int_t> mIntInt_t; // value should be struct { pid, state, ... };
96 typedef mIntInt_t::iterator mIntInt_i;
97
98 mIntInt_t fRun2PidMap;
99
100 Bool_t fTestMode;
101
102 mIntInt_i FindMapEntryByPid(Int_t pid);
103
104 void StartAliEve(mIntInt_i& mi);
105 void KillPid(Int_t pid);
106
107 void StartAutoRunTimer(Int_t run);
108 void StopAutoRunTimer();
109
110 // Things that should be private but have to be public for CINT.
111public:
112 void AutoRunTimerTimeout();
113
114 ClassDef(AliOnlineReco, 0);
115};
116
117#endif