Commit df409ce6 authored by Claus Kleinwort's avatar Claus Kleinwort
Browse files

cpp: require at least two GblPoints

git-svn-id: http://svnsrv.desy.de/public/GeneralBrokenLines/trunk@97 281f6f2b-e318-4fd1-8bce-1a4ba7aab212
parent 2ffac8de
......@@ -234,9 +234,14 @@ void GblTrajectory::construct() {
constructOK = false;
fitOK = false;
unsigned int aLabel = 0;
if (numAllPoints < 2) {
std::cout << " GblTrajectory construction failed: too few GblPoints "
<< std::endl;
return;
}
// loop over trajectories
numTrajectories = thePoints.size();
//std::cout << " numTrajectories: " << numTrajectories << ", "<< innerTransformations.size() << std::endl;
//std::cout << " numTrajectories: " << numTrajectories << ", " << innerTransformations.size() << std::endl;
for (unsigned int iTraj = 0; iTraj < numTrajectories; ++iTraj) {
std::vector<GblPoint>::iterator itPoint;
for (itPoint = thePoints[iTraj].begin();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment