CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Friends
DDAlgo Class Reference

#include <DDAlgo.h>

Inheritance diagram for DDAlgo:
DDBase< DDName, AlgoPos * >

Public Member Functions

int copyno () const
 
 DDAlgo ()
 
 DDAlgo (const DDName &name)
 
int end () const
 
bool go () const
 
int incr () const
 
std::string label () const
 
void next ()
 
const parE_typeparE () const
 
const parS_typeparS () const
 
DDRotationMatrix rotation ()
 
void setParameters (int start, int end, int incr, const parS_type &, const parE_type &)
 
int start () const
 
DDTranslation translation ()
 
- Public Member Functions inherited from DDBase< DDName, AlgoPos * >
 DDBase ()
 
const DDNameddname () const
 
def_type isDefined () const
 
bool isValid () const
 true, if the wrapped pointer is valid More...
 
const DDNamename () const
 
 operator bool () const
 
bool operator< (const DDBase &b) const
 
bool operator== (const DDBase &b) const
 
bool operator> (const DDBase &b) const
 
const DDI::rep_traits< DDName,
AlgoPos * >::reference 
rep () const
 
DDI::rep_traits< DDName,
AlgoPos * >::reference 
rep ()
 
std::string toString () const
 
const DDI::rep_traits< DDName,
AlgoPos * >::reference 
val () const
 
const DDI::rep_traits< DDName,
AlgoPos * >::reference 
val ()
 
virtual ~DDBase ()
 

Private Member Functions

 DDAlgo (const DDName &, AlgoPos *)
 

Friends

DDAlgo DDalgo (const DDName &, AlgoPos *)
 
std::ostream & operator<< (std::ostream &, const DDAlgo &)
 

Additional Inherited Members

- Public Types inherited from DDBase< DDName, AlgoPos * >
typedef std::pair< const
DDName *, bool > 
def_type
 
typedef AlgoPospimpl_type
 
typedef DDI::rep_type< DDName,
pimpl_type > * 
prep_type
 
typedef DDI::Singleton
< DDI::Store< DDName, AlgoPos * > > 
StoreT
 
- Static Public Member Functions inherited from DDBase< DDName, AlgoPos * >
static DDI::Store< DDName,
AlgoPos * >::iterator 
begin ()
 
static void clear ()
 
static DDI::Store< DDName,
AlgoPos * >::iterator 
end ()
 
static size_t size ()
 
- Protected Attributes inherited from DDBase< DDName, AlgoPos * >
prep_type prep_
 

Detailed Description

Definition at line 21 of file DDAlgo.h.

Constructor & Destructor Documentation

DDAlgo::DDAlgo ( )

Definition at line 24 of file DDAlgo.cc.

DDAlgo::DDAlgo ( const DDName name)

Definition at line 28 of file DDAlgo.cc.

References DDI::Singleton< I >::instance(), and DDBase< DDName, AlgoPos * >::prep_.

29 {
30  prep_ = StoreT::instance().create(name);
31 }
static value_type & instance()
DDAlgo::DDAlgo ( const DDName name,
AlgoPos a 
)
private

Definition at line 34 of file DDAlgo.cc.

References DDI::Singleton< I >::instance(), and DDBase< DDName, AlgoPos * >::prep_.

35 
36 {
37  prep_ = StoreT::instance().create(name,a);
38 }
static value_type & instance()

Member Function Documentation

int DDAlgo::copyno ( void  ) const

copy-number calculation

Definition at line 87 of file DDAlgo.cc.

References DDBase< DDName, AlgoPos * >::rep().

Referenced by label().

88 {
89  return rep().copyno();
90 }
const DDI::rep_traits< DDName, AlgoPos * >::reference rep() const
Definition: DDBase.h:89
int DDAlgo::end ( void  ) const

the 'end' parameter

Definition at line 54 of file DDAlgo.cc.

References DDBase< DDName, AlgoPos * >::rep().

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

55 {
56  return rep().end();
57 }
const DDI::rep_traits< DDName, AlgoPos * >::reference rep() const
Definition: DDBase.h:89
bool DDAlgo::go ( ) const

continue calling the algorithm unless go() returns false

Definition at line 108 of file DDAlgo.cc.

References DDBase< DDName, AlgoPos * >::rep().

Referenced by DDCompactView::algoPosPart().

109 {
110  return rep().go();
111 }
const DDI::rep_traits< DDName, AlgoPos * >::reference rep() const
Definition: DDBase.h:89
int DDAlgo::incr ( ) const

the 'incr' parameter

Definition at line 59 of file DDAlgo.cc.

References DDBase< DDName, AlgoPos * >::rep().

60 {
61  return rep().incr();
62 }
const DDI::rep_traits< DDName, AlgoPos * >::reference rep() const
Definition: DDBase.h:89
std::string DDAlgo::label ( ) const
void DDAlgo::next ( void  )

prepare the algorithm for its next iteration or set its state to 'terminate' in case all iterations have already been done

Definition at line 102 of file DDAlgo.cc.

References DDBase< DDName, AlgoPos * >::rep().

Referenced by BeautifulSoup.PageElement::_invert(), and DDCompactView::algoPosPart().

103 {
104  rep().next();
105 }
const DDI::rep_traits< DDName, AlgoPos * >::reference rep() const
Definition: DDBase.h:89
const parE_type & DDAlgo::parE ( ) const

double valued user parameter, values already evaluated from expressions

Definition at line 69 of file DDAlgo.cc.

References DDBase< DDName, AlgoPos * >::rep().

70 {
71  return rep().parE();
72 }
const DDI::rep_traits< DDName, AlgoPos * >::reference rep() const
Definition: DDBase.h:89
const parS_type & DDAlgo::parS ( ) const

std::string valued user parameter

Definition at line 64 of file DDAlgo.cc.

References DDBase< DDName, AlgoPos * >::rep().

65 {
66  return rep().parS();
67 }
const DDI::rep_traits< DDName, AlgoPos * >::reference rep() const
Definition: DDBase.h:89
DDRotationMatrix DDAlgo::rotation ( void  )

rotation calculations

Definition at line 81 of file DDAlgo.cc.

References DDBase< DDName, AlgoPos * >::rep().

Referenced by DDCompactView::algoPosPart().

82 {
83  return rep().rotation();
84 }
const DDI::rep_traits< DDName, AlgoPos * >::reference rep() const
Definition: DDBase.h:89
void DDAlgo::setParameters ( int  start,
int  end,
int  incr,
const parS_type ps,
const parE_type pe 
)

sets user defined parameters

Definition at line 42 of file DDAlgo.cc.

References DDBase< DDName, AlgoPos * >::rep().

Referenced by DDLAlgoPosPart::processElement().

44 {
45  rep().setParameters(start, end, incr, ps, pe);
46 }
int start() const
Definition: DDAlgo.cc:49
const DDI::rep_traits< DDName, AlgoPos * >::reference rep() const
Definition: DDBase.h:89
int incr() const
Definition: DDAlgo.cc:59
int end() const
Definition: DDAlgo.cc:54
int DDAlgo::start ( ) const

the 'start' parameter

Definition at line 49 of file DDAlgo.cc.

References DDBase< DDName, AlgoPos * >::rep().

Referenced by progressbar.ProgressBar::__next__(), Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

50 {
51  return rep().start();
52 }
const DDI::rep_traits< DDName, AlgoPos * >::reference rep() const
Definition: DDBase.h:89
DDTranslation DDAlgo::translation ( void  )

translation calculations

Definition at line 75 of file DDAlgo.cc.

References DDBase< DDName, AlgoPos * >::rep().

Referenced by DDCompactView::algoPosPart().

76 {
77  return rep().translation();
78 }
const DDI::rep_traits< DDName, AlgoPos * >::reference rep() const
Definition: DDBase.h:89

Friends And Related Function Documentation

DDAlgo DDalgo ( const DDName n,
AlgoPos a 
)
friend

create a DDCore compatible algorithm

Definition at line 114 of file DDAlgo.cc.

115 {
116  return DDAlgo(n,a);
117 }
DDAlgo()
Definition: DDAlgo.cc:24
std::ostream& operator<< ( std::ostream &  os,
const DDAlgo algo 
)
friend

Definition at line 4 of file DDAlgo.cc.

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 }
Definition: DDBase.h:14
const DDI::rep_traits< N, C >::reference rep() const
Definition: DDBase.h:89
def_type isDefined() const
Definition: DDBase.h:115