void KVINDRAUpDater::SetCalibrationParameters(UInt_t run) { //Set calibration parameters for this run. //This will: // reset all the calibrators of all the detectors ready to receive the calibrators for the run (handled by child classes), // set calibration parameters for the run // set pedestals for the run // set PHD parameters of silicon detectors for run cout << "Setting calibration parameters of INDRA array for run " << run << ":" << endl; KVDBRun* kvrun = gExpDB->GetDBRun(run); if (!kvrun) { Error("SetParameters(UInt_t)", "Run %u not found in database!", run); return; } //Reset all calibrators of all detectors first TIter next(fArray->GetDetectors()); KVDetector* kvd; KVCalibrator* kvc; while ((kvd = (KVDetector*) next())) { if (kvd->GetListOfCalibrators()) { TIter next_cal(kvd->GetListOfCalibrators()); while ((kvc = (KVCalibrator*) next_cal())) { kvc->Reset(); } } } SetCalibParameters(kvrun); SetPedestals(kvrun); SetPHDs(kvrun); }
void KVINDRAUpDater_e475s::SetCalibrationParameters(UInt_t run){ //Set calibration parameters for this run. //This will: // remove all the calibrators of all the detectors ready to receive the calibrators for the run (handled by child classes), // set calibration parameters for the run // set pedestals for the run cout << "Setting calibration parameters of INDRA array for run " << run << ":" << endl; KVDBRun *kvrun = gIndraDB->GetRun(run); if (!kvrun) { Error("SetParameters(UInt_t)", "Run %u not found in database!", run); return; } //Reset all calibrators of all detectors first TIter next(gIndra->GetListOfDetectors()); KVDetector *kvd; while ((kvd = (KVDetector *) next())) { if (kvd->InheritsFrom("KVSiLi") || kvd->InheritsFrom("KVSi75")){ if (kvd->GetListOfCalibrators()) kvd->RemoveCalibrators(); kvd->SetCalibrators(); } else { if (kvd->GetListOfCalibrators()) { kvd->RemoveCalibrators(); TIter lacq(kvd->GetACQParamList()); KVACQParam* acq = 0; while ( (acq = (KVACQParam* )lacq()) ){ acq->SetPedestal(0); } } } } SetCalibParameters(kvrun); SetPedestals(kvrun); }