本文整理汇总了C++中KVDetector::GetCalibrator方法的典型用法代码示例。如果您正苦于以下问题:C++ KVDetector::GetCalibrator方法的具体用法?C++ KVDetector::GetCalibrator怎么用?C++ KVDetector::GetCalibrator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KVDetector
的用法示例。
在下文中一共展示了KVDetector::GetCalibrator方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetChVoltParameters
void KVINDRAUpDater::SetChVoltParameters(KVDBRun* kvrun)
{
KVRList* param_list = kvrun->GetLinks("Channel-Volt");
if (!param_list)
return;
if (!param_list->GetSize())
return;
KVDetector* kvd;
KVDBParameterSet* kvps;
KVCalibrator* kvc;
TIter next_ps(param_list);
TString str;
// Setting Channel-Volts calibration parameters
while ((kvps = (KVDBParameterSet*) next_ps())) { // boucle sur les parametres
str = kvps->GetName();
str.Remove(str.Sizeof() - 4, 3); //Removing 3 last letters (ex : "_PG")
kvd = fArray->GetDetector(str.Data());
if (!kvd)
Warning("SetChVoltParameters(UInt_t)", "Dectector %s not found !",
str.Data());
else { // detector found
kvc = kvd->GetCalibrator(kvps->GetName(), kvps->GetTitle());
if (!kvc)
Warning("SetChVoltParameters(UInt_t)",
"Calibrator %s %s not found !", kvps->GetName(),
kvps->GetTitle());
else { //calibrator found
for (Int_t i = 0; i < kvc->GetNumberParams(); i++) {
kvc->SetParameter(i, kvps->GetParameter(i));
}
kvc->SetStatus(kTRUE); // calibrator ready
} //calibrator found
} //detector found
} //boucle sur les parameters
}
示例2: SetVoltEnergyChIoSiParameters
void KVINDRAUpDater::SetVoltEnergyChIoSiParameters(KVDBRun* kvrun)
{
KVRList* param_list = kvrun->GetLinks("Volt-Energy ChIo-Si");
if (!param_list)
return;
if (!param_list->GetSize()) {
return;
}
KVDetector* kvd;
KVDBParameterSet* kvps;
KVCalibrator* kvc;
TIter next_ps(param_list);
// Setting Channel-Volts calibration parameters
while ((kvps = (KVDBParameterSet*) next_ps())) { // boucle sur les parametres
kvd = fArray->GetDetector(kvps->GetName());
if (!kvd) {
/*
Warning("SetVoltEnergyParameters(UInt_t)",
"Dectector %s not found !", kvps->GetName());
*/
}
else { // detector found
kvc = kvd->GetCalibrator(kvps->GetName(), kvps->GetTitle());
if (!kvc)
Warning("SetVoltEnergyParameters(UInt_t)",
"Calibrator %s %s not found !", kvps->GetName(),
kvps->GetTitle());
else { //calibrator found
for (Int_t i = 0; i < kvc->GetNumberParams(); i++) {
kvc->SetParameter(i, kvps->GetParameter(i));
}
kvc->SetStatus(kTRUE); // calibrator ready
} //calibrator found
} //detector found
} //boucle sur les parameters
}
示例3: SetLitEnergyCsIParameters
void KVINDRAUpDater::SetLitEnergyCsIParameters(KVDBRun* kvrun)
{
// Setting Light- Energy CsI calibration parameters for Z=1
KVRList* param_list = kvrun->GetLinks("Light-Energy CsI Z=1");
if (param_list && param_list->GetSize()) {
KVDetector* kvd;
KVDBParameterSet* kvps;
KVCalibrator* kvc;
TIter next_ps(param_list);
TString str;
while ((kvps = (KVDBParameterSet*) next_ps())) { // boucle sur les parametres
str = kvps->GetName();
kvd = fArray->GetDetector(str.Data());
if (!kvd)
Warning("SetLitEnergyCsIParameters(UInt_t)",
"Dectector %s not found !", str.Data());
else { // detector found
kvc = kvd->GetCalibrator(kvps->GetTitle());
if (!kvc) {
Warning("SetLitEnergyCsIParameters(UInt_t)",
"Calibrator %s %s not found ! - it will be created",
kvps->GetName(), kvps->GetTitle());
kvd->SetCalibrators();
kvc = kvd->GetCalibrator(kvps->GetTitle());
}
for (Int_t i = 0; i < kvc->GetNumberParams(); i++) {
kvc->SetParameter(i, kvps->GetParameter(i));
kvc->SetStatus(kTRUE); // calibrator ready
}
} //detector found
} //boucle sur les parameters
}
// Setting Light- Energy CsI calibration parameters for Z>1
param_list = kvrun->GetLinks("Light-Energy CsI Z>1");
if (!param_list || !param_list->GetSize()) {
return;
}
KVDetector* kvd;
KVDBParameterSet* kvps;
KVCalibrator* kvc;
TString str;
TIter next_ps2(param_list);
while ((kvps = (KVDBParameterSet*) next_ps2())) { // boucle sur les parametres
str = kvps->GetName();
kvd = fArray->GetDetector(str.Data());
if (!kvd)
Warning("SetLitEnergyCsIParameters(UInt_t)",
"Dectector %s not found !", str.Data());
else { // detector found
kvc = kvd->GetCalibrator(kvps->GetTitle());
if (!kvc) {
Warning("SetLitEnergyCsIParameters(UInt_t)",
"Calibrator %s %s not found ! - it will be created",
kvps->GetName(), kvps->GetTitle());
kvd->SetCalibrators();
kvc = kvd->GetCalibrator(kvps->GetTitle());
}
for (Int_t i = 0; i < kvc->GetNumberParams(); i++) {
kvc->SetParameter(i, kvps->GetParameter(i));
kvc->SetStatus(kTRUE); // calibrator ready
}
} //detector found
} //boucle sur les parameters
}