CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDAlgo.cc
Go to the documentation of this file.
3 
4 std::ostream & operator<<(std::ostream & os, const DDAlgo & algo)
5 {
7  if (defined.first) {
8  os << *(defined.first) << " ";
9  if (defined.second) {
10  algo.rep().stream(os);
11  }
12  else {
13  os << "* algorithm not defined * ";
14  }
15  }
16  else {
17  os << "* algorithm not declared * ";
18  }
19  return os;
20 
21 }
22 
23 
25 { }
26 
27 
29 {
30  prep_ = StoreT::instance().create(name);
31 }
32 
33 
35 
36 {
37  prep_ = StoreT::instance().create(name,a);
38 }
39 
40 
41 
42 void DDAlgo::setParameters(int start, int end, int incr,
43  const parS_type & ps, const parE_type & pe)
44 {
45  rep().setParameters(start, end, incr, ps, pe);
46 }
47 
48 
49 int DDAlgo::start() const
50 {
51  return rep().start();
52 }
53 
54 int DDAlgo::end() const
55 {
56  return rep().end();
57 }
58 
59 int DDAlgo::incr() const
60 {
61  return rep().incr();
62 }
63 
64 const parS_type & DDAlgo::parS() const
65 {
66  return rep().parS();
67 }
68 
69 const parE_type & DDAlgo::parE() const
70 {
71  return rep().parE();
72 }
73 
74 
76 {
77  return rep().translation();
78 }
79 
80 
82 {
83  return rep().rotation();
84 }
85 
86 
87 int DDAlgo::copyno() const
88 {
89  return rep().copyno();
90 }
91 
92 
93 #include <cstdio>
95 {
96  char buffer [50];
97  /*int n =*/ sprintf(buffer,"%d",copyno());
98  return std::string(buffer);
99 }
100 
101 
103 {
104  rep().next();
105 }
106 
107 
108 bool DDAlgo::go() const
109 {
110  return rep().go();
111 }
112 
113 // friend, factory function
115 {
116  return DDAlgo(n,a);
117 }
118 
119 
120 // void DDAlgo::clear()
121 // {
122 // StoreT::instance().clear();
123 // }
Definition: DDBase.h:14
int start() const
Definition: DDAlgo.cc:49
const DDI::rep_traits< N, C >::reference rep() const
Definition: DDBase.h:89
void next()
Definition: DDAlgo.cc:102
def_type isDefined() const
Definition: DDBase.h:115
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
class for algorithmic positioning, represents an algorithm
Definition: AlgoPos.h:27
DDAlgo()
Definition: DDAlgo.cc:24
const parS_type & parS() const
Definition: DDAlgo.cc:64
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:18
Definition: DDAlgo.h:17
const parE_type & parE() const
Definition: DDAlgo.cc:69
std::map< std::string, std::vector< std::string > > parS_type
Definition: DDAlgoPar.h:9
bool go() const
Definition: DDAlgo.cc:108
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
DDAlgo DDalgo(const DDName &, AlgoPos *)
Definition: DDAlgo.cc:114
static value_type & instance()
int copyno() const
Definition: DDAlgo.cc:87
DDRotationMatrix rotation()
Definition: DDAlgo.cc:81
#define end
Definition: vmac.h:38
std::map< std::string, std::vector< double > > parE_type
Definition: DDAlgoPar.h:12
int incr() const
Definition: DDAlgo.cc:59
double a
Definition: hdecay.h:121
std::string label() const
Definition: DDAlgo.cc:94
DDTranslation translation()
Definition: DDAlgo.cc:75
void setParameters(int start, int end, int incr, const parS_type &, const parE_type &)
Definition: DDAlgo.cc:42
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
int end() const
Definition: DDAlgo.cc:54