]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MONITOR/AliOnlineReco.h
Adding OCDB entries for the Ion tail
[u/mrichter/AliRoot.git] / MONITOR / AliOnlineReco.h
CommitLineData
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
19class AliDimIntNotifier;
20
dc836d53 21class TTimer;
22
c6d78c69 23class TGTextButton;
dc836d53 24class TGCheckButton;
c6d78c69 25class TGListBox;
26
e849dadd 27
c6d78c69 28//______________________________________________________________________________
29// Short description of AliOnlineReco
30//
31
32
33class AliOnlineReco : public TGMainFrame
34{
35public:
36 AliOnlineReco();
dc836d53 37 virtual ~AliOnlineReco();
e849dadd 38
e35c7687 39 AliDimIntNotifier* GetSOR(Int_t i) const { return fSOR[i]; }
40 AliDimIntNotifier* GetEOR(Int_t i) const { return fEOR[i]; }
c6d78c69 41
dc836d53 42 Int_t GetLastRun() const;
43
44 Bool_t GetAutoRunMode() const;
45 void SetAutoRunMode(Bool_t ar);
46
c6d78c69 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
e849dadd 60 void ChildProcTerm(Int_t pid, Int_t status); // *SIGNAL*
61 void ExitLoopChildProcTerm();
c6d78c69 62
63 //------------------------------------------------------------------------------
64 // Handlers of button signals.
65 //------------------------------------------------------------------------------
66
dc836d53 67 void DoAutoRun();
c6d78c69 68 void DoStart();
69 void DoStop();
dc836d53 70 void DoExit();
c6d78c69 71
72 virtual void CloseWindow();
73
a15a9f84 74 Int_t RetrieveGRP(UInt_t run, TString &gdc);
75
48c0589a 76 // Things that should be private but have to be public for CINT.
77 void AutoRunTimerTimeout();
78
c6d78c69 79private:
80 AliOnlineReco(const AliOnlineReco&); // Not implemented
81 AliOnlineReco& operator=(const AliOnlineReco&); // Not implemented
82
83 // GUI components.
48c0589a 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.
c6d78c69 89
dc836d53 90 // DIM interface. Could do without members and just leak them ...
48c0589a 91 AliDimIntNotifier *fSOR[5]; // DIM listeners for SOR.
92 AliDimIntNotifier *fEOR[5]; // DIM listeners for EOR.
c6d78c69 93
dc836d53 94 // AutoRun state and timer
48c0589a 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.
dc836d53 98
c6d78c69 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
48c0589a 103 mIntInt_t fRun2PidMap; // Map from run-number to process id.
c6d78c69 104
e849dadd 105 Bool_t fTestMode; // Flag for test mode (run alitestproc instead of alieve).
106 Bool_t fDoExit; // Flag for exit mode
c6d78c69 107
108 mIntInt_i FindMapEntryByPid(Int_t pid);
109
dc836d53 110 void StartAliEve(mIntInt_i& mi);
111 void KillPid(Int_t pid);
112
113 void StartAutoRunTimer(Int_t run);
114 void StopAutoRunTimer();
115
c6d78c69 116 ClassDef(AliOnlineReco, 0);
117};
118
119#endif