temporary fix of broken compilation when DATE is insalled
[u/mrichter/AliRoot.git] / MONITOR / alistoragemanager / AliDIMListenerThread.cxx
CommitLineData
186c4b6e 1#include "AliDIMListenerThread.h"
2
3#include <iostream>
4
5using namespace std;
6
7AliDIMListenerThread::AliDIMListenerThread()
8{
9 InitDIMListeners();
10
11#ifdef ALI_DATE
9cb99c70 12 /* DimCurrentInfo SORrunNumber("/LOGBOOK/SUBSCRIBE/DAQ_SOR_PHYSICS_1",-1);
186c4b6e 13 DimCurrentInfo EORrunNumber("/LOGBOOK/SUBSCRIBE/DAQ_EOR_PHYSICS_1",-1);
14
15 if(SORrunNumber.getData() && EORrunNumber.getData())
16 {
17 cout<<"DIM Listener -- current SOR signal:"<<SORrunNumber.getInt()<<endl;
18 cout<<"DIM Listener -- current EOR signal:"<<EORrunNumber.getInt()<<endl;
19
20 if(SORrunNumber.getInt() != EORrunNumber.getInt()){StartOfRun(SORrunNumber.getInt());}
21 }
9cb99c70 22 else{cout<<"DIM Listener -- no data received from dim server"<<endl;}*/
186c4b6e 23#endif
24}
25
26AliDIMListenerThread::~AliDIMListenerThread()
9cb99c70 27{/*
186c4b6e 28 for (int i = 0; i < 5; ++i){
29 if(fDimSORListener[i]) delete fDimSORListener[i];
30 if(fDimEORListener[i]) delete fDimEORListener[i];
31
32 fDimSORListener[i] = 0;
33 fDimEORListener[i] = 0;
9cb99c70 34 }*/
186c4b6e 35}
36
37void AliDIMListenerThread::InitDIMListeners()
9cb99c70 38{/*
186c4b6e 39 for (int i = 0; i < 5; ++i)
40 {
41#ifdef ALI_DATE
9cb99c70 42 if (i == 0)
186c4b6e 43 {
44 fDimSORListener[i] = new AliDimIntNotifier("/LOGBOOK/SUBSCRIBE/DAQ_SOR_PHYSICS");
45 fDimEORListener[i] = new AliDimIntNotifier("/LOGBOOK/SUBSCRIBE/DAQ_EOR_PHYSICS");
46 }
47 else
48 {
49 fDimSORListener[i] = new AliDimIntNotifier(Form("/LOGBOOK/SUBSCRIBE/DAQ_SOR_PHYSICS_%d", i));
50 fDimEORListener[i] = new AliDimIntNotifier(Form("/LOGBOOK/SUBSCRIBE/DAQ_EOR_PHYSICS_%d", i));
51 }
52
53 fDimSORListener[i]->Connect("DimMessage(int)", "AliDIMListenerThread", this, "StartOfRun(int)");
54 fDimEORListener[i]->Connect("DimMessage(int)", "AliDIMListenerThread", this, "EndOfRun(int)");
55#else
56 fDimSORListener[i]=0x0;
57 fDimEORListener[i]=0x0;
58#endif
59 }
9cb99c70 60 */
186c4b6e 61}
62
63void AliDIMListenerThread::StartOfRun(int run)
64{
65 cout<<"DIM Listener -- SOR signal received for run:"<<run<<endl;
66}
67
68void AliDIMListenerThread::EndOfRun(int run)
69{
70 cout<<"DIM Listener -- EOR signal received for run:"<<run<<endl;
9cb99c70 71}