#include "AliLog.h"
#include "AliMUONCheckItem.h"
-#include "AliMUONCheckItemIterator.h"
#include "AliMUONVCalibParam.h"
#include "AliMUONVStore.h"
#include "AliMpConstants.h"
//_____________________________________________________________________________
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<TObjString*>(it.Next()) ) )
+ while ( ( channel = static_cast<TObjString*>(next()) ) )
{
lines.Add(new TObjString(Form("\t\t\tChannel %s is missing or dead",
channel->GetString().Data())));
//_____________________________________________________________________________
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<AliMUONCheckItem*>(it.Next()) ) )
+ while ( ( manu = static_cast<AliMUONCheckItem*>(next()) ) )
{
if ( manu->IsDead() )
{
//_____________________________________________________________________________
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<AliMUONCheckItem*>(it.Next()) ) )
+ while ( ( de = static_cast<AliMUONCheckItem*>(next()) ) )
{
if ( de->IsDead() )
{
//_____________________________________________________________________________
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
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
{
//_____________________________________________________________________________
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
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
{