]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MONITOR/AliMonitorProcess.h
Added additional jet energy info
[u/mrichter/AliRoot.git] / MONITOR / AliMonitorProcess.h
1 #ifndef ALIMONITORPROCESS_H
2 #define ALIMONITORPROCESS_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 #include <TObject.h>
9 #include <TString.h>
10 #include <TFolder.h>
11 #include <TFile.h>
12 #include <TTree.h>
13 #include <TObjArray.h>
14 #include <TServerSocket.h>
15 #include <TTimer.h>
16 #include <TGrid.h>
17 #include "AliRunLoader.h"
18 #include "AliRawReader.h"
19 #include "AliTPCParam.h"
20 #include "AliITSgeom.h"
21
22
23 class AliMonitorProcess : public TObject {
24 public:
25   AliMonitorProcess(const char* alienDir,
26                     const char* fileNameGalice = "galice.root");
27   virtual ~AliMonitorProcess();
28
29   static const char* GetRevision();
30
31   void             Run();
32   void             Stop();
33   void             Reset();
34
35   void             ProcessFile(const char* fileName);
36
37   UInt_t           GetRunNumber() {return fRunNumber;};
38   UInt_t           GetEventPeriodNumber();
39   UInt_t           GetEventOrbitNumber();
40   UInt_t           GetEventBunchNumber();
41
42   enum EStatus     {kStopped, kWaiting, kReading, kRecTPC, kRecITS, kRecV0s,
43                     kFilling, kUpdating, kWriting, kResetting, 
44                     kConnecting, kBroadcasting};
45   EStatus          GetStatus() {return fStatus;};
46   Bool_t           WillStop() {return fStopping;};
47   Bool_t           IsStopped() {return (fStatus == kStopped);};
48
49   Int_t            GetNumberOfEvents() {return fNEvents;};
50   Int_t            GetNumberOfClients() {return fSockets.GetEntriesFast();};
51   TObjArray*       GetListOfClients() {return &fSockets;};
52   Int_t            GetNEventsMin() {return fNEventsMin;};
53   void             SetNEventsMin(Int_t nEventsMin) {fNEventsMin = nEventsMin;};
54   void             SetWriteHistoList(Bool_t writeHistoList = kTRUE) 
55                                          {fWriteHistoList = writeHistoList;};
56   
57   static const Int_t kgPort;
58
59 private:
60   Bool_t           CheckForNewFile();
61   Bool_t           ProcessFile();
62   Int_t            GetNumberOfEvents(const char* fileName);
63   Bool_t           ReconstructTPC(AliRawReader* rawReader);
64   Bool_t           ReconstructITS(AliRawReader* rawReader);
65   Bool_t           ReconstructV0s();
66
67   Bool_t           WriteHistos();
68   void             StartNewRun();
69
70   void             CheckForConnections();
71   void             BroadcastHistos();
72
73   TGrid*           fGrid;
74   AliRunLoader*    fRunLoader;
75   AliTPCParam*     fTPCParam;
76   AliITSgeom*      fITSgeom;
77   TString          fLogicalFileName;
78   TString          fFileName;
79
80   UInt_t           fRunNumber;
81   UInt_t           fSubRunNumber;
82   UInt_t           fEventNumber[2];
83   Int_t            fNEvents;
84   Int_t            fNEventsMin;
85   Bool_t           fWriteHistoList;
86
87   TFolder*         fTopFolder;
88   TObjArray        fMonitors;
89   TFile*           fFile;
90   TTree*           fTree;
91
92   TServerSocket*   fServerSocket;
93   TObjArray        fSockets;
94   TSocket*         fDisplaySocket;
95
96   EStatus          fStatus;
97   Bool_t           fStopping;
98
99   ClassDef(AliMonitorProcess, 0)   // class for performing the monitoring
100 };
101  
102
103 #endif
104
105
106
107
108
109
110
111
112