]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUON2DStoreValidator.cxx
Updated AddTask for pPb
[u/mrichter/AliRoot.git] / MUON / AliMUON2DStoreValidator.cxx
index de5a02c27283f390ffdabf88a59bd171f5dd60af..ca12872181e4d74ed65d46791abbb5e501e38f58 100644 (file)
@@ -198,7 +198,7 @@ AliMUON2DStoreValidator::AddMissingManu(Int_t detElemId, Int_t manuId)
 
 //_____________________________________________________________________________
 void
-AliMUON2DStoreValidator::ReportManu(TList& lines, AliMUONCheckItem& manu)
+AliMUON2DStoreValidator::ReportManu(TList& lines, const AliMUONCheckItem& manu)
 {  
   /// Report list of missing channels from this manu
   
@@ -215,7 +215,7 @@ AliMUON2DStoreValidator::ReportManu(TList& lines, AliMUONCheckItem& manu)
 
 //_____________________________________________________________________________
 void
-AliMUON2DStoreValidator::ReportDE(TList& lines, AliMUONCheckItem& de)
+AliMUON2DStoreValidator::ReportDE(TList& lines, const AliMUONCheckItem& de)
 {  
   /// Report list of missing manus from this de
   AliMUONCheckItem* manu(0x0);
@@ -240,7 +240,7 @@ AliMUON2DStoreValidator::ReportDE(TList& lines, AliMUONCheckItem& de)
 
 //_____________________________________________________________________________
 void
-AliMUON2DStoreValidator::ReportChamber(TList& lines, AliMUONCheckItem& chamber)
+AliMUON2DStoreValidator::ReportChamber(TList& lines, const AliMUONCheckItem& chamber)
 {  
   /// Report list of missing de from this chamber
   
@@ -296,19 +296,22 @@ AliMUON2DStoreValidator::Report(TList& lines, const TObjArray& chambers)
 
 //_____________________________________________________________________________
 TObjArray* 
-AliMUON2DStoreValidator::Validate(const AliMUONVStore& store)
+AliMUON2DStoreValidator::Validate(const AliMUONVStore& store,
+                                  AliMUONVStore* config)
 {                                  
   /// Validate the store. Check only the presence of all manus (i.e.
-  /// check nothing about the values themselves)
+  /// check nothing about the values themselves). 
+  /// Absence of manus which are not in the config is considered as normal.
   
   Bool_t (*kCheck)(const AliMUONVCalibParam&,Int_t) = 0x0;
-  return Validate(store,kCheck);
+  return Validate(store,kCheck,config);
 }
 
 //_____________________________________________________________________________
 TObjArray* 
 AliMUON2DStoreValidator::Validate(const AliMUONVStore& store,
-                                  Bool_t (*check)(const AliMUONVCalibParam&,Int_t))
+                                  Bool_t (*check)(const AliMUONVCalibParam&,Int_t),
+                                  AliMUONVStore* config)
 {
   /// Validate the store. 
   /// The check method is used to decide if a store content value
@@ -331,7 +334,11 @@ AliMUON2DStoreValidator::Validate(const AliMUONVStore& store,
     if (!test)
     {
       // completely missing manu
-      AddMissingManu(detElemId,manuId);
+      if ( !config || ( config && config->FindObject(detElemId,manuId ) ) )
+      {
+        // manu is in the config but not in the store : that's an error
+        AddMissingManu(detElemId,manuId);
+      }
     }
     else
     {
@@ -358,7 +365,8 @@ AliMUON2DStoreValidator::Validate(const AliMUONVStore& store,
 //_____________________________________________________________________________
 TObjArray* 
 AliMUON2DStoreValidator::Validate(const AliMUONVStore& store,
-                                  Float_t invalidFloatValue)
+                                  Float_t invalidFloatValue,
+                                  AliMUONVStore* config)
 {
   /// Validate the store. 
   /// The invalidFloatValue is used to decide if a store content value
@@ -379,8 +387,11 @@ AliMUON2DStoreValidator::Validate(const AliMUONVStore& store,
       static_cast<AliMUONVCalibParam*>(store.FindObject(detElemId,manuId));
     if (!test)
     {
-      // completely missing manu
-      AddMissingManu(detElemId,manuId);
+      if ( !config || ( config && config->FindObject(detElemId,manuId ) ) )
+      {
+        // completely missing manu
+        AddMissingManu(detElemId,manuId);
+      }
     }
     else
     {