+
+ if (!n)
+ {
+ Master()->Log("Failed to read any pedestals");
+
+ delete fPedestals;
+ fPedestals = 0;
+ delete fConfig;
+ fConfig = 0;
+
+ // OK, we did not get our pedestals. Check if the ped run itself
+ // was bad, i.e. too few events
+ TString nevents(Master()->GetRunParameter("totalEvents"));
+
+ if ( nevents.Atoi() < 50 )
+ {
+ Master()->Log(Form("The run had only %d events, so the failure to read pedestals is normal",nevents.Atoi()));
+ // too few events, failure is normal, returns OK.
+ fTooFewEvents = kTRUE;
+ return kTRUE;
+ }
+
+ // no ped, but run looks clean, that's an error
+ return kFALSE;
+ }
+
+ const char* kIdConf = "CONFIG";
+
+ sources = Master()->GetFileSources(kSystem,kIdConf);
+ TIter nextConf(sources);
+ Int_t nconf(0);
+ Int_t nconfFiles(0);
+
+ while ( ( o = static_cast<TObjString*>(nextConf()) ) )
+ {
+ TString fileName(Master()->GetFile(kSystem,kIdConf,o->GetName()));
+ Int_t ok = ReadConfigFile(fileName.Data());
+ if (ok>0)
+ {
+ nconf += ok;
+ ++nconfFiles;
+ }
+ }
+
+ delete sources;
+
+ if ( npedFiles != nconfFiles )
+ {
+ Master()->Log(Form("ERROR : Number of config files (%d) different from number of pedestal files (%d)",nconfFiles,npedFiles));
+ delete fPedestals;
+ fPedestals = 0;
+ delete fConfig;
+ fConfig = 0;
+ return kFALSE;
+ }
+
+ fConfigChanged = HasConfigChanged(*fConfig);
+
+ return kTRUE;