]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSOnlineCalibrationSPDhandler.h
Adding TDC channel delays to the calib object.
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineCalibrationSPDhandler.h
index 2f4ff171445499da758e988e9a4d974024a0e1aa..4c038bad6f92984371c797a1c11c560c40df8ff2 100644 (file)
@@ -16,6 +16,7 @@
 class TArrayI;
 class TArrayS;
 class AliITSIntMap;
+class AliITSTriggerConditions;
 class AliITSCalibrationSPD;
 
 class AliITSOnlineCalibrationSPDhandler {
@@ -50,6 +51,7 @@ class AliITSOnlineCalibrationSPDhandler {
 
   UInt_t  ReadDeadFromText(const char *fileName, UInt_t module);
   UInt_t  ReadNoisyFromText(const char *fileName, UInt_t module);
+  void    ReadPITConditionsFromText(const char *fileName);
 
   void    WriteToFilesAlways();
   UInt_t  WriteToFiles();
@@ -63,17 +65,21 @@ class AliITSOnlineCalibrationSPDhandler {
   void    WriteDeadToFile(UInt_t eq, Bool_t inactive=kFALSE);
   void    WriteNoisyToFile(UInt_t eq);
 
+  Bool_t  ReadPITConditionsFromDB(Int_t runNr, const Char_t *storage="default");
 #ifndef SPD_DA_OFF
-  Bool_t  ReadDeadModuleFromDB(UInt_t module, Int_t runNr, Bool_t treeSerial=kFALSE);
-  Bool_t  ReadNoisyModuleFromDB(UInt_t module, Int_t runNr, Bool_t treeSerial=kFALSE);
-  Bool_t  ReadFromDB(Int_t runNr, Bool_t treeSerial=kFALSE);
-  Bool_t  ReadDeadFromDB(Int_t runNr, Bool_t treeSerial=kFALSE);
-  Bool_t  ReadNoisyFromDB(Int_t runNr, Bool_t treeSerial=kFALSE);
+  Bool_t  ReadDeadModuleFromDB(UInt_t module, Int_t runNr, const Char_t *storage="default", Bool_t treeSerial=kFALSE);
+  Bool_t  ReadNoisyModuleFromDB(UInt_t module, Int_t runNr, const Char_t *storage="default", Bool_t treeSerial=kFALSE);
+  Bool_t  ReadFromDB(Int_t runNr, const Char_t *storage="default", Bool_t treeSerial=kFALSE);
+  Bool_t  ReadDeadFromDB(Int_t runNr, const Char_t *storage="default", Bool_t treeSerial=kFALSE);
+  Bool_t  ReadNoisyFromDB(Int_t runNr, const Char_t *storage="default", Bool_t treeSerial=kFALSE);
+  Bool_t  ReadDeadFromDBasNoisy(Int_t runNr, const Char_t *storage="default", Bool_t treeSerial=kFALSE);
   Bool_t  ReadDeadFromCalibObj(TObjArray* calObj);
   Bool_t  ReadNoisyFromCalibObj(TObjArray* calObj);
-  Bool_t  WriteToDB(Int_t runNrStart, Int_t runNrEnd);
-  Bool_t  WriteDeadToDB(Int_t runNrStart, Int_t runNrEnd);
-  Bool_t  WriteNoisyToDB(Int_t runNrStart, Int_t runNrEnd);
+  Bool_t  WriteToDB(Int_t runNrStart, Int_t runNrEnd, const Char_t *storage="default");
+  Bool_t  WriteDeadToDB(Int_t runNrStart, Int_t runNrEnd, const Char_t *storage="default");
+  Bool_t  WriteDeadToDBasNoisy(Int_t runNrStart, Int_t runNrEnd, const Char_t *storage="default");
+  Bool_t  WriteNoisyToDB(Int_t runNrStart, Int_t runNrEnd, const Char_t *storage="default");
+  Bool_t  WritePITConditionsToDB(Int_t runNrStart, Int_t runNrEnd, const Char_t *storage="default");
 #endif
 
   void    GenerateDCSConfigFile(const Char_t* fileName);
@@ -99,6 +105,9 @@ class AliITSOnlineCalibrationSPDhandler {
   Bool_t  UnSetDeadPixelM(UInt_t module, UInt_t colM, UInt_t row);
   Bool_t  UnSetNoisyPixelM(UInt_t module, UInt_t colM, UInt_t row);
 
+  Bool_t SetInactiveChipInPITmask(UInt_t eq, UInt_t hs, UInt_t chip);
+  Bool_t UnSetInactiveChipInPITmask(UInt_t eq, UInt_t hs, UInt_t chip);
+
   Bool_t  IsPixelBad(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t col, UInt_t row) const;
   Bool_t  IsPixelSilent(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t col, UInt_t row) const; // silent = dead or inactive
   Bool_t  IsPixelDead(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t col, UInt_t row) const;
@@ -131,12 +140,14 @@ class AliITSOnlineCalibrationSPDhandler {
   UInt_t  GetNrBad(UInt_t module) const; // bad = silent or noisy
   UInt_t  GetNrSilent(UInt_t module) const; // silent = dead or inactive
   UInt_t  GetNrDead(UInt_t module) const;
+  UInt_t  GetNrDeadSingle(UInt_t module) const;
   UInt_t  GetDeadEqIdAt(UInt_t module,UInt_t index) const;
   UInt_t  GetDeadHSAt(UInt_t module,UInt_t index) const;
   UInt_t  GetDeadChipAt(UInt_t module,UInt_t index) const;
   UInt_t  GetDeadColAt(UInt_t module,UInt_t index) const;
   UInt_t  GetDeadRowAt(UInt_t module,UInt_t index) const;
   UInt_t  GetNrNoisy(UInt_t module) const;
+  UInt_t  GetNrNoisySingle(UInt_t module) const;
   UInt_t  GetNoisyEqIdAt(UInt_t module, UInt_t index) const;
   UInt_t  GetNoisyHSAt(UInt_t module, UInt_t index) const;
   UInt_t  GetNoisyChipAt(UInt_t module, UInt_t index) const;
@@ -198,6 +209,7 @@ class AliITSOnlineCalibrationSPDhandler {
   Bool_t  IsSilentHS(UInt_t eq, UInt_t hs) const;
   Bool_t  IsSilentChip(UInt_t eq, UInt_t hs, UInt_t chip) const;
 
+  Bool_t  IsNoisyChip(UInt_t eq, UInt_t hs, UInt_t chip) const; 
 
   UInt_t  AddSilentFrom(AliITSOnlineCalibrationSPDhandler* other);
   UInt_t  AddDeadFrom(AliITSOnlineCalibrationSPDhandler* other);
@@ -211,7 +223,10 @@ class AliITSOnlineCalibrationSPDhandler {
   AliITSOnlineCalibrationSPDhandler* GetSilentDiff(AliITSOnlineCalibrationSPDhandler* other) const;
   AliITSOnlineCalibrationSPDhandler* GetDeadDiff(AliITSOnlineCalibrationSPDhandler* other) const;
   AliITSOnlineCalibrationSPDhandler* GetNoisyDiff(AliITSOnlineCalibrationSPDhandler* other) const;
+  AliITSTriggerConditions * GetTriggerConditions() const {return fTriggerConditions;}
 
+  void PrintDiffInDead(AliITSOnlineCalibrationSPDhandler *other) const;
+  void PrintDiffInPITmask(AliITSOnlineCalibrationSPDhandler *other) const;
 
  private:
   TString fFileLocation;              // location (dir) of files to read and write from
@@ -225,6 +240,8 @@ class AliITSOnlineCalibrationSPDhandler {
   Bool_t fDeadEq[20];                 // dead bit for each equipment
   Bool_t fDeadHS[20][6];              // dead bit for each half-stave
   Bool_t fDeadChip[20][6][10];        // dead bit for each chip
+  AliITSTriggerConditions *fTriggerConditions; // PIT conditions (mask, parameters name, parameters values)
+
 
   Int_t    GetKey(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t col, UInt_t row) const 
     {return eq*6*10*32*256 + hs*10*32*256 + chip*32*256 + col*256 + row;}
@@ -282,3 +299,4 @@ class AliITSOnlineCalibrationSPDhandler {
 };
 
 #endif
+