X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUON2DStoreValidator.cxx;h=ca12872181e4d74ed65d46791abbb5e501e38f58;hb=899e0856cc15d3e68a97e6f0c45189634d278406;hp=5dd8a34301d7b483c6ac9be5ae162cae7a7c514c;hpb=8971f7610a11b16dc72b9a18cce9aa71b219918d;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUON2DStoreValidator.cxx b/MUON/AliMUON2DStoreValidator.cxx index 5dd8a34301d..ca12872181e 100644 --- a/MUON/AliMUON2DStoreValidator.cxx +++ b/MUON/AliMUON2DStoreValidator.cxx @@ -19,7 +19,6 @@ #include "AliLog.h" #include "AliMUONCheckItem.h" -#include "AliMUONCheckItemIterator.h" #include "AliMUONVCalibParam.h" #include "AliMUONVStore.h" #include "AliMpConstants.h" @@ -199,16 +198,14 @@ 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 TObjString* channel(0x0); - AliMUONCheckItemIterator it(manu); + TIter next(manu.CreateIterator()); - it.First(); - - while ( ( channel = static_cast(it.Next()) ) ) + while ( ( channel = static_cast(next()) ) ) { lines.Add(new TObjString(Form("\t\t\tChannel %s is missing or dead", channel->GetString().Data()))); @@ -218,17 +215,17 @@ 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); - AliMUONCheckItemIterator it(de); + + TIter next(de.CreateIterator()); lines.Add(new TObjString(Form("DE %5d",de.GetID()))); - it.First(); - while ( ( manu = static_cast(it.Next()) ) ) + while ( ( manu = static_cast(next()) ) ) { if ( manu->IsDead() ) { @@ -243,16 +240,14 @@ 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 AliMUONCheckItem* de(0x0); - AliMUONCheckItemIterator it(chamber); - - it.First(); + TIter next(chamber.CreateIterator()); - while ( ( de = static_cast(it.Next()) ) ) + while ( ( de = static_cast(next()) ) ) { if ( de->IsDead() ) { @@ -301,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 @@ -336,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 { @@ -363,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 @@ -384,8 +387,11 @@ AliMUON2DStoreValidator::Validate(const AliMUONVStore& store, static_cast(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 {