CMS 3D CMS Logo

DDDivision.cc
Go to the documentation of this file.
2 
3 #include <ostream>
4 
7 
8 using DDI::Division;
9 
10 std::ostream& operator<<(std::ostream& os, const DDDivision& div) {
12  if (defined.first) {
13  os << *(defined.first) << " ";
14  if (defined.second) {
15  div.rep().stream(os);
16  } else {
17  os << "* division not defined * ";
18  }
19  } else {
20  os << "* division not declared * ";
21  }
22  return os;
23 }
24 
26 
28 
30  const DDLogicalPart& parent,
31  const DDAxes axis,
32  const int nReplicas,
33  const double width,
34  const double offset)
36  create(name, std::make_unique<Division>(parent, axis, nReplicas, width, offset));
37 }
38 
40  const DDName& name, const DDLogicalPart& parent, const DDAxes axis, const int nReplicas, const double offset) {
41  create(name, std::make_unique<Division>(parent, axis, nReplicas, offset));
42 }
43 
45  const DDName& name, const DDLogicalPart& parent, const DDAxes axis, const double width, const double offset) {
46  create(name, std::make_unique<Division>(parent, axis, width, offset));
47 }
48 
49 DDAxes DDDivision::axis() const { return rep().axis(); }
50 
51 int DDDivision::nReplicas() const { return rep().nReplicas(); }
52 
53 double DDDivision::width() const { return rep().width(); }
54 
55 double DDDivision::offset() const { return rep().offset(); }
56 
57 const DDLogicalPart& DDDivision::parent() const { return rep().parent(); }
DDBase::def_type
std::pair< const N *, bool > def_type
Definition: DDBase.h:51
ApeEstimator_cff.width
width
Definition: ApeEstimator_cff.py:24
DDI
Definition: DDCompactView.h:25
MessageLogger.h
DDDivision::width
double width() const
Definition: DDDivision.cc:53
DDName
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
Division.h
DDBase::isDefined
def_type isDefined() const
Definition: DDBase.h:90
DDDivision::DDDivision
DDDivision()
The default constructor provides an uninitialzed reference object.
Definition: DDDivision.cc:25
operator<<
std::ostream & operator<<(std::ostream &os, const DDDivision &div)
Definition: DDDivision.cc:10
DDBase< DDName, std::unique_ptr< DDI::Division > >::name
const DDName & name() const
Definition: DDBase.h:59
DDBase::rep
const DDI::rep_traits< N, C >::reference rep() const
Definition: DDBase.h:65
DDAxes
DDAxes
analagous to geant4/source/global/HEPGeometry/include/geomdefs.hh
Definition: DDAxes.h:11
DDLogicalPart
A DDLogicalPart aggregates information concerning material, solid and sensitveness ....
Definition: DDLogicalPart.h:93
DDDivision::offset
double offset() const
Definition: DDDivision.cc:55
DDDivision::nReplicas
int nReplicas() const
Definition: DDDivision.cc:51
DDDivision::axis
DDAxes axis() const
Definition: DDDivision.cc:49
cms::cuda::device::unique_ptr
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
Definition: device_unique_ptr.h:33
DDDivision
Definition: DDDivision.h:78
std
Definition: JetResolutionObject.h:76
DDDivision.h
DDBase< DDName, std::unique_ptr< DDI::Division > >::create
void create(const DDName &name, std::unique_ptr< DDI::Division > vals)
Definition: DDBase.h:96
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
DDI::Division
Definition: Division.h:13
DDBase
Definition: DDBase.h:10
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
class-composition.parent
parent
Definition: class-composition.py:88
DDDivision::parent
const DDLogicalPart & parent() const
Definition: DDDivision.cc:57