Syntax for AliDebug fixed..
authorzampolli <zampolli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 16 Feb 2010 22:26:08 +0000 (22:26 +0000)
committerzampolli <zampolli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 16 Feb 2010 22:26:08 +0000 (22:26 +0000)
STEER/AliGRPObject.cxx

index 8eb2eea..51eba3e 100644 (file)
-/**************************************************************************\r
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r
- *                                                                        *\r
- * Author: The ALICE Off-line Project.                                    *\r
- * Contributors are mentioned in the code where appropriate.              *\r
- *                                                                        *\r
- * Permission to use, copy, modify and distribute this software and its   *\r
- * documentation strictly for non-commercial purposes is hereby granted   *\r
- * without fee, provided that the above copyright notice appears in all   *\r
- * copies and that both the copyright notice and this permission notice   *\r
- * appear in the supporting documentation. The authors make no claims     *\r
- * about the suitability of this software for any purpose. It is          *\r
- * provided "as is" without express or implied warranty.                  *\r
- **************************************************************************/\r
-\r
-/* $Id$ */\r
-\r
-// **********************\r
-// Class containing the GRP data that have to be stored in the OCDB.\r
-// Data come either from DAQ logbook or from DCS DB.\r
-// Processing of the data can also be performed here.\r
-// **********************\r
-\r
-#include <TMap.h>\r
-#include <TObject.h>\r
-#include <TObjString.h>\r
-\r
-#include "AliGRPObject.h"\r
-#include "AliDCSSensor.h"\r
-#include "AliLog.h"\r
-\r
-ClassImp(AliGRPObject)\r
-       \r
-const Float_t AliGRPObject::fgkInvalidFloat = 1E-33; // value to identify invalid data - float\r
-const TString AliGRPObject::fgkInvalidString = "";  // value to identify invalid data - string\r
-const Char_t AliGRPObject::fgkInvalidChar = -1;         // value to identify invalid data - uchar\r
-const Int_t AliGRPObject::fgkInvalidInt = -1;  // value to identify invalid data - uint\r
-const Int_t AliGRPObject::fgkInvalidUInt = 0;  // value to identify invalid data - uint\r
-const Int_t AliGRPObject::fgknDCSDPHallProbes = 40;   // number of dcs dps\r
-const char* AliGRPObject::fgkDCSDataPointsHallProbes[AliGRPObject::fgknDCSDPHallProbes] = {\r
-                  "L3_BSF17_H1",\r
-                  "L3_BSF17_H2",\r
-                  "L3_BSF17_H3",\r
-                  "L3_BSF17_Temperature",\r
-                  "L3_BSF4_H1",\r
-                  "L3_BSF4_H2",\r
-                  "L3_BSF4_H3",\r
-                  "L3_BSF4_Temperature",\r
-                  "L3_BKF17_H1",\r
-                  "L3_BKF17_H2",\r
-                  "L3_BKF17_H3",\r
-                  "L3_BKF17_Temperature",\r
-                  "L3_BKF4_H1",\r
-                  "L3_BKF4_H2",\r
-                  "L3_BKF4_H3",\r
-                  "L3_BKF4_Temperature",\r
-                  "L3_BSF13_H1",\r
-                  "L3_BSF13_H2",\r
-                  "L3_BSF13_H3",\r
-                  "L3_BSF13_Temperature",\r
-                  "L3_BSF8_H1",\r
-                  "L3_BSF8_H2",\r
-                  "L3_BSF8_H3",\r
-                  "L3_BSF8_Temperature",\r
-                  "L3_BKF13_H1",\r
-                  "L3_BKF13_H2",\r
-                  "L3_BKF13_H3",\r
-                  "L3_BKF13_Temperature",\r
-                  "L3_BKF8_H1",\r
-                  "L3_BKF8_H2",\r
-                  "L3_BKF8_H3",\r
-                  "L3_BKF8_Temperature",\r
-                  "Dipole_Inside_H1",\r
-                  "Dipole_Inside_H2",\r
-                  "Dipole_Inside_H3",\r
-                  "Dipole_Inside_Temperature",\r
-                  "Dipole_Outside_H1",\r
-                  "Dipole_Outside_H2",\r
-                  "Dipole_Outside_H3",\r
-                  "Dipole_Outside_Temperature",\r
-                 };\r
-\r
-//-----------------------------------------------------------------------------\r
-AliGRPObject::AliGRPObject():\r
-       TObject(),\r
-       fPoints(5),\r
-       fDimension(0),\r
-       fTimeStart((time_t)fgkInvalidFloat),\r
-       fTimeEnd((time_t)fgkInvalidFloat),\r
-       fBeamEnergy(fgkInvalidFloat),\r
-       fBeamType(fgkInvalidString),\r
-       fNumberOfDetectors(fgkInvalidChar),\r
-       fDetectorMask(fgkInvalidUInt),\r
-       fLHCPeriod(fgkInvalidString),\r
-       fRunType(fgkInvalidString),\r
-       fLHCState(fgkInvalidString),\r
-       fL3Polarity(fgkInvalidChar),\r
-       fDipolePolarity(fgkInvalidChar),\r
-       fL3Current(new Float_t[fPoints]),\r
-       fDipoleCurrent(new Float_t[fPoints]),\r
-       fCavernTemperature(new Float_t[fPoints]),\r
-       fCavernAtmosPressure(0x0),\r
-       fCavernAtmosPressure2(0x0),\r
-       fSurfaceAtmosPressure(0x0),\r
-       fHallProbes(0x0),\r
-       fMachineMode(fgkInvalidString),\r
-       fLHCStateArray(0x0),\r
-       fMachineModeArray(0x0),\r
-       fMaxTimeLHCValidity(0)\r
-{\r
-\r
-       //\r
-       // AliGRPObject default ctor\r
-       //\r
-\r
-       fDimension = fgknDCSDPHallProbes*fPoints;\r
-       fHallProbes = new Float_t[fDimension];\r
-\r
-       for (Int_t nhp=0; nhp< fDimension; nhp++){ // setting to zero values for non working HP \r
-               if ((nhp >= 0 && nhp <= 1*fPoints-1) || // L3_BSF17_H1\r
-                   (nhp >= 1*fPoints && nhp <= 2*fPoints-1) || // L3_BSF17_H2\r
-                   (nhp >= 2*fPoints && nhp <= 3*fPoints-1) || // L3_BSF17_H3\r
-                    (nhp >= 3*fPoints && nhp <= 4*fPoints-1) || // L3_BSF17_Temperature\r
-                    (nhp >= 6*fPoints && nhp <= 7*fPoints-1) ) { // L3_BSF4_H3\r
-                       fHallProbes[nhp] = 0; // setting to zero values for non working HP \r
-                       AliDebug(2,"setting hp[%d] to zero = %f", nhp, fHallProbes[nhp]);\r
-               }\r
-               else {\r
-                       fHallProbes[nhp] = fgkInvalidFloat;\r
-               }\r
-       }\r
-\r
-\r
-       for (Int_t i = 0; i < fPoints; i++){\r
-\r
-               fL3Current[i] = fgkInvalidFloat;\r
-               fDipoleCurrent[i] = fgkInvalidFloat;\r
-               fCavernTemperature[i] = fgkInvalidFloat;\r
-       }\r
-}\r
-\r
-//-----------------------------------------------------------------------------\r
-\r
-AliGRPObject::AliGRPObject(const AliGRPObject &obj):\r
-       TObject(obj),\r
-       fPoints(obj.fPoints),\r
-       fDimension(obj.fDimension),\r
-       fTimeStart(obj.fTimeStart),\r
-       fTimeEnd(obj.fTimeEnd),\r
-       fBeamEnergy(obj.fBeamEnergy),\r
-       fBeamType(obj.fBeamType),\r
-       fNumberOfDetectors(obj.fNumberOfDetectors),\r
-       fDetectorMask(obj.fDetectorMask),\r
-       fLHCPeriod(obj.fLHCPeriod),\r
-       fRunType(obj.fRunType),\r
-       fLHCState(obj.fLHCState),\r
-       fL3Polarity(obj.fL3Polarity),\r
-       fDipolePolarity(obj.fDipolePolarity),\r
-       fL3Current(new Float_t[fPoints]),\r
-       fDipoleCurrent(new Float_t[fPoints]),\r
-       fCavernTemperature(new Float_t[fPoints]),\r
-       fCavernAtmosPressure(obj.fCavernAtmosPressure),\r
-       fCavernAtmosPressure2(obj.fCavernAtmosPressure2),\r
-       fSurfaceAtmosPressure(obj.fSurfaceAtmosPressure),\r
-       fHallProbes(0x0),\r
-       fMachineMode(obj.fMachineMode),\r
-       fLHCStateArray(obj.fLHCStateArray),\r
-       fMachineModeArray(obj.fMachineModeArray),\r
-       fMaxTimeLHCValidity(obj.fMaxTimeLHCValidity)\r
-\r
-{\r
-\r
-       //\r
-       // AliGRPObject copy ctor\r
-       //\r
-\r
-       fHallProbes = new Float_t[fDimension]; \r
-\r
-       for (Int_t nhp=0; nhp< fDimension; nhp++){\r
-               fHallProbes[nhp] = obj.fHallProbes[nhp];\r
-       }\r
-\r
-       for (Int_t i = 0; i < fPoints; i++){\r
-\r
-               fL3Current[i] = obj.fL3Current[i];\r
-               fDipoleCurrent[i] = obj.fDipoleCurrent[i];\r
-               fCavernTemperature[i] = obj.fCavernTemperature[i];\r
-       }\r
-}\r
-\r
-//-----------------------------------------------------------------------------\r
-\r
-AliGRPObject& AliGRPObject:: operator=(const AliGRPObject & obj) \r
-{\r
-\r
-       //\r
-       // AliGRPObject assignment operator\r
-       //\r
-\r
-       if (&obj == this) return *this; \r
-\r
-       TObject::operator=(obj);\r
-       this->fTimeStart = obj.GetTimeStart();\r
-       this->fTimeEnd = obj.GetTimeEnd();\r
-       this->fBeamEnergy = obj.GetBeamEnergy();\r
-       this->fBeamType = obj.GetBeamType();\r
-       this->fNumberOfDetectors = obj.GetNumberOfDetectors();\r
-       this->fDetectorMask = obj.GetDetectorMask();\r
-       this->fLHCPeriod = obj.GetLHCPeriod();\r
-       this->fRunType = obj.GetRunType();\r
-       this->fLHCState = obj.GetLHCState();\r
-       this->fL3Polarity = obj.GetL3Polarity();\r
-       this->fDipolePolarity = obj.GetDipolePolarity();\r
-       this->fCavernAtmosPressure = obj.GetCavernAtmosPressure();\r
-       this->fCavernAtmosPressure2 = obj.GetCavernAtmosPressure2();\r
-       this->fSurfaceAtmosPressure = obj.GetSurfaceAtmosPressure();\r
-       this->fPoints = obj.GetPoints();\r
-       this->fDimension = obj.GetDimension();\r
-\r
-       this->fL3Current = new Float_t[fPoints];\r
-       this->fDipoleCurrent = new Float_t[fPoints];\r
-       this->fCavernTemperature = new Float_t[fPoints];\r
-       \r
-       if (this->fHallProbes==NULL) this->fHallProbes = new Float_t[this->fDimension]; \r
-       for (Int_t nhp=0; nhp< fDimension; nhp++){\r
-               this->fHallProbes[nhp] = obj.GetHallProbes(nhp);\r
-\r
-       }\r
-       for (Int_t i = 0; i < fPoints; i++){\r
-\r
-               this->fL3Current[i] = obj.GetL3Current((Stats)i);\r
-               this->fDipoleCurrent[i] = obj.GetDipoleCurrent((Stats)i);\r
-               this->fCavernTemperature[i] = obj.GetCavernTemperature((Stats)i);\r
-       }\r
-\r
-       this->fMachineMode = obj.fMachineMode;\r
-       this->fLHCStateArray = obj.fLHCStateArray;\r
-       this->fMachineModeArray = obj.fMachineModeArray;\r
-       this->fMaxTimeLHCValidity = obj.fMaxTimeLHCValidity;\r
-       return *this;\r
-}\r
-\r
-//-----------------------------------------------------------------------------\r
-\r
-AliGRPObject::~AliGRPObject() {\r
-\r
-       //\r
-       // dtor\r
-       //\r
-\r
-       \r
-       delete [] fHallProbes;\r
-       delete [] fL3Current;\r
-       delete [] fDipoleCurrent;\r
-       delete [] fCavernTemperature;\r
-\r
-       if (fCavernAtmosPressure){\r
-               delete fCavernAtmosPressure;\r
-               fCavernAtmosPressure = 0x0;\r
-       }\r
-       if (fCavernAtmosPressure2){\r
-               delete fCavernAtmosPressure2;\r
-               fCavernAtmosPressure2 = 0x0;\r
-       }\r
-       if (fSurfaceAtmosPressure){\r
-               delete fSurfaceAtmosPressure;\r
-               fSurfaceAtmosPressure = 0x0;\r
-       }\r
-       if (fLHCStateArray){\r
-               delete fLHCStateArray;\r
-               fLHCStateArray = 0x0;\r
-       }\r
-       if (fMachineModeArray){\r
-               delete fMachineModeArray;\r
-               fMachineModeArray = 0x0;\r
-       }\r
-}\r
-\r
-//-----------------------------------------------------------------------------\r
-Float_t* AliGRPObject::GetHallProbesArray(DP_HallProbes hp) const {\r
-\r
-       //\r
-       // method to return array of statistical\r
-        // variables for Hall Probe hp\r
-       //\r
-\r
-       Float_t* array = new Float_t[fPoints];\r
-       Int_t shift = fPoints*(Int_t)hp; \r
-       for (Int_t i=0;i<fPoints; i++){\r
-\r
-               array[i] = fHallProbes[shift+i];\r
-\r
-       }\r
-\r
-       return array;\r
-}\r
-//-------------------------------------------------------------------------------\r
-\r
-void AliGRPObject::SetHallProbes(DP_HallProbes hp, const Float_t* hall_probe){\r
-\r
-       //\r
-       // method to set hall probe hp \r
-       // from a given array\r
-       //\r
-\r
-       Int_t shift = fPoints*hp;\r
-       for (Int_t i = 0; i< fPoints; i++){\r
-\r
-               fHallProbes[i+shift] =  hall_probe[i];\r
-       }\r
-       return;\r
-}\r
-\r
-//-------------------------------------------------------------------------------\r
-\r
-void AliGRPObject::ReadValuesFromMap(const TMap* mapGRP){\r
-\r
-       //\r
-       // method to set the values of the GRP parameters \r
-       // reading them from the old format of the GRP \r
-       // object, i.e. a TMap\r
-       //\r
-\r
-       if (mapGRP->GetValue("fAliceStartTime")){\r
-               SetTimeStart((time_t)(((TObjString*)(mapGRP->GetValue("fAliceStartTime")))->GetString()).Atoi());\r
-       }\r
-       else {\r
-               AliError(Form("No fAliceStartTime value found in GRP map!"));\r
-       }\r
-       if (mapGRP->GetValue("fAliceStopTime")){\r
-               SetTimeEnd((time_t)(((TObjString*)(mapGRP->GetValue("fAliceStopTime")))->GetString()).Atoi());\r
-       }\r
-       \r
-       else { \r
-               AliError(Form("No fAliceStopTime value found in GRP map!"));\r
-       }\r
-\r
-       if(mapGRP->GetValue("fAliceBeamEnergy")){\r
-         double be = (((TObjString*)(mapGRP->GetValue("fAliceBeamEnergy")))->GetString()).Atof();\r
-         if (IsBeamEnergyIsSqrtSHalfGeV()) be/=2;   // old format was storig sqrt(s)\r
-         SetBeamEnergy(be);\r
-       }\r
-       else { \r
-               AliError(Form("No fAliceBeamEnergy value found in GRP map!"));\r
-       }\r
-       if(mapGRP->GetValue("fAliceBeamType")){\r
-               SetBeamType(((TObjString*)(mapGRP->GetValue("fAliceBeamType")))->GetString());\r
-       }\r
-       else { \r
-               AliError(Form("No fAliceBeamType value found in GRP map!"));\r
-       }\r
-       if(mapGRP->GetValue("fNumberOfDetectors")){\r
-               SetNumberOfDetectors((Char_t)(((TObjString*)(mapGRP->GetValue("fNumberOfDetectors")))->GetString()).Atoi()); \r
-       }\r
-       else { \r
-               AliError(Form("No fNumberOfDetectors value found in GRP map!"));\r
-       }\r
-       if(mapGRP->GetValue("fDetectorMask")){\r
-               SetDetectorMask((UInt_t)(((TObjString*)(mapGRP->GetValue("fDetectorMask")))->GetString()).Atoi());  \r
-       }\r
-       else { \r
-               AliError(Form("No fDetectorMask value found in GRP map!"));\r
-       }\r
-       if(mapGRP->GetValue("fLHCPeriod")){\r
-               SetLHCPeriod(((TObjString*)(mapGRP->GetValue("fLHCPeriod")))->GetString());\r
-       }\r
-       else { \r
-               AliError(Form("No fLHCPeriod value found in GRP map!"));\r
-       }\r
-       if(mapGRP->GetValue("fRunType")){\r
-               SetRunType(((TObjString*)(mapGRP->GetValue("fRunType")))->GetString());\r
-       }\r
-       else { \r
-               AliError(Form("No fRunType value found in GRP map!"));\r
-       }\r
-       if(mapGRP->GetValue("fLHCState")){\r
-               SetLHCState(((TObjString*)(mapGRP->GetValue("fLHCState")))->GetString());\r
-       }\r
-       else { \r
-               AliError(Form("No fLHCState value found in GRP map!"));\r
-       }\r
-       if(mapGRP->GetValue("fLHCluminosity")){\r
-               AliInfo(Form("fLHCLuminosity found, but not there anymore in the new object"));\r
-       }       \r
-       else { \r
-               AliError(Form("No fLHCLuminosity value found in GRP map!"));\r
-       }\r
-       if(mapGRP->GetValue("fBeamIntensity")){\r
-               AliInfo(Form("fBeamIntensity found, but not there anymore in the new object"));\r
-       }       \r
-       else { \r
-               AliError(Form("No fBeamIntensity value found in GRP map!"));\r
-       }\r
-       if(mapGRP->GetValue("fL3Polarity")){\r
-               SetL3Polarity((Char_t)(((TObjString*)(mapGRP->GetValue("fL3Polarity")))->GetString()).Atoi());\r
-       }       \r
-       else { \r
-               AliError(Form("No fL3Polarity value found in GRP map!"));\r
-       }\r
-       if(mapGRP->GetValue("fDipolePolarity")){\r
-               SetDipolePolarity((Char_t)(((TObjString*)(mapGRP->GetValue("fDipolePolarity")))->GetString()).Atoi());  \r
-       }       \r
-       else { \r
-               AliError(Form("No fDipolePolarity value found in GRP map!"));\r
-       }\r
-       if(mapGRP->GetValue("fL3Current")){\r
-               AliInfo(Form("fL3Current found, but porting only average to the new object, since the other values are not available in the old object"));\r
-               SetL3Current((Float_t)(((TObjString*)(mapGRP->GetValue("fL3Current")))->GetString()).Atof(),(Stats)0);\r
-       }       \r
-       else { \r
-               AliError(Form("No fL3Current value found in GRP map!"));\r
-       }\r
-       if(mapGRP->GetValue("fDipoleCurrent")){\r
-               AliInfo(Form("fDipoleCurrent found, but porting only average to the new object, since the other values are not available in the old object"));\r
-               SetDipoleCurrent((Float_t)(((TObjString*)(mapGRP->GetValue("fDipoleCurrent")))->GetString()).Atof(),(Stats)0);\r
-       }       \r
-       else { \r
-               AliError(Form("No fDipoleCurrent value found in GRP map!"));\r
-       }\r
-       if(mapGRP->GetValue("fCavernTemperature")){\r
-               AliInfo(Form("fCaverntemperature found, but porting only average to the new object, since the other values are not available in the old object"));\r
-               SetCavernTemperature((Float_t)(((TObjString*)(mapGRP->GetValue("fCavernTemperature")))->GetString()).Atof(),(Stats)0);\r
-       }       \r
-       else { \r
-               AliError(Form("No fCavernTemperature value found in GRP map!"));\r
-       }\r
-       if(mapGRP->GetValue("fCavernAtmosPressure")){\r
-               AliInfo(Form("fCavernAtmosPressure found, but not ported to the new object since of a different type"));\r
-       }       \r
-       else { \r
-               AliError(Form("No fCavernAtmosPressure value found in GRP map!"));\r
-       }\r
-       if(mapGRP->GetValue("fP2Pressure")){\r
-               SetSurfaceAtmosPressure((AliDCSSensor*)((TObjString*)(mapGRP->GetValue("fP2Pressure"))));\r
-       }\r
-       else { \r
-               AliError(Form("No fP2Pressure value found in GRP map!"));\r
-       }\r
-       \r
-       return;\r
-\r
-}\r
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id$ */
+
+// **********************
+// Class containing the GRP data that have to be stored in the OCDB.
+// Data come either from DAQ logbook or from DCS DB.
+// Processing of the data can also be performed here.
+// **********************
+
+#include <TMap.h>
+#include <TObject.h>
+#include <TObjString.h>
+
+#include "AliGRPObject.h"
+#include "AliDCSSensor.h"
+#include "AliLog.h"
+
+ClassImp(AliGRPObject)
+       
+const Float_t AliGRPObject::fgkInvalidFloat = 1E-33; // value to identify invalid data - float
+const TString AliGRPObject::fgkInvalidString = "";  // value to identify invalid data - string
+const Char_t AliGRPObject::fgkInvalidChar = -1;         // value to identify invalid data - uchar
+const Int_t AliGRPObject::fgkInvalidInt = -1;  // value to identify invalid data - uint
+const Int_t AliGRPObject::fgkInvalidUInt = 0;  // value to identify invalid data - uint
+const Int_t AliGRPObject::fgknDCSDPHallProbes = 40;   // number of dcs dps
+const char* AliGRPObject::fgkDCSDataPointsHallProbes[AliGRPObject::fgknDCSDPHallProbes] = {
+                  "L3_BSF17_H1",
+                  "L3_BSF17_H2",
+                  "L3_BSF17_H3",
+                  "L3_BSF17_Temperature",
+                  "L3_BSF4_H1",
+                  "L3_BSF4_H2",
+                  "L3_BSF4_H3",
+                  "L3_BSF4_Temperature",
+                  "L3_BKF17_H1",
+                  "L3_BKF17_H2",
+                  "L3_BKF17_H3",
+                  "L3_BKF17_Temperature",
+                  "L3_BKF4_H1",
+                  "L3_BKF4_H2",
+                  "L3_BKF4_H3",
+                  "L3_BKF4_Temperature",
+                  "L3_BSF13_H1",
+                  "L3_BSF13_H2",
+                  "L3_BSF13_H3",
+                  "L3_BSF13_Temperature",
+                  "L3_BSF8_H1",
+                  "L3_BSF8_H2",
+                  "L3_BSF8_H3",
+                  "L3_BSF8_Temperature",
+                  "L3_BKF13_H1",
+                  "L3_BKF13_H2",
+                  "L3_BKF13_H3",
+                  "L3_BKF13_Temperature",
+                  "L3_BKF8_H1",
+                  "L3_BKF8_H2",
+                  "L3_BKF8_H3",
+                  "L3_BKF8_Temperature",
+                  "Dipole_Inside_H1",
+                  "Dipole_Inside_H2",
+                  "Dipole_Inside_H3",
+                  "Dipole_Inside_Temperature",
+                  "Dipole_Outside_H1",
+                  "Dipole_Outside_H2",
+                  "Dipole_Outside_H3",
+                  "Dipole_Outside_Temperature",
+                 };
+
+//-----------------------------------------------------------------------------
+AliGRPObject::AliGRPObject():
+       TObject(),
+       fPoints(5),
+       fDimension(0),
+       fTimeStart((time_t)fgkInvalidFloat),
+       fTimeEnd((time_t)fgkInvalidFloat),
+       fBeamEnergy(fgkInvalidFloat),
+       fBeamType(fgkInvalidString),
+       fNumberOfDetectors(fgkInvalidChar),
+       fDetectorMask(fgkInvalidUInt),
+       fLHCPeriod(fgkInvalidString),
+       fRunType(fgkInvalidString),
+       fLHCState(fgkInvalidString),
+       fL3Polarity(fgkInvalidChar),
+       fDipolePolarity(fgkInvalidChar),
+       fL3Current(new Float_t[fPoints]),
+       fDipoleCurrent(new Float_t[fPoints]),
+       fCavernTemperature(new Float_t[fPoints]),
+       fCavernAtmosPressure(0x0),
+       fCavernAtmosPressure2(0x0),
+       fSurfaceAtmosPressure(0x0),
+       fHallProbes(0x0),
+       fMachineMode(fgkInvalidString),
+       fLHCStateArray(0x0),
+       fMachineModeArray(0x0),
+       fMaxTimeLHCValidity(0)
+{
+
+       //
+       // AliGRPObject default ctor
+       //
+
+       fDimension = fgknDCSDPHallProbes*fPoints;
+       fHallProbes = new Float_t[fDimension];
+
+       for (Int_t nhp=0; nhp< fDimension; nhp++){ // setting to zero values for non working HP 
+               if ((nhp >= 0 && nhp <= 1*fPoints-1) || // L3_BSF17_H1
+                   (nhp >= 1*fPoints && nhp <= 2*fPoints-1) || // L3_BSF17_H2
+                   (nhp >= 2*fPoints && nhp <= 3*fPoints-1) || // L3_BSF17_H3
+                    (nhp >= 3*fPoints && nhp <= 4*fPoints-1) || // L3_BSF17_Temperature
+                    (nhp >= 6*fPoints && nhp <= 7*fPoints-1) ) { // L3_BSF4_H3
+                       fHallProbes[nhp] = 0; // setting to zero values for non working HP 
+                       AliDebug(2,Form("setting hp[%d] to zero = %f", 
+nhp, fHallProbes[nhp]));
+               }
+               else {
+                       fHallProbes[nhp] = fgkInvalidFloat;
+               }
+       }
+
+
+       for (Int_t i = 0; i < fPoints; i++){
+
+               fL3Current[i] = fgkInvalidFloat;
+               fDipoleCurrent[i] = fgkInvalidFloat;
+               fCavernTemperature[i] = fgkInvalidFloat;
+       }
+}
+
+//-----------------------------------------------------------------------------
+
+AliGRPObject::AliGRPObject(const AliGRPObject &obj):
+       TObject(obj),
+       fPoints(obj.fPoints),
+       fDimension(obj.fDimension),
+       fTimeStart(obj.fTimeStart),
+       fTimeEnd(obj.fTimeEnd),
+       fBeamEnergy(obj.fBeamEnergy),
+       fBeamType(obj.fBeamType),
+       fNumberOfDetectors(obj.fNumberOfDetectors),
+       fDetectorMask(obj.fDetectorMask),
+       fLHCPeriod(obj.fLHCPeriod),
+       fRunType(obj.fRunType),
+       fLHCState(obj.fLHCState),
+       fL3Polarity(obj.fL3Polarity),
+       fDipolePolarity(obj.fDipolePolarity),
+       fL3Current(new Float_t[fPoints]),
+       fDipoleCurrent(new Float_t[fPoints]),
+       fCavernTemperature(new Float_t[fPoints]),
+       fCavernAtmosPressure(obj.fCavernAtmosPressure),
+       fCavernAtmosPressure2(obj.fCavernAtmosPressure2),
+       fSurfaceAtmosPressure(obj.fSurfaceAtmosPressure),
+       fHallProbes(0x0),
+       fMachineMode(obj.fMachineMode),
+       fLHCStateArray(obj.fLHCStateArray),
+       fMachineModeArray(obj.fMachineModeArray),
+       fMaxTimeLHCValidity(obj.fMaxTimeLHCValidity)
+
+{
+
+       //
+       // AliGRPObject copy ctor
+       //
+
+       fHallProbes = new Float_t[fDimension]; 
+
+       for (Int_t nhp=0; nhp< fDimension; nhp++){
+               fHallProbes[nhp] = obj.fHallProbes[nhp];
+       }
+
+       for (Int_t i = 0; i < fPoints; i++){
+
+               fL3Current[i] = obj.fL3Current[i];
+               fDipoleCurrent[i] = obj.fDipoleCurrent[i];
+               fCavernTemperature[i] = obj.fCavernTemperature[i];
+       }
+}
+
+//-----------------------------------------------------------------------------
+
+AliGRPObject& AliGRPObject:: operator=(const AliGRPObject & obj) 
+{
+
+       //
+       // AliGRPObject assignment operator
+       //
+
+       if (&obj == this) return *this; 
+
+       TObject::operator=(obj);
+       this->fTimeStart = obj.GetTimeStart();
+       this->fTimeEnd = obj.GetTimeEnd();
+       this->fBeamEnergy = obj.GetBeamEnergy();
+       this->fBeamType = obj.GetBeamType();
+       this->fNumberOfDetectors = obj.GetNumberOfDetectors();
+       this->fDetectorMask = obj.GetDetectorMask();
+       this->fLHCPeriod = obj.GetLHCPeriod();
+       this->fRunType = obj.GetRunType();
+       this->fLHCState = obj.GetLHCState();
+       this->fL3Polarity = obj.GetL3Polarity();
+       this->fDipolePolarity = obj.GetDipolePolarity();
+       this->fCavernAtmosPressure = obj.GetCavernAtmosPressure();
+       this->fCavernAtmosPressure2 = obj.GetCavernAtmosPressure2();
+       this->fSurfaceAtmosPressure = obj.GetSurfaceAtmosPressure();
+       this->fPoints = obj.GetPoints();
+       this->fDimension = obj.GetDimension();
+
+       this->fL3Current = new Float_t[fPoints];
+       this->fDipoleCurrent = new Float_t[fPoints];
+       this->fCavernTemperature = new Float_t[fPoints];
+       
+       if (this->fHallProbes==NULL) this->fHallProbes = new Float_t[this->fDimension]; 
+       for (Int_t nhp=0; nhp< fDimension; nhp++){
+               this->fHallProbes[nhp] = obj.GetHallProbes(nhp);
+
+       }
+       for (Int_t i = 0; i < fPoints; i++){
+
+               this->fL3Current[i] = obj.GetL3Current((Stats)i);
+               this->fDipoleCurrent[i] = obj.GetDipoleCurrent((Stats)i);
+               this->fCavernTemperature[i] = obj.GetCavernTemperature((Stats)i);
+       }
+
+       this->fMachineMode = obj.fMachineMode;
+       this->fLHCStateArray = obj.fLHCStateArray;
+       this->fMachineModeArray = obj.fMachineModeArray;
+       this->fMaxTimeLHCValidity = obj.fMaxTimeLHCValidity;
+       return *this;
+}
+
+//-----------------------------------------------------------------------------
+
+AliGRPObject::~AliGRPObject() {
+
+       //
+       // dtor
+       //
+
+       
+       delete [] fHallProbes;
+       delete [] fL3Current;
+       delete [] fDipoleCurrent;
+       delete [] fCavernTemperature;
+
+       if (fCavernAtmosPressure){
+               delete fCavernAtmosPressure;
+               fCavernAtmosPressure = 0x0;
+       }
+       if (fCavernAtmosPressure2){
+               delete fCavernAtmosPressure2;
+               fCavernAtmosPressure2 = 0x0;
+       }
+       if (fSurfaceAtmosPressure){
+               delete fSurfaceAtmosPressure;
+               fSurfaceAtmosPressure = 0x0;
+       }
+       if (fLHCStateArray){
+               delete fLHCStateArray;
+               fLHCStateArray = 0x0;
+       }
+       if (fMachineModeArray){
+               delete fMachineModeArray;
+               fMachineModeArray = 0x0;
+       }
+}
+
+//-----------------------------------------------------------------------------
+Float_t* AliGRPObject::GetHallProbesArray(DP_HallProbes hp) const {
+
+       //
+       // method to return array of statistical
+        // variables for Hall Probe hp
+       //
+
+       Float_t* array = new Float_t[fPoints];
+       Int_t shift = fPoints*(Int_t)hp; 
+       for (Int_t i=0;i<fPoints; i++){
+
+               array[i] = fHallProbes[shift+i];
+
+       }
+
+       return array;
+}
+//-------------------------------------------------------------------------------
+
+void AliGRPObject::SetHallProbes(DP_HallProbes hp, const Float_t* hall_probe){
+
+       //
+       // method to set hall probe hp 
+       // from a given array
+       //
+
+       Int_t shift = fPoints*hp;
+       for (Int_t i = 0; i< fPoints; i++){
+
+               fHallProbes[i+shift] =  hall_probe[i];
+       }
+       return;
+}
+
+//-------------------------------------------------------------------------------
+
+void AliGRPObject::ReadValuesFromMap(const TMap* mapGRP){
+
+       //
+       // method to set the values of the GRP parameters 
+       // reading them from the old format of the GRP 
+       // object, i.e. a TMap
+       //
+
+       if (mapGRP->GetValue("fAliceStartTime")){
+               SetTimeStart((time_t)(((TObjString*)(mapGRP->GetValue("fAliceStartTime")))->GetString()).Atoi());
+       }
+       else {
+               AliError(Form("No fAliceStartTime value found in GRP map!"));
+       }
+       if (mapGRP->GetValue("fAliceStopTime")){
+               SetTimeEnd((time_t)(((TObjString*)(mapGRP->GetValue("fAliceStopTime")))->GetString()).Atoi());
+       }
+       
+       else { 
+               AliError(Form("No fAliceStopTime value found in GRP map!"));
+       }
+
+       if(mapGRP->GetValue("fAliceBeamEnergy")){
+         double be = (((TObjString*)(mapGRP->GetValue("fAliceBeamEnergy")))->GetString()).Atof();
+         if (IsBeamEnergyIsSqrtSHalfGeV()) be/=2;   // old format was storig sqrt(s)
+         SetBeamEnergy(be);
+       }
+       else { 
+               AliError(Form("No fAliceBeamEnergy value found in GRP map!"));
+       }
+       if(mapGRP->GetValue("fAliceBeamType")){
+               SetBeamType(((TObjString*)(mapGRP->GetValue("fAliceBeamType")))->GetString());
+       }
+       else { 
+               AliError(Form("No fAliceBeamType value found in GRP map!"));
+       }
+       if(mapGRP->GetValue("fNumberOfDetectors")){
+               SetNumberOfDetectors((Char_t)(((TObjString*)(mapGRP->GetValue("fNumberOfDetectors")))->GetString()).Atoi()); 
+       }
+       else { 
+               AliError(Form("No fNumberOfDetectors value found in GRP map!"));
+       }
+       if(mapGRP->GetValue("fDetectorMask")){
+               SetDetectorMask((UInt_t)(((TObjString*)(mapGRP->GetValue("fDetectorMask")))->GetString()).Atoi());  
+       }
+       else { 
+               AliError(Form("No fDetectorMask value found in GRP map!"));
+       }
+       if(mapGRP->GetValue("fLHCPeriod")){
+               SetLHCPeriod(((TObjString*)(mapGRP->GetValue("fLHCPeriod")))->GetString());
+       }
+       else { 
+               AliError(Form("No fLHCPeriod value found in GRP map!"));
+       }
+       if(mapGRP->GetValue("fRunType")){
+               SetRunType(((TObjString*)(mapGRP->GetValue("fRunType")))->GetString());
+       }
+       else { 
+               AliError(Form("No fRunType value found in GRP map!"));
+       }
+       if(mapGRP->GetValue("fLHCState")){
+               SetLHCState(((TObjString*)(mapGRP->GetValue("fLHCState")))->GetString());
+       }
+       else { 
+               AliError(Form("No fLHCState value found in GRP map!"));
+       }
+       if(mapGRP->GetValue("fLHCluminosity")){
+               AliInfo(Form("fLHCLuminosity found, but not there anymore in the new object"));
+       }       
+       else { 
+               AliError(Form("No fLHCLuminosity value found in GRP map!"));
+       }
+       if(mapGRP->GetValue("fBeamIntensity")){
+               AliInfo(Form("fBeamIntensity found, but not there anymore in the new object"));
+       }       
+       else { 
+               AliError(Form("No fBeamIntensity value found in GRP map!"));
+       }
+       if(mapGRP->GetValue("fL3Polarity")){
+               SetL3Polarity((Char_t)(((TObjString*)(mapGRP->GetValue("fL3Polarity")))->GetString()).Atoi());
+       }       
+       else { 
+               AliError(Form("No fL3Polarity value found in GRP map!"));
+       }
+       if(mapGRP->GetValue("fDipolePolarity")){
+               SetDipolePolarity((Char_t)(((TObjString*)(mapGRP->GetValue("fDipolePolarity")))->GetString()).Atoi());  
+       }       
+       else { 
+               AliError(Form("No fDipolePolarity value found in GRP map!"));
+       }
+       if(mapGRP->GetValue("fL3Current")){
+               AliInfo(Form("fL3Current found, but porting only average to the new object, since the other values are not available in the old object"));
+               SetL3Current((Float_t)(((TObjString*)(mapGRP->GetValue("fL3Current")))->GetString()).Atof(),(Stats)0);
+       }       
+       else { 
+               AliError(Form("No fL3Current value found in GRP map!"));
+       }
+       if(mapGRP->GetValue("fDipoleCurrent")){
+               AliInfo(Form("fDipoleCurrent found, but porting only average to the new object, since the other values are not available in the old object"));
+               SetDipoleCurrent((Float_t)(((TObjString*)(mapGRP->GetValue("fDipoleCurrent")))->GetString()).Atof(),(Stats)0);
+       }       
+       else { 
+               AliError(Form("No fDipoleCurrent value found in GRP map!"));
+       }
+       if(mapGRP->GetValue("fCavernTemperature")){
+               AliInfo(Form("fCaverntemperature found, but porting only average to the new object, since the other values are not available in the old object"));
+               SetCavernTemperature((Float_t)(((TObjString*)(mapGRP->GetValue("fCavernTemperature")))->GetString()).Atof(),(Stats)0);
+       }       
+       else { 
+               AliError(Form("No fCavernTemperature value found in GRP map!"));
+       }
+       if(mapGRP->GetValue("fCavernAtmosPressure")){
+               AliInfo(Form("fCavernAtmosPressure found, but not ported to the new object since of a different type"));
+       }       
+       else { 
+               AliError(Form("No fCavernAtmosPressure value found in GRP map!"));
+       }
+       if(mapGRP->GetValue("fP2Pressure")){
+               SetSurfaceAtmosPressure((AliDCSSensor*)((TObjString*)(mapGRP->GetValue("fP2Pressure"))));
+       }
+       else { 
+               AliError(Form("No fP2Pressure value found in GRP map!"));
+       }
+       
+       return;
+
+}