本文整理汇总了C++中KVDetector::GetGroup方法的典型用法代码示例。如果您正苦于以下问题:C++ KVDetector::GetGroup方法的具体用法?C++ KVDetector::GetGroup怎么用?C++ KVDetector::GetGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KVDetector
的用法示例。
在下文中一共展示了KVDetector::GetGroup方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ParticleEntersNewVolume
void KVGeoImport::ParticleEntersNewVolume(KVNucleus *)
{
// All detectors crossed by the particle's trajectory are added to the multidetector
// and the groups (KVGroup) of aligned detectors are set up
KVDetector* detector = GetCurrentDetector();
if(!detector) return;
Bool_t group_inconsistency = kFALSE;
if(fCreateArray){
if(!fCurrentGroup){
if(detector->GetGroup()) {
fCurrentGroup=detector->GetGroup();
}
else {
fCurrentGroup = new KVGroup;
fCurrentGroup->SetNumber(++fGroupNumber);
fCurrentGroup->Add(detector);
fArray->Add(fCurrentGroup);
}
}
else
{
KVGroup* det_group = detector->GetGroup();
if(!det_group) {
fCurrentGroup->Add(detector);
}
else {
if(det_group!=fCurrentGroup){
// Warning("ParticleEntersNewVolume",
// "Detector %s : already belongs to %s, now seems to be in %s",
// detector->GetName(), det_group->GetName(),
// fCurrentGroup->GetName());
group_inconsistency = kTRUE;
}
}
}
}
detector->GetNode()->SetName(detector->GetName());
if(fLastDetector && detector!=fLastDetector && !group_inconsistency) {
fLastDetector->GetNode()->AddBehind(detector);
detector->GetNode()->AddInFront(fLastDetector);
}
fLastDetector = detector;
}
示例2: GetDetectorEvent
void KVFAZIA::GetDetectorEvent(KVDetectorEvent* detev, TSeqCollection* signals)
{
// First step in event reconstruction based on current status of detectors in array.
// Fills the given KVDetectorEvent with the list of all groups which have fired.
// i.e. loop over all groups of the array and test whether KVGroup::Fired() returns true or false.
//
// If the list of fired acquisition parameters 'signals' is given, KVMultiDetArray::GetDetectorEvent
// is called
//
if (signals) {
// list of fired acquisition parameters given
TIter next_par(signals);
KVSignal* par = 0;
KVDetector* det = 0;
KVGroup* grp = 0;
while ((par = (KVSignal*)next_par())) {
if (!(par->GetN() > 0))
Info("GetDetectorEvent", "%s empty", par->GetName());
par->DeduceFromName();
if ((det = GetDetector(par->GetDetectorName()))) {
((KVFAZIADetector*)det)->SetSignal(par, par->GetType());
if ((!(((KVFAZIADetector*)det)->GetSignal(par->GetType())->GetN() > 0)))
Warning("Error", "%s %s empty signal is returned", det->GetName(), par->GetType());
if ((grp = det->GetGroup()) && !detev->GetGroups()->FindObject(grp)) {
detev->AddGroup(grp);
}
} else {
Error("GetDetectedEvent", "Unknown detector %s !!!", par->GetDetectorName());
}
}
} else {
KVMultiDetArray::GetDetectorEvent(detev, 0);
}
}