+//_____________________________________________________________________________
+Bool_t
+AliMUONPedestalSubprocessor::HasConfigChanged(const AliMUONVStore& newConfig) const
+{
+ /// Check whether the config changed.
+ /// Any error will return kTRUE to trig a config upload (safer way).
+
+ AliCDBEntry* entry = Master()->GetFromOCDB("Calib","Config");
+ if (!entry)
+ {
+ AliError("Could not get MUON/Calib/Config entry for current run ! That's not OK !");
+ return kTRUE;
+ }
+ AliMUONVStore* oldConfig = dynamic_cast<AliMUONVStore*>(entry->GetObject());
+ if (!oldConfig)
+ {
+ AliError("Could not get MUON/Calib/Config object for current run (wrong type ?) ! That's not OK !");
+ return kTRUE;
+ }
+
+ if ( oldConfig->GetSize() != newConfig.GetSize() )
+ {
+ return kTRUE;
+ }
+
+ TIter next(oldConfig->CreateIterator());
+ AliMUONVCalibParam* old;
+
+ while ( ( old = static_cast<AliMUONVCalibParam*>(next()) ) )
+ {
+ Int_t detElemId = old->ID0();
+ Int_t manuId = old->ID1();
+
+ if ( ! newConfig.FindObject(detElemId,manuId) )
+ {
+ // not found in new. Configurations are different. Return right now.
+ return kTRUE;
+ }
+ }
+
+ // all tests OK. Configuration has not changed.
+ return kFALSE;
+}
+
+