]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliESDFMD.cxx
Fixes in the memory managment, additional protections
[u/mrichter/AliRoot.git] / STEER / AliESDFMD.cxx
index 49f49a2c5c9b6d5422c54d014bc4fa5a4dce5310..c7e367d6df84537879ddc69f21eb63372ae324f2 100755 (executable)
@@ -43,7 +43,9 @@ AliESDFMD::AliESDFMD()
     fEta(AliFMDFloatMap::kMaxDetectors, 
         AliFMDFloatMap::kMaxRings, 
         1,
-        AliFMDFloatMap::kMaxStrips)
+        AliFMDFloatMap::kMaxStrips), 
+    fNoiseFactor(0),
+    fAngleCorrected(kFALSE)
 {
   // Default CTOR
 }
@@ -52,7 +54,9 @@ AliESDFMD::AliESDFMD()
 AliESDFMD::AliESDFMD(const AliESDFMD& other)
   : TObject(other), 
     fMultiplicity(other.fMultiplicity),
-    fEta(other.fEta)
+    fEta(other.fEta),
+    fNoiseFactor(other.fNoiseFactor),
+    fAngleCorrected(other.fAngleCorrected)
 {
   // Default CTOR
 }
@@ -62,11 +66,22 @@ AliESDFMD&
 AliESDFMD::operator=(const AliESDFMD& other)
 {
   // Default CTOR
-  fMultiplicity = other.fMultiplicity;
-  fEta          = other.fEta;
+  if(this!=&other){
+    TObject::operator=(other);
+    fMultiplicity = other.fMultiplicity;
+    fEta          = other.fEta;
+  }
   return *this;
 }
 
+//____________________________________________________________________
+void
+AliESDFMD::CheckNeedUShort(TFile* file) 
+{
+  fMultiplicity.CheckNeedUShort(file);
+  fEta.CheckNeedUShort(file);
+}
+
 //____________________________________________________________________
 void
 AliESDFMD::Clear(Option_t* )
@@ -136,13 +151,13 @@ AliESDFMD::Print(Option_t* /* option*/) const
 {
   // Print all information to standard output. 
   std::cout << "AliESDFMD:" << std::endl;
-  for (size_t det = 1; det <= fMultiplicity.MaxDetectors(); det++) {
-    for (size_t ir = 0; ir < fMultiplicity.MaxRings(); ir++) {
+  for (UShort_t det = 1; det <= fMultiplicity.MaxDetectors(); det++) {
+    for (UShort_t ir = 0; ir < fMultiplicity.MaxRings(); ir++) {
       Char_t ring = (ir == 0 ? 'I' : 'O');
       std::cout << "FMD" << det << ring << ":" << std::endl;
-      for  (size_t sec = 0; sec < fMultiplicity.MaxSectors(); sec++) {
+      for  (UShort_t sec = 0; sec < fMultiplicity.MaxSectors(); sec++) {
        std::cout << " Sector # " << sec << ":" << std::flush;
-       for (size_t str = 0; str < fMultiplicity.MaxStrips(); str++) {
+       for (UShort_t str = 0; str < fMultiplicity.MaxStrips(); str++) {
          if (str % 6 == 0) std::cout << "\n  " << std::flush;
          Float_t m = fMultiplicity(det, ring, sec, str);
          Float_t e = fEta(det, ring, 0, str);