示例#1
0
//_________________________________________________________________________________________
void KVINDRA::FillListsOfDetectorsByType()
{
   //Fill lists of ChIo, Si, CsI and phoswich

   fChIo->Clear();
   fSi->Clear();
   fCsI->Clear();
   fPhoswich->Clear();
   TIter next_det(GetDetectors());
   KVDetector* kvd;
   while ((kvd = (KVDetector*) next_det())) {
      kvd->SetNameOfArray("INDRA");
      if (kvd->InheritsFrom("KVChIo")) {
         fChIo->Add(kvd);
      }
      if (kvd->InheritsFrom("KVSilicon")) {
         fSi->Add(kvd);
      }
      if (kvd->InheritsFrom("KVCsI")) {
         fCsI->Add(kvd);
      }
      if (kvd->InheritsFrom("KVPhoswich")) {
         fPhoswich->Add(kvd);
      }
   }
}
示例#2
0
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);

}