]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - MONITOR/AliOnlineReco.h
Updated histos
[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//______________________________________________________________________________
29// Short description of AliOnlineReco
30//
31
32
33class AliOnlineReco : public TGMainFrame
34{
35public:
36 AliOnlineReco();
37 virtual ~AliOnlineReco();
38
39 AliDimIntNotifier* GetSOR(Int_t i) const { return fSOR[i]; }
40 AliDimIntNotifier* GetEOR(Int_t i) const { return fEOR[i]; }
41
42 Int_t GetLastRun() const;
43
44 Bool_t GetAutoRunMode() const;
45 void SetAutoRunMode(Bool_t ar);
46
47 void SetTestMode() { fTestMode = kTRUE; }
48
49 //------------------------------------------------------------------------------
50 // Handlers of DIM signals.
51 //------------------------------------------------------------------------------
52
53 void StartOfRun(Int_t run);
54 void EndOfRun(Int_t run);
55
56 //------------------------------------------------------------------------------
57 // Handlers of OS signals.
58 //------------------------------------------------------------------------------
59
60 void ChildProcTerm(Int_t pid, Int_t status); // *SIGNAL*
61 void ExitLoopChildProcTerm();
62
63 //------------------------------------------------------------------------------
64 // Handlers of button signals.
65 //------------------------------------------------------------------------------
66
67 void DoAutoRun();
68 void DoStart();
69 void DoStop();
70 void DoExit();
71
72 virtual void CloseWindow();
73
74 Int_t RetrieveGRP(UInt_t run, TString &gdc);
75
76 // Things that should be private but have to be public for CINT.
77 void AutoRunTimerTimeout();
78
79private:
80 AliOnlineReco(const AliOnlineReco&); // Not implemented
81 AliOnlineReco& operator=(const AliOnlineReco&); // Not implemented
82
83 // GUI components.
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.
89
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.
93
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.
98
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;
102
103 mIntInt_t fRun2PidMap; // Map from run-number to process id.
104
105 Bool_t fTestMode; // Flag for test mode (run alitestproc instead of alieve).
106 Bool_t fDoExit; // Flag for exit mode
107
108 mIntInt_i FindMapEntryByPid(Int_t pid);
109
110 void StartAliEve(mIntInt_i& mi);
111 void KillPid(Int_t pid);
112
113 void StartAutoRunTimer(Int_t run);
114 void StopAutoRunTimer();
115
116 ClassDef(AliOnlineReco, 0);
117};
118
119#endif