Survey data management
authorcheynis <cheynis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 16 Apr 2007 12:44:17 +0000 (12:44 +0000)
committercheynis <cheynis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 16 Apr 2007 12:44:17 +0000 (12:44 +0000)
VZERO/AliVZEROSurveyData.cxx [new file with mode: 0644]
VZERO/AliVZEROSurveyData.h [new file with mode: 0644]

diff --git a/VZERO/AliVZEROSurveyData.cxx b/VZERO/AliVZEROSurveyData.cxx
new file mode 100644 (file)
index 0000000..50b0e3d
--- /dev/null
@@ -0,0 +1,119 @@
+/**************************************************************************
+ * 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: AliVZEROSurveyData.cxx,                                            */
+
+/////////////////////////////////////////////////////////////////////////////
+//                                                                         //
+// class for VZERO survey points management                                //
+//                                                                         //
+/////////////////////////////////////////////////////////////////////////////
+
+#include "AliVZEROSurveyData.h"
+
+ClassImp(AliVZEROSurveyData)
+
+//________________________________________________________________
+AliVZEROSurveyData::AliVZEROSurveyData()
+{
+  
+}
+
+//________________________________________________________________
+void AliVZEROSurveyData::Reset()
+{
+  
+}
+
+//________________________________________________________________
+AliVZEROSurveyData::AliVZEROSurveyData(const char* name)
+{
+  TString namst = "Survey_";
+  namst += name;
+  SetName(namst.Data());
+  SetTitle(namst.Data());
+
+}
+
+//________________________________________________________________
+AliVZEROSurveyData::AliVZEROSurveyData(const AliVZEROSurveyData& surveyda) :
+  TNamed(surveyda)
+{
+// copy constructor
+
+  SetName(surveyda.GetName());
+  SetTitle(surveyda.GetName());
+  
+  for(int t=0; t<3; t++) { 
+      fngA[t] = surveyda.GetPointA(t);
+      fngB[t] = surveyda.GetPointB(t);
+      fngC[t] = surveyda.GetPointC(t);
+      fngD[t] = surveyda.GetPointD(t);
+  }   
+  
+}
+
+//________________________________________________________________
+AliVZEROSurveyData &AliVZEROSurveyData::operator =(const AliVZEROSurveyData& surveyda)
+{
+// assignment operator
+
+  SetName(surveyda.GetName());
+  SetTitle(surveyda.GetName());
+  
+  for(int t=0; t<3; t++) { 
+      fngA[t] = surveyda.GetPointA(t);
+      fngB[t] = surveyda.GetPointB(t);
+      fngC[t] = surveyda.GetPointC(t);
+      fngD[t] = surveyda.GetPointD(t);
+  }   
+    
+  return *this;
+  
+}
+
+//________________________________________________________________
+AliVZEROSurveyData::~AliVZEROSurveyData()
+{
+  
+}                                                                                  
+
+//________________________________________________________________
+void AliVZEROSurveyData::SetPointA(Float_t* ngA)
+{
+  if(ngA) for(int t=0; t<3; t++) fngA[t] = ngA[t];
+  else for(int t=0; t<3; t++) fngA[t] = 0.0;
+}
+
+//________________________________________________________________
+void AliVZEROSurveyData::SetPointB(Float_t* ngB)
+{
+  if(ngB) for(int t=0; t<3; t++) fngB[t] = ngB[t];
+  else for(int t=0; t<3; t++) fngB[t] = 0.0;
+}
+//________________________________________________________________
+void AliVZEROSurveyData::SetPointC(Float_t* ngC)
+{
+  if(ngC) for(int t=0; t<3; t++) fngC[t] = ngC[t];
+  else for(int t=0; t<3; t++) fngC[t] = 0.0;
+}
+
+//________________________________________________________________
+void AliVZEROSurveyData::SetPointD(Float_t* ngD)
+{
+  if(ngD) for(int t=0; t<3; t++) fngD[t] = ngD[t];
+  else for(int t=0; t<3; t++) fngD[t] = 0.0;
+}
+
diff --git a/VZERO/AliVZEROSurveyData.h b/VZERO/AliVZEROSurveyData.h
new file mode 100644 (file)
index 0000000..3d0a848
--- /dev/null
@@ -0,0 +1,53 @@
+#ifndef ALIVZEROSurveyDATA_H
+#define ALIVZEROSurveyDATA_H
+
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+////////////////////////////////////////////////
+//                                            // 
+//  class for VZERO survey points management  //
+//                                            //
+////////////////////////////////////////////////
+
+#include "TNamed.h"
+#include "AliVZERO.h"
+
+class AliVZEROSurveyData: public TNamed {
+
+ public:
+  AliVZEROSurveyData();
+  AliVZEROSurveyData(const char* name);
+  AliVZEROSurveyData(const AliVZEROSurveyData &calibda);
+  AliVZEROSurveyData& operator= (const AliVZEROSurveyData &calibda);
+  virtual ~AliVZEROSurveyData();
+  void Reset();
+
+  Float_t  GetPointA(Int_t ngA)   const {return fngA[ngA];}
+  Float_t* GetPointA()   const {return (float*)fngA;}
+  Float_t  GetPointB(Int_t ngB)   const {return fngB[ngB];}
+  Float_t* GetPointB()   const {return (float*)fngB;}
+  Float_t  GetPointC(Int_t ngC)   const {return fngC[ngC];}
+  Float_t* GetPointC()   const {return (float*)fngC;}
+  Float_t  GetPointD(Int_t ngD)   const {return fngD[ngD];}
+  Float_t* GetPointD()   const {return (float*)fngD;}
+  
+  void     SetPointA(Float_t val, Int_t channel) {fngA[channel]=val;}
+  void     SetPointA(Float_t* ngA);
+  void     SetPointB(Float_t val, Int_t channel) {fngB[channel]=val;}
+  void     SetPointB(Float_t* ngB);
+  void     SetPointC(Float_t val, Int_t channel) {fngC[channel]=val;}
+  void     SetPointC(Float_t* ngC);
+  void     SetPointD(Float_t val, Int_t channel) {fngD[channel]=val;}
+  void     SetPointD(Float_t* ngD);
+  
+ protected:
+  Float_t  fngA[3];     //  Fiducial point A
+  Float_t  fngB[3];     //  Fiducial point B
+  Float_t  fngC[3];     //  Fiducial point C
+  Float_t  fngD[3];     //  Fiducial point D
+  
+  ClassDef(AliVZEROSurveyData,1)    // VZERO Survey data
+};
+
+#endif