]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSHandleDaSSD.cxx
1.The QA data created on demand according to the event species at filling time. 2...
[u/mrichter/AliRoot.git] / ITS / AliITSHandleDaSSD.cxx
index 07bc44c9268bf2cb591aa0762836eaeca60be0a2..790a7fc56a7036db5b5aed3a0487a8444f240180 100644 (file)
@@ -34,9 +34,9 @@
 #include "TFile.h"
 #include "TString.h"
 #include "AliLog.h"
-#include "AliITSNoiseSSD.h"
-#include "AliITSPedestalSSD.h"
-#include "AliITSBadChannelsSSD.h"
+#include "AliITSNoiseSSDv2.h"
+#include "AliITSPedestalSSDv2.h"
+#include "AliITSBadChannelsSSDv2.h"
 #include "AliITSRawStreamSSD.h"
 #include "AliRawReaderDate.h"
 #include "AliITSRawStreamSSD.h"
@@ -461,7 +461,7 @@ Bool_t AliITSHandleDaSSD::ReadStaticBadChannelsMap(const Char_t *filename)
     AliWarning(Form("Error reading file %s with Static Bad Channels Map!", filename));
     return kFALSE;
   }
-  bcfile->GetObject("AliITSBadChannelsSSD;1", fBadChannelsList);
+  bcfile->GetObject("AliITSBadChannelsSSDv2;1", fBadChannelsList);
   if (!fBadChannelsList) {
     AliWarning("Error fBadChannelsList == NULL!");
     bcfile->Close();
@@ -842,7 +842,7 @@ Bool_t AliITSHandleDaSSD::CalculateCM(AliITSModuleDaSSD *const module)
       }
       if ((n = AliITSModuleDaSSD::GetStripsPerChip() - ovstr)) cmsum /= (Float_t)(n);
       else cmsum = 0.0L;
-      if (!module->SetCM(cmsum, chipind, ev));
+      //      if (!(module->SetCM(cmsum, chipind, ev)));
     } 
   }
   return kTRUE; 
@@ -902,16 +902,16 @@ Short_t AliITSHandleDaSSD::RetrieveModuleId(const UChar_t ddlID, const UChar_t a
 
 
 //______________________________________________________________________________
-AliITSNoiseSSD* AliITSHandleDaSSD::GetCalibrationOCDBNoise() const
+AliITSNoiseSSDv2* AliITSHandleDaSSD::GetCalibrationOCDBNoise() const
 {
 // Fill in the array for OCDB 
-  AliITSNoiseSSD         *ldcn = NULL;
+  AliITSNoiseSSDv2         *ldcn = NULL;
   AliITSModuleDaSSD      *module = NULL;
   AliITSChannelDaSSD     *strip = NULL; 
   if (!fModules) return NULL;
-  ldcn = new AliITSNoiseSSD;
+  ldcn = new AliITSNoiseSSDv2;
   if (!ldcn) {
-    AliError("Error allocation mamory for AliITSBadChannelsSSD object, return NULL!");
+    AliError("Error allocation mamory for AliITSBadChannelsSSDv2 object, return NULL!");
     return NULL;
   }
   for (Int_t i = 0; i < fNumberOfModules; i++) {
@@ -931,16 +931,16 @@ AliITSNoiseSSD* AliITSHandleDaSSD::GetCalibrationOCDBNoise() const
 
 
 //______________________________________________________________________________
-AliITSBadChannelsSSD* AliITSHandleDaSSD::GetCalibrationBadChannels() const
+AliITSBadChannelsSSDv2* AliITSHandleDaSSD::GetCalibrationBadChannels() const
 {
 // Fill in the TObjArray with the list of bad channels 
-  AliITSBadChannelsSSD   *ldcbc = NULL;
+  AliITSBadChannelsSSDv2   *ldcbc = NULL;
   AliITSModuleDaSSD      *module = NULL;
   AliITSChannelDaSSD     *strip = NULL; 
   if (!fModules) return NULL;
-  ldcbc = new AliITSBadChannelsSSD;
+  ldcbc = new AliITSBadChannelsSSDv2;
   if (!ldcbc) {
-    AliError("Error allocation mamory for AliITSBadChannelsSSD object, return NULL!");
+    AliError("Error allocation mamory for AliITSBadChannelsSSDv2 object, return NULL!");
     return NULL;
   }
   for (Int_t i = 0; i < fNumberOfModules; i++) {
@@ -965,17 +965,17 @@ AliITSBadChannelsSSD* AliITSHandleDaSSD::GetCalibrationBadChannels() const
 Bool_t AliITSHandleDaSSD::SaveCalibrationSSDLDC(Char_t*& dafname)
 {
 // Save Calibration data locally
-  AliITSBadChannelsSSD   *ldcbc = NULL;
-  AliITSPedestalSSD      *ldcp = NULL;
-  AliITSNoiseSSD         *ldcn = NULL;
+  AliITSBadChannelsSSDv2   *ldcbc = NULL;
+  AliITSPedestalSSDv2      *ldcp = NULL;
+  AliITSNoiseSSDv2         *ldcn = NULL;
   AliITSModuleDaSSD      *module = NULL;
   AliITSChannelDaSSD     *strip = NULL; 
   Char_t         *tmpfname;
   TString         dadatafilename("");
   if (!fModules) return kFALSE;
-  ldcn = new AliITSNoiseSSD;
-  ldcp = new AliITSPedestalSSD;
-  ldcbc = new AliITSBadChannelsSSD;
+  ldcn = new AliITSNoiseSSDv2;
+  ldcp = new AliITSPedestalSSDv2;
+  ldcbc = new AliITSBadChannelsSSDv2;
   if ((!ldcn) || (!ldcp) || (!ldcp)) {
     AliError("Error allocation mamory for calibration objects, return kFALSE!");
     return kFALSE;
@@ -1030,7 +1030,7 @@ Bool_t AliITSHandleDaSSD::SaveCalibrationSSDLDC(Char_t*& dafname)
 
 
 //______________________________________________________________________________
-Int_t AliITSHandleDaSSD::MergeBadChannels(AliITSBadChannelsSSD*&  bcl) const
+Int_t AliITSHandleDaSSD::MergeBadChannels(AliITSBadChannelsSSDv2*&  bcl) const
 {
 // Merges the statick bad channels list with bad channels got upon calibration
   AliITSModuleDaSSD     *module = 0;
@@ -1221,8 +1221,8 @@ Bool_t AliITSHandleDaSSD::SaveEqSlotCalibrationData(const Int_t ddl, const Int_t
        AliError(Form("Can not open the file %s for output!", fname)); 
     return kFALSE;
   }
-  for (zsml = 0; fgkZsBitMask >> zsml; zsml++);
-  for (offsetml = 0; fgkOffSetBitMask >> offsetml; offsetml++);
+  for (zsml = 0; fgkZsBitMask >> zsml; zsml++) ;
+  for (offsetml = 0; fgkOffSetBitMask >> offsetml; offsetml++) ;
   for (Int_t strind = 0; strind < AliITSModuleDaSSD::GetStripsPerModuleConst(); strind++) {
     for (Int_t adcb = 0; adcb < fgkAdcPerDBlock; adcb++) {
       zsoffset = 0x0;
@@ -1259,7 +1259,7 @@ Int_t AliITSHandleDaSSD::ChannelIsBad(const UChar_t ddl, const UChar_t ad, const
     else return (fBadChannelsList->GetBadChannelN(modid, (AliITSChannelDaSSD::GetMaxStripIdConst() - strn)) & fgkBadChannelMask);
   } else {
     AliError("Error ether bad channels list or DDLMap is not initialized or both, AliITSModuleDaSSD::CheckIfBad(str) is used!");
-    if (module = GetModule(ddl, ad, adc)) {
+    if ((module = GetModule(ddl, ad, adc))) {
       return (module->CheckIfBad(strn) & fgkBadChannelMask);
     } else {
       AliWarning(Form("There is no calibration data for ddl = %i,  ad = %i,  adc = %i, 0 is used!", ddl, ad, adc));
@@ -1342,8 +1342,8 @@ ULong_t AliITSHandleDaSSD::OffsetValue(const UChar_t ddl, const UChar_t ad, cons
 // Calculate the offset value to be upload to FEROM    
   AliITSChannelDaSSD    *strip = NULL;
   AliITSModuleDaSSD     *module = NULL;
-  if (module = GetModule(ddl, ad, adc)) {
-    if (strip = module->GetStrip(strn)) return OffsetValue(strip, ddl, ad, adc, strn);
+  if ((module = GetModule(ddl, ad, adc))) {
+    if ((strip = module->GetStrip(strn))) return OffsetValue(strip, ddl, ad, adc, strn);
     else {
       AliWarning(Form("There is no calibration data for ddl = %i,  ad = %i,  adc = %i,  strip = %i, 0 is used!", ddl, ad, adc, strn));
       return 0ul;
@@ -1378,9 +1378,9 @@ ULong_t AliITSHandleDaSSD::ZsThreshold(const UChar_t ddl, const UChar_t ad, cons
   AliITSModuleDaSSD     *module = NULL;
   if (ChannelIsBad(ddl, ad, adc, strn)) return fgkZsBitMask;
   if (LadderIsOff(ddl, ad, adc)) return fgkZsBitMask;
-  if (module = GetModule(ddl, ad, adc)) {
+  if ((module = GetModule(ddl, ad, adc))) {
        if (fMergeBCLists) if (module->CheckIfBad(strn)) return fgkZsBitMask;
-    if (strip = module->GetStrip(strn))  return ZsThreshold(strip);
+    if ((strip = module->GetStrip(strn)))  return ZsThreshold(strip);
     else {
       AliWarning(Form("There is no calibration data for ddl = %i,  ad = %i,  adc = %i,  strip = %i, 0 is used!", ddl, ad, adc, strn));
       return 0ul;