Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / ACORDE / AliACORDEDataDCS.cxx
index 757a17f..daf97e5 100644 (file)
@@ -8,6 +8,11 @@
   ACORDE-DCS creator: Mario Ivan Martinez Hdez
                        <mim@fcfm.buap.mx>
 
+  Last update: June 13th 2014 from Mario Rodríguez Cahuantzi (CINVESTAV, mrodriguez@fis.cinvestav.mx)
+       ==> wrong ACORDE aliases for AMANDA fixed (https://alice.its.cern.ch/jira/browse/ALIROOT-5479)
+               -- old alias: ACO_HV_MODULE[0..59]_VMON
+               -- new alias: ACO_HV_MODULE[0..59]_INSIDE_VMON ()/ ACO_HV_MODULE[0..59]_OUTSIDE_VMON
+
   Last update: Fix of coding violations
   Mario Rodriguez C. (FCFM-BUAP)
   <mrodrigu@mail.cern.ch>
@@ -40,7 +45,11 @@ AliACORDEDataDCS::AliACORDEDataDCS():
         fFunc(0),
        fIsProcessed(kFALSE)
 {
-       for(int i=0;i<kNHistos;i++) fHv[i]=0x0;
+       for(int i=0;i<kNHistos;i++) 
+       {
+               fHv[i]=0x0;
+               fMean[i] = fWidth[i] = 0.0;
+       }
         
 }
 
@@ -69,7 +78,10 @@ AliACORDEDataDCS::AliACORDEDataDCS(Int_t nRun, UInt_t startTime, UInt_t endTime)
 //---------------------------------------------------------------
 AliACORDEDataDCS::~AliACORDEDataDCS() {
 
-       for(int i=0;i<kNHistos;i++) {delete fHv[i]; fHv[i]=0;}
+       for(int i=0;i<kNHistos;i++) 
+       {
+               delete fHv[i]; fHv[i]=0;
+       }
        fGraphs.Clear("C");
        fFunc=0;
 }
@@ -96,7 +108,12 @@ fIsProcessed(kFALSE)
 
         for(int i=0;i<kNAliases;i++){fAliasNames[i] = data.fAliasNames[i];}
 
-        for(int i=0;i<kNHistos;i++){fHv[i]=data.fHv[i];}
+        for(int i=0;i<kNHistos;i++)
+       {
+               fHv[i]=data.fHv[i];
+               fMean[i]=data.fMean[i];
+               fWidth[i]=data.fWidth[i];
+       }
 
 
 
@@ -105,20 +122,12 @@ fIsProcessed(kFALSE)
 //--------------------------------------------------------------
 AliACORDEDataDCS& AliACORDEDataDCS:: operator=(const AliACORDEDataDCS & data) { 
 
-       
-        this->fRun=data.fRun;
-       this->fStartTime=data.fStartTime;
-       this->fEndTime=data.fEndTime;
-       this->fFunc=data.fFunc;
-       this->fIsProcessed=data.fIsProcessed;
-
-
-        for(int i=0;i<kNAliases;i++){this->fAliasNames[i] = data.fAliasNames[i];}
+       // use ctor copy
 
-        for(int i=0;i<kNHistos;i++){this->fHv[i]=data.fHv[i];}
+       if (&data == this) return *this;
 
-       
-         return *this;
+       new (this) AliACORDEDataDCS(data);
+       return *this;
  
 }
 //---------------------------------------------------------------
@@ -143,7 +152,7 @@ void AliACORDEDataDCS::ProcessData(TMap& aliasMap)
 
                if(aliasArr->GetEntries()<2)
                 {
-                       AliError(Form("Alias %s has just %d entries!",
+               AliError(Form("Alias %s has just %d entries!",
                                        fAliasNames[j].Data(),aliasArr->GetEntries()));
                        continue;
                }
@@ -197,8 +206,13 @@ void AliACORDEDataDCS::Init()
         TString aliasName;
 
        for(int i=0;i<kNAliases;i++){
-
-                aliasName.Form("ACO_HV_MODULE%02d_VMON",i); 
+               if (i<kNAliases/2)
+               {
+                       aliasName.Form("ACO_HV_MODULE%02d_INSIDE_VMON",i);  //!::: first 60 entries for inside PMT's
+               }else
+               {
+                       aliasName.Form("ACO_HV_MODULE%02d_OUTSIDE_VMON",i-60); //!::: last 60 entries for outside PMT's
+               }
                fAliasNames[i] = aliasName;
        }