CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AlgoImpl.h
Go to the documentation of this file.
1 #ifndef ExpAlgo_AlgoImpl_h
2 #define ExpAlgo_AlgoImpl_h
3 
7 #include <string>
8 
9 
10 class AlgoPos;
11 
13 
19 class AlgoImpl
20 {
21  friend class AlgoPos;
22 public:
24  AlgoImpl(AlgoPos*, std::string label);
25 
26 protected:
27  virtual ~AlgoImpl();
28 
30 
34  virtual DD3Vector translation() = 0;
35 
37 
41  virtual DDRotationMatrix rotation() = 0;
42 
44 
62  virtual bool checkParameters() = 0;
63 
65 
79  void terminate();
80 
82 
89  virtual int copyno() const;
90 
92 
107  virtual void checkTermination();
108 
110  static std::string d2s(double x);
111 
114  const int & start_;
115  const int & end_;
116  const int & incr_;
117  const int & curr_;
118  const int & count_;
119  bool & terminate_;
120  std::string & err_;
121  std::string label_;
122 };
123 
124 #endif
class for algorithmic positioning, represents an algorithm
Definition: AlgoPos.h:27
const int & end_
Definition: AlgoImpl.h:115
virtual void checkTermination()
for algorithms with incr_==0 the algorithm must check whether to terminate
Definition: AlgoImpl.cc:34
parE_type & ParE_
Definition: AlgoImpl.h:113
const int & curr_
Definition: AlgoImpl.h:117
virtual int copyno() const
copy-number calculation
Definition: AlgoImpl.cc:22
std::string & err_
Definition: AlgoImpl.h:120
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
A DD Translation is currently implemented with Root Vector3D.
Definition: DDTranslation.h:6
virtual DDRotationMatrix rotation()=0
subclass must calculate a rotation matrix
std::map< std::string, std::vector< std::string > > parS_type
Definition: DDAlgoPar.h:9
implementation of an algorithm, non generated checking code.
Definition: AlgoImpl.h:19
virtual ~AlgoImpl()
Definition: AlgoImpl.cc:18
const int & count_
Definition: AlgoImpl.h:118
static std::string d2s(double x)
ahh, converts a double into a std::string ... yet another one of this kind!
Definition: AlgoImpl.cc:40
virtual bool checkParameters()=0
subclass must check the supplied parameters ParE_, ParS_
const int & incr_
Definition: AlgoImpl.h:116
bool & terminate_
Definition: AlgoImpl.h:119
virtual DD3Vector translation()=0
subclass must calculate a translation std::vector
std::string label_
Definition: AlgoImpl.h:121
parS_type & ParS_
Definition: AlgoImpl.h:112
Definition: DDAxes.h:10
AlgoImpl(AlgoPos *, std::string label)
subclass must provide a similar constructor and call this one
Definition: AlgoImpl.cc:6
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
std::map< std::string, std::vector< double > > parE_type
Definition: DDAlgoPar.h:12
const int & start_
Definition: AlgoImpl.h:114
void terminate()
stop the current iteration of the algorithm (for incr_==0 types of algorithms)
Definition: AlgoImpl.cc:28