tofLabel copying
[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) {}
4f6eef9f 27 virtual ~DimUpdatedInfo() {}
c6d78c69 28
29 Bool_t getData() { return kFALSE; }
30 Int_t getInt() { return -1; }
31};
32#endif
33
34//______________________________________________________________________________
35// Short description of AliDimIntNotifier
36//
37
38class AliDimIntNotifier : public TObject,
39 public TQObject,
40 public DimUpdatedInfo
41{
42public:
43
44 AliDimIntNotifier(const TString& service);
45
46 virtual ~AliDimIntNotifier() {}
47
48 void infoHandler();
49 void infoHandlerTest(Int_t fake);
50
51 void DimMessage(Int_t=-1); // *SIGNAL*
52
53 static void SetMainThreadId();
54
55private:
56 AliDimIntNotifier(const AliDimIntNotifier&); // Not implemented
57 AliDimIntNotifier& operator=(const AliDimIntNotifier&); // Not implemented
58
59 void StartTimer();
60 void StopTimer();
61
dc836d53 62 TTimer fReThreader;
63 TMutex fNotifyLck;
c6d78c69 64
dc836d53 65 Int_t fLastMessage;
c6d78c69 66
67 static Long_t fgMainThreadId;
68
69 ClassDef(AliDimIntNotifier, 0);
70};
71
72#endif