9 : start_(0), end_(0), incr_(0), curr_(0), count_(0),
10 terminate_(
false), selAlgo_(0), checkAlgo_(check)
17 std::vector<AlgoImpl*>::iterator it =
regAlgos_.begin();
46 if (!check)
err_ =
"\twrong range specification: (start<end && incr!=0)==false, [start,end,incr]=["
52 if ( (start!=0) || (end!=0) ) {
53 err_ +=
"\tincr==0 requires start==0 and end==0 in the range. range: [start,end,incr]=["
65 if (!
select()) check =
false;
172 std::vector<AlgoImpl*>::iterator it =
regAlgos_.begin();
175 result = (*it)->checkParameters();
176 if (s!=
err_.size()) {
199 os <<
"start=" <<
start_ <<
" end=" <<
end_ <<
" incr=" <<
incr_ << std::endl;
200 parE_type::const_iterator eit =
ParE_.begin();
201 for (; eit !=
ParE_.end() ; ++eit) {
202 std::vector<double>::const_iterator sit = eit->second.begin();
203 os <<
"parE name=" << eit->first;
204 for (; sit != eit->second.end(); ++sit) {
205 os <<
" val=" << *sit << std::endl;
208 parS_type::const_iterator stit =
ParS_.begin();
209 for (; stit !=
ParS_.end() ; ++stit) {
210 std::vector<std::string>::const_iterator sit = stit->second.begin();
211 os <<
"parS name=" << stit->first;
212 for (; sit != stit->second.end(); ++sit) {
213 os <<
" val=" << *sit << std::endl;
base class for generated checking code for algorithm parameters.
tuple start
Check for commandline option errors.
AlgoImpl * selAlgo_
selected algorithm implementation
bool select()
selection of one of the registered AlgoImpl
int curr_
current position in the range of the algorithm
void checkTermination()
for algorithms with incr_==0 the algorithm must check whether to terminate
virtual void checkTermination()
for algorithms with incr_==0 the algorithm must check whether to terminate
void stream(std::ostream &os) const
streams some information about common parameters and the name of the algorithm
size_t numRegistered()
return number of registered implementations
int copyno() const
copy-number calculation
std::map< std::string, std::vector< std::string > > parS_type
bool check(parS_type &ps, parE_type &pe, std::string &err)
returns true if the check was successfull (parameters conform to XML specification) ...
void setParameters(int start, int end, int incr, const parS_type &, const parE_type &)
sets mandatory and optional parameters
std::vector< AlgoImpl * > regAlgos_
registry of algorithm implementation objects
void terminate()
terminates current algorithmic processing
AlgoPos(AlgoCheck *check=0)
creates an algorithm named name
void next()
update for next iteration of the algorithm, don't call it yourself!
virtual int copyno() const
copy-number calculation
int count_
invocation count
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
A DD Translation is currently implemented with Root Vector3D.
virtual DDRotationMatrix rotation()=0
subclass must calculate a rotation matrix
DDRotationMatrix rotation()
rotation calculations
bool check(const DataFrame &df, bool capcheck, bool dvercheck)
implementation of an algorithm, non generated checking code.
~AlgoPos()
destructor clears registered AlgoImpl
int start_
range of the algorithm
parS_type ParS_
std::string valued parameters passed to the algorithm
bool terminate_
flag to signal whether the algorithm has finished (true)
static std::string d2s(double x)
ahh, converts a double into a std::string ... yet another one of this kind!
std::map< std::string, std::vector< double > > parE_type
parE_type ParE_
double valued parameters passed to the algorithm
void registerAlgo(AlgoImpl *)
registers an implementation of the algorithm
bool go() const
no further algorithm processing if go() returns false
virtual DD3Vector translation()=0
subclass must calculate a translation std::vector
volatile std::atomic< bool > shutdown_flag false
DD3Vector translation()
translation calculations
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
AlgoCheck * checkAlgo_
checking object which checks the user-supplied parameters whether they fulfill their spec...
std::string err_
std::string to hold potential error messages found inside checkParameters()