本文整理汇总了C++中KVDetector::GetAlignedDetectors方法的典型用法代码示例。如果您正苦于以下问题:C++ KVDetector::GetAlignedDetectors方法的具体用法?C++ KVDetector::GetAlignedDetectors怎么用?C++ KVDetector::GetAlignedDetectors使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KVDetector
的用法示例。
在下文中一共展示了KVDetector::GetAlignedDetectors方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetDetectorsInLayer
TList* KVGroup::GetDetectorsInLayer(UInt_t lay)
{
// lay=1 : create and fill list with detectors closest to target
// lay=GetNumberOfDetectorLayers() : detectors furthest from target
TList* dets = new TList;
TIter next(GetDetectors());
KVDetector* d;
while ((d = (KVDetector*)next())) {
if (lay == (UInt_t)d->GetAlignedDetectors()->GetEntries()) dets->Add(d);
}
return dets;
}
示例2: GetNumberOfDetectorLayers
UInt_t KVGroup::GetNumberOfDetectorLayers()
{
// The number of detector layers is the maximum number of detectors in the
// group which are placed one in front of the other, i.e. we interrogate
// each detector as to how many detectors there are in front of it
UInt_t max = 0;
TIter next(GetDetectors());
KVDetector* d;
while ((d = (KVDetector*)next())) {
UInt_t e = d->GetAlignedDetectors()->GetEntries();
if (e > max) max = e;
}
return max;
}