]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/trigger/AliHLTTriggerDetectorGeom.cxx
Fixes for coverity
[u/mrichter/AliRoot.git] / HLT / trigger / AliHLTTriggerDetectorGeom.cxx
index 0a40ee58640d7e928d73b3d651cf6834be84b2f9..e79eaa673a3d95ed1cfa143afbfaccac19faa168 100644 (file)
@@ -2,7 +2,7 @@
 //* This file is property of and copyright by the ALICE HLT Project        * 
 //* ALICE Experiment at CERN, All rights reserved.                         *
 //*                                                                        *
-//* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no>        *
+//* Primary Authors: Oystein Djuvsland                                     *
 //*                  for The ALICE HLT Project.                            *
 //*                                                                        *
 //* Permission to use, copy, modify and distribute this software and its   *
@@ -18,7 +18,7 @@
 /// @author Oystein Djuvsland
 /// @date   2009-10-08
 /// @brief  HLT class describing simple geometry of (sub-)detectors.
-///         Used for the AliHLTTriggerBarrelGeomMultiplicity classes
+///         Used for the AliHLTTriggerBarrelGeomMultiplicity class
 
 // see header file for class documentation
 // or
 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
 
 #include "AliHLTTriggerDetectorGeom.h"
+#include <ostream>
 
 /** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTriggerDetectorGeom)
 
-AliHLTTriggerDetectorGeom::AliHLTTriggerDetectorGeom() 
+AliHLTTriggerDetectorGeom::AliHLTTriggerDetectorGeom()
 : TObject(),
   fEtaMin(0),
   fEtaMax(0),
   fPhiMin(0),
   fPhiMax(0),
-  fInitalPoint(0),
-  fNormVector(0),
   fName('\0')
 {
   // See header file for class documentation
@@ -54,7 +53,7 @@ AliHLTTriggerDetectorGeom::~AliHLTTriggerDetectorGeom()
   // See header file for class documentation
 }
 
-void AliHLTTriggerDetectorGeom::SetInitialPoint(Double_t &point[3])
+void AliHLTTriggerDetectorGeom::SetInitialPoint(Double_t *point)
 {
   // See header file for class documentation
   for(int i = 0; i < 3; i++)
@@ -63,7 +62,8 @@ void AliHLTTriggerDetectorGeom::SetInitialPoint(Double_t &point[3])
     }
 }
 
-void AliHLTTriggerDetectorGeom::SetNormVector(Double_t &nVector[3])
+
+void AliHLTTriggerDetectorGeom::SetNormVector(Double_t *nVector)
 {
   // See header file for class documentation
   for(int i = 0; i < 3; i++)
@@ -71,3 +71,35 @@ void AliHLTTriggerDetectorGeom::SetNormVector(Double_t &nVector[3])
       fNormVector[i] = nVector[i];
     }
 }
+
+void AliHLTTriggerDetectorGeom::GetInitialPoint(Double_t *point)
+{
+  // See header file for class documentation
+  for(int i = 0; i < 3; i++)
+    {
+      point[i] = fInitalPoint[i];
+    }
+}
+
+void AliHLTTriggerDetectorGeom::GetNormVector(Double_t *vec)
+{
+  // See header file for class documentation
+  for(int i = 0; i < 3; i++)
+    {
+      vec[i] = fNormVector[i];
+    }
+}
+
+void AliHLTTriggerDetectorGeom::PrintDetectorGeom(std::ostream &out)
+{
+  // See header file for class documentation
+
+  out << "Name: " << fName << std::endl;
+  out << "Eta Min: " << fEtaMin << std::endl;
+  out << "Eta Max: " << fEtaMax << std::endl;
+  out << "Phi Min: " << fPhiMin << std::endl;
+  out << "Phi Max: " << fPhiMax << std::endl;
+  out << "Initial Point: {" << fInitalPoint[0] << ", " << fInitalPoint[1] << ", " << fInitalPoint[2] << "}" << std::endl; 
+  out << "Normal Vector: {" << fNormVector[0] << ", " << fNormVector[1] << ", " << fNormVector[2] << "}" << std::endl; 
+}
+