Brand new GUI application for online display/reco by Matevz.
[u/mrichter/AliRoot.git] / MONITOR / AliDimIntNotifier.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
10#ifndef AliDimIntNotifier_H
11#define AliDimIntNotifier_H
12
13#include <TObject.h>
14#include <TQObject.h>
15
16#include <TMutex.h>
17#include <TCondition.h>
18#include <TTimer.h>
19
20#ifdef ALI_DIM
21#include <dic.hxx>
22#else
23class DimUpdatedInfo
24{
25public:
26 DimUpdatedInfo(const Char_t*, Int_t) {}
27
28 Bool_t getData() { return kFALSE; }
29 Int_t getInt() { return -1; }
30};
31#endif
32
33//______________________________________________________________________________
34// Short description of AliDimIntNotifier
35//
36
37class AliDimIntNotifier : public TObject,
38 public TQObject,
39 public DimUpdatedInfo
40{
41public:
42
43 AliDimIntNotifier(const TString& service);
44
45 virtual ~AliDimIntNotifier() {}
46
47 void infoHandler();
48 void infoHandlerTest(Int_t fake);
49
50 void DimMessage(Int_t=-1); // *SIGNAL*
51
52 static void SetMainThreadId();
53
54private:
55 AliDimIntNotifier(const AliDimIntNotifier&); // Not implemented
56 AliDimIntNotifier& operator=(const AliDimIntNotifier&); // Not implemented
57
58 void StartTimer();
59 void StopTimer();
60
61 TTimer fReThreader;
62 TMutex fNotifyLck;
63 TCondition fNotifyCnd;
64
65 Int_t fLastMessage;
66
67 static Long_t fgMainThreadId;
68
69 ClassDef(AliDimIntNotifier, 0);
70};
71
72#endif