]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCMonitorDateMonitor.cxx
Removing obsolete macros
[u/mrichter/AliRoot.git] / TPC / AliTPCMonitorDateMonitor.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /*
17 $Log$
18 Revision 1.2  2007/09/17 16:34:54  cvetan
19 The package was overwriting the rootcint flags. This was fixed by applying the necessary changes in the DATE-dependent parts of the code
20
21 Revision 1.1  2007/09/17 10:23:31  cvetan
22 New TPC monitoring package from Stefan Kniege. The monitoring package can be started by running TPCMonitor.C macro located in macros folder.
23
24 */ 
25
26 ////////////////////////////////////////////////////////////////////////
27 //
28 // AliTPCMonitorDateMonitor class
29 // 
30 // Monitoring wrapper class for DATE raw data monitoring used by the TPC 
31 // raw data monitor.
32 // Online monitoring is only possible if DATE is installed on the machine.
33 // If not, raw data can be read using the AliTPCMonitorDateFile 
34 // (can be choosen from 'Sel.Format' in the TPCMonitor gui")
35 //
36 // Authors: Roland Bramm, 
37 //          Stefan Kniege, IKF, Frankfurt
38 //       
39 /////////////////////////////////////////////////////////////////////////
40
41
42
43 #include <iostream>
44 #include "AliTPCMonitorDateMonitor.h"
45 #include "event.h"
46 #include "monitor.h"
47
48 ClassImp(AliTPCMonitorDateMonitor)
49
50 //_____________________________________________________________________________
51 AliTPCMonitorDateMonitor::AliTPCMonitorDateMonitor():
52 fPointer(0)
53 {
54   // Constructor
55 }
56
57
58 //_____________________________________________________________________________
59 AliTPCMonitorDateMonitor::AliTPCMonitorDateMonitor(const AliTPCMonitorDateMonitor &datemon) :
60   TNamed(datemon.GetName(),datemon.GetTitle()),
61   fPointer(datemon.fPointer)
62 {
63   // copy constructor  
64 }
65
66 //_____________________________________________________________________________
67 AliTPCMonitorDateMonitor &AliTPCMonitorDateMonitor::operator =(const AliTPCMonitorDateMonitor& datemon)
68 {
69   // assignement operator
70   if(this!=&datemon){ 
71     fPointer=datemon.fPointer;
72   }
73
74   return *this;
75 }
76
77 //_____________________________________________________________________________
78 AliTPCMonitorDateMonitor::~AliTPCMonitorDateMonitor(){
79   // Destructor
80 }
81
82 //_____________________________________________________________________________
83 Int_t AliTPCMonitorDateMonitor::OpenMonitoring(string name){
84   // Set data source for the monitor
85         return monitorSetDataSource((char*)name.c_str());
86 }
87
88 //_____________________________________________________________________________
89 const char* AliTPCMonitorDateMonitor::DecodeError(Int_t error  ){
90   // Return decoded error string 
91   return monitorDecodeError(error);
92 }
93
94 //_____________________________________________________________________________
95 Int_t AliTPCMonitorDateMonitor::DeclareMonitor(string name){
96   // Declare monitorn Map
97   return monitorDeclareMp((char*)name.c_str());
98 }
99
100 //_____________________________________________________________________________
101 Int_t AliTPCMonitorDateMonitor::GetEvent(){
102   // Get next event
103   return monitorGetEventDynamic( (void**)&fPointer );
104 }
105  
106 //_____________________________________________________________________________
107 char *AliTPCMonitorDateMonitor::GetEventPointerasChar(){
108   // Return pointer to data mamory
109   return fPointer;
110 }
111
112 //_____________________________________________________________________________
113 Int_t AliTPCMonitorDateMonitor::Logout(){
114   // Logout the monitor
115   return monitorLogout();
116 }
117 //_____________________________________________________________________________
118 int AliTPCMonitorDateMonitor::FlushEvents(){
119   // Flush events 
120   return monitorFlushEvents();
121 }
122
123 //_____________________________________________________________________________
124 void  AliTPCMonitorDateMonitor::Free(){
125   // Free fPointer 
126   if(fPointer)free(fPointer);
127   fPointer = 0;
128 }