]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSPreprocessorSPD.cxx
Adding more information to the debug output
[u/mrichter/AliRoot.git] / ITS / AliITSPreprocessorSPD.cxx
index eb70123f626257a99b439e5c918378fde0dacead..8067e0c0e0b0f60d07f32f8eea013b274ab7c419 100644 (file)
@@ -259,7 +259,7 @@ UInt_t AliITSPreprocessorSPD::Process(TMap* /*dcsAliasMap*/)
     handler->SetFileLocation(fileLoc.Data());
     handler->ReadNoisyFromFiles();
     for (Int_t module=0; module<240; module++) {
-      ((AliITSCalibrationSPD*) spdEntryNoisy->At(module)) -> SetNrBad( handler->GetNrNoisy(module) );
+      ((AliITSCalibrationSPD*) spdEntryNoisy->At(module)) -> SetNrBadSingle( handler->GetNrNoisy(module) );
       ((AliITSCalibrationSPD*) spdEntryNoisy->At(module)) -> SetBadList( handler->GetNoisyArray(module) );
     }
     delete handler;
@@ -377,10 +377,21 @@ UInt_t AliITSPreprocessorSPD::Process(TMap* /*dcsAliasMap*/)
     }
     // Add dead from the copied FXS files
     handOld->SetFileLocation(".");
-    handOld->ReadDeadFromFiles();
-    for (Int_t module=0; module<240; module++) {
-      ((AliITSCalibrationSPD*) spdEntryDead->At(module)) -> SetNrBad( handOld->GetNrDead(module) );
-      ((AliITSCalibrationSPD*) spdEntryDead->At(module)) -> SetBadList( handOld->GetDeadArray(module) );
+    handOld->ReadSilentFromFiles();
+    for (UInt_t module=0; module<240; module++) {
+      AliITSCalibrationSPD* calibSPD = (AliITSCalibrationSPD*) spdEntryDead->At(module);
+      calibSPD->SetNrBad( handOld->GetNrDead(module) );
+      calibSPD->SetBadList( handOld->GetDeadArray(module) );
+      for (UInt_t chipIndex=0; chipIndex<5; chipIndex++) {
+       UInt_t eq,hs,chip,col,row;
+       AliITSRawStreamSPD::OfflineToOnline(module, chipIndex*32, 0, eq, hs, chip, col, row);
+       if (handOld->IsSilentChip(eq,hs,chip)) {
+         calibSPD->SetChipBad(chipIndex);
+       }
+       else {
+         calibSPD->UnSetChipBad(chipIndex);
+       }
+      }
     }
     delete handOld;
     // Store the new calibration objects in OCDB
@@ -480,9 +491,9 @@ Bool_t AliITSPreprocessorSPD::StoreRefFromTarForId(const Char_t *id) {
       // store each file
       UInt_t index2 = 0;
       while (fList.At(index2)!=NULL) {
-       TString fileName = ((TObjString*)fList.At(index2))->GetString();
+       TString eqFileName = ((TObjString*)fList.At(index2))->GetString();
        // get eq id
-       TString eqStr = fileName.Data();
+       TString eqStr = eqFileName.Data();
        UInt_t len = eqStr.Length();
        eqStr.Replace(0,len-7,"",0);
        eqStr.ReplaceAll("_",1,"",0);
@@ -490,13 +501,13 @@ Bool_t AliITSPreprocessorSPD::StoreRefFromTarForId(const Char_t *id) {
        Int_t eqId = eqStr.Atoi();
        if (eqId>=0 && eqId<20) {
          TString refCAT = Form("%s_eq_%d",id,eqId);
-         if (!StoreReferenceFile(fileName.Data(),refCAT.Data())) {
-           Log(Form("Failed to store reference file %s.",fileName.Data()));
+         if (!StoreReferenceFile(eqFileName.Data(),refCAT.Data())) {
+           Log(Form("Failed to store reference file %s.",eqFileName.Data()));
            return kFALSE;
          }
        }
        else {
-         Log(Form("Eq ID %d out of bounds for file %s",eqId,fileName.Data()));
+         Log(Form("Eq ID %d out of bounds for file %s",eqId,eqFileName.Data()));
          fList.Clear();
          return kFALSE;
        }