CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
DDBase< N, C > Class Template Reference

#include <DDBase.h>

Classes

class  iterator
 

Public Types

typedef std::pair< const N
*, bool > 
def_type
 
typedef C pimpl_type
 
typedef DDI::rep_type< N,
pimpl_type > * 
prep_type
 
typedef DDI::Singleton
< DDI::Store< N, C > > 
StoreT
 

Public Member Functions

 DDBase ()
 
const N & ddname () const
 
def_type isDefined () const
 
bool isValid () const
 true, if the wrapped pointer is valid More...
 
const N & name () 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< N, C >
::reference 
rep () const
 
DDI::rep_traits< N, C >::reference rep ()
 
std::string toString () const
 
const DDI::rep_traits< N, C >
::reference 
val () const
 
const DDI::rep_traits< N, C >
::reference 
val ()
 
virtual ~DDBase ()
 

Static Public Member Functions

static DDI::Store< N, C >::iterator begin ()
 
static void clear ()
 
static DDI::Store< N, C >::iterator end ()
 
static size_t size ()
 

Protected Attributes

prep_type prep_
 

Detailed Description

template<class N, class C>
class DDBase< N, C >

your comment here

Definition at line 18 of file DDBase.h.

Member Typedef Documentation

template<class N, class C>
typedef std::pair<const N*,bool> DDBase< N, C >::def_type

Definition at line 83 of file DDBase.h.

template<class N, class C>
typedef C DDBase< N, C >::pimpl_type

Definition at line 81 of file DDBase.h.

template<class N, class C>
typedef DDI::rep_type<N,pimpl_type>* DDBase< N, C >::prep_type

Definition at line 82 of file DDBase.h.

template<class N, class C>
typedef DDI::Singleton<DDI::Store<N,C> > DDBase< N, C >::StoreT

Definition at line 80 of file DDBase.h.

Constructor & Destructor Documentation

template<class N, class C>
DDBase< N, C >::DDBase ( )
inline

Definition at line 85 of file DDBase.h.

85 : prep_(0) { }
prep_type prep_
Definition: DDBase.h:137
template<class N, class C>
virtual DDBase< N, C >::~DDBase ( )
inlinevirtual

Definition at line 86 of file DDBase.h.

86 { /*never do this here: if (prep_) delete prep_;*/ }

Member Function Documentation

template<class N, class C>
static DDI::Store<N,C>::iterator DDBase< N, C >::begin ( void  )
inlinestatic

Definition at line 76 of file DDBase.h.

Referenced by DDCheckAll().

76 { return StoreT::instance().begin(); }
static value_type & instance()
template<class N, class C>
static void DDBase< N, C >::clear ( void  )
inlinestatic
template<class N, class C>
const N& DDBase< N, C >::ddname ( ) const
inline

Definition at line 90 of file DDBase.h.

Referenced by DDMaterial::addMaterial(), DDG4Builder::BuildGeometry(), DDHCalBarrelAlgo::constructInsideDetectors(), DDHCalBarrelAlgo::constructInsideLayers(), DDHCalEndcapAlgo::constructInsideModule(), DDHCalEndcapAlgo::constructInsideModule0(), DDHCalBarrelAlgo::constructMidLayer(), DDHCalEndcapAlgo::constructScintLayer(), DDHCalBarrelAlgo::constructSideLayer(), DDG4Builder::convertLV(), DDCheckConnect(), DDCheckMaterial(), DDHtmlLpDetails::details(), DDHtmlMaDetails::details(), DDHCalForwardAlgo::execute(), DDTIBLayerAlgo_MTCC::execute(), DDPixBarLayerAlgo::execute(), DDTIBLayerAlgo::execute(), DDTIDModuleAlgo::execute(), DDHCalTBCableAlgo::execute(), DDTECModuleAlgo::execute(), hierarchy(), DDErrorDetection::lp_cpv(), DDDividedConsRho::makeDDLogicalPart(), DDDividedTubsRho::makeDDLogicalPart(), DDDividedBoxX::makeDDLogicalPart(), DDDividedTrdX::makeDDLogicalPart(), DDDividedPolyconeRho::makeDDLogicalPart(), DDDividedPolyhedraRho::makeDDLogicalPart(), DDDividedBoxY::makeDDLogicalPart(), DDDividedConsPhi::makeDDLogicalPart(), DDDividedPolyconePhi::makeDDLogicalPart(), DDDividedPolyhedraPhi::makeDDLogicalPart(), DDDividedBoxZ::makeDDLogicalPart(), DDDividedTubsZ::makeDDLogicalPart(), DDDividedConsZ::makeDDLogicalPart(), DDDividedTrdZ::makeDDLogicalPart(), DDDividedPolyconeZ::makeDDLogicalPart(), DDDividedPolyhedraZ::makeDDLogicalPart(), DDDividedTubsPhi::makeDDRotation(), DDDividedConsPhi::makeDDRotation(), DDDividedPolyconePhi::makeDDRotation(), DDDividedPolyhedraPhi::makeDDRotation(), DDExpandedNodeLess::operator()(), operator<<(), DDI::LogicalPart::stream(), and DDCompactViewImpl::weight().

90 { return prep_->name(); }
const rep_traits< N, I >::name_type & name() const
Definition: rep_type.h:35
prep_type prep_
Definition: DDBase.h:137
template<class N, class C>
static DDI::Store<N,C>::iterator DDBase< N, C >::end ( void  )
inlinestatic

Definition at line 75 of file DDBase.h.

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

75 { return StoreT::instance().end(); }
static value_type & instance()
template<class N, class C>
def_type DDBase< N, C >::isDefined ( ) const
inline
template<class N, class C>
bool DDBase< N, C >::isValid ( void  ) const
inline

true, if the wrapped pointer is valid

Definition at line 130 of file DDBase.h.

Referenced by DDLPosPart::processElement(), XMLIdealGeometryESSource::produce(), and DDBase< DDName, DDRotationMatrix * >::val().

131  {
132  return prep_ ? bool(prep_->second)
133  : false;
134  }
prep_type prep_
Definition: DDBase.h:137
template<class N, class C>
const N& DDBase< N, C >::name ( ) const
inline

Definition at line 88 of file DDBase.h.

Referenced by DDCompactView::algoPosPart(), ListIds::analyze(), SolidsForOnline::beginRun(), PhysicalPartsTree::beginRun(), MaterialForOnline::beginRun(), DDG4SolidConverter::box(), MagGeoBuilderFromDDD::build(), RPCGeometryBuilderFromDDD::buildGeometry(), RPCGeometryParsFromDD::buildGeometry(), DDG4SolidConverter::cons(), DDHCalBarrelAlgo::constructGeneralVolume(), DDHCalEndcapAlgo::constructGeneralVolume(), DDHCalBarrelAlgo::constructInsideDetectors(), DDHCalBarrelAlgo::constructInsideLayers(), DDHCalEndcapAlgo::constructInsideModule(), DDHCalEndcapAlgo::constructInsideModule0(), DDHCalBarrelAlgo::constructInsideSector(), DDHCalEndcapAlgo::constructInsideSector(), DDHCalBarrelAlgo::constructMidLayer(), DDHCalEndcapAlgo::constructScintLayer(), DDHCalBarrelAlgo::constructSideLayer(), DDG4Builder::convertLV(), DDG4Builder::convertMaterial(), TGeoMgrFromDdd::createMaterial(), TGeoFromDddService::createMaterial(), TGeoMgrFromDdd::createShape(), TGeoFromDddService::createShape(), TGeoMgrFromDdd::createVolume(), TGeoFromDddService::createVolume(), dd_get_boolean_params(), dd_rot_out(), dd_stream_booleans(), dd_stream_reflected(), DDBox::DDBox(), DDCheckAll(), DDCheckMaterial(), DDCheckPD(), DDCons::DDCons(), DDDivision::DDDivision(), DDEllipsoid::DDEllipsoid(), DDEllipticalTube::DDEllipticalTube(), DDExpandedViewDump(), DDIntersection::DDIntersection(), DDLogicalPart::DDLogicalPart(), DDOrb::DDOrb(), DDParallelepiped::DDParallelepiped(), DDPolycone::DDPolycone(), DDPolyhedra::DDPolyhedra(), DDPseudoTrap::DDPseudoTrap(), DDShapelessSolid::DDShapelessSolid(), DDSphere::DDSphere(), DDSubtraction::DDSubtraction(), DDTorus::DDTorus(), DDTrap::DDTrap(), DDTruncTubs::DDTruncTubs(), DDTubs::DDTubs(), DDUnion::DDUnion(), DDTECModuleAlgo::doPos(), DDG4SolidConverter::ellipsoid(), DDG4SolidConverter::ellipticaltube(), DDHCalTBCableAlgo::execute(), DDTIBLayerAlgo_MTCC::execute(), DDTIBLayerAlgo::execute(), DDTIDModuleAlgo::execute(), DDPixBarLayerAlgo::execute(), DDTECModuleAlgo::execute(), DDEcalBarrelAlgo::execute(), DDEcalBarrelNewAlgo::execute(), MuonDDDNumbering::getInt(), HcalTB06BeamSD::getNames(), MaterialBudgetHcalHistos::getNames(), HCalSD::getNames(), HCalSD::HCalSD(), HcalTB06BeamSD::HcalTB06BeamSD(), hierarchy(), DreamSD::initMap(), ECalSD::initMap(), HcalTB02SD::initMap(), DDG4SolidConverter::intersection(), HcalNumberingFromDDD::loadGeometry(), DDDividedTubsPhi::makeDDLogicalPart(), DDDividedTrdY::makeDDLogicalPart(), DDLDivision::makeDivider(), DDStreamer::materials_read(), DDStreamer::materials_write(), operator<<(), DDG4SolidConverter::orb(), DDG4SolidConverter::para(), DDStreamer::parts_write(), DDG4SolidConverter::polycone_rrz(), DDG4SolidConverter::polycone_rz(), DDG4SolidConverter::polyhedra_rrz(), DDG4SolidConverter::polyhedra_rz(), DDStreamer::pos_read(), DDStreamer::pos_write(), DDG4SolidConverter::pseudotrap(), CocoaAnalyzer::ReadXMLFile(), DDG4SolidConverter::reflected(), DDStreamer::rots_read(), DDStreamer::solids_write(), DDStreamer::specs_write(), DDG4SolidConverter::sphere(), DDG4SolidConverter::subtraction(), DDG4SolidConverter::torus(), DDG4SolidConverter::trap(), DDG4SolidConverter::trunctubs(), DDG4SolidConverter::tubs(), DDG4SolidConverter::unionsolid(), PrintGeomInfoAction::update(), DDBase< DDName, DDRotationMatrix * >::val(), python.Vispa.Views.PropertyView.Property::valueChanged(), MagGeoBuilderFromDDD::volumeHandle::volumeHandle(), DDEcalBarrelAlgo::web(), and DDEcalBarrelNewAlgo::web().

88 { return prep_->name(); }
const rep_traits< N, I >::name_type & name() const
Definition: rep_type.h:35
prep_type prep_
Definition: DDBase.h:137
template<class N, class C>
DDBase< N, C >::operator bool ( ) const
inline

Definition at line 113 of file DDBase.h.

113 { return prep_ ? prep_->second : false; }
prep_type prep_
Definition: DDBase.h:137
template<class N, class C>
bool DDBase< N, C >::operator< ( const DDBase< N, C > &  b) const
inline

Definition at line 115 of file DDBase.h.

115 { return prep_ < b.prep_; }
prep_type prep_
Definition: DDBase.h:137
template<class N, class C>
bool DDBase< N, C >::operator== ( const DDBase< N, C > &  b) const
inline

Definition at line 111 of file DDBase.h.

111 { return prep_ == b.prep_; }
prep_type prep_
Definition: DDBase.h:137
template<class N, class C>
bool DDBase< N, C >::operator> ( const DDBase< N, C > &  b) const
inline

Definition at line 116 of file DDBase.h.

116 { return prep_ > b.prep_; }
prep_type prep_
Definition: DDBase.h:137
template<class N, class C>
const DDI::rep_traits<N,C>::reference DDBase< N, C >::rep ( ) const
inline
template<class N, class C>
DDI::rep_traits<N,C>::reference DDBase< N, C >::rep ( )
inline

Definition at line 98 of file DDBase.h.

99  { return *(prep_->second); }
prep_type prep_
Definition: DDBase.h:137
template<class N, class C>
static size_t DDBase< N, C >::size ( void  )
inlinestatic

Definition at line 79 of file DDBase.h.

79 { return StoreT::instance().size(); }
static value_type & instance()
template<class N, class C>
std::string DDBase< N, C >::toString ( ) const
inline
template<class N, class C>
const DDI::rep_traits<N,C>::reference DDBase< N, C >::val ( ) const
inline

Definition at line 101 of file DDBase.h.

102  { if (!isValid()) throw DDException(std::string("undefined: ") + std::string(name()));
103  return rep();
104  };
const DDI::rep_traits< N, C >::reference rep() const
Definition: DDBase.h:95
const N & name() const
Definition: DDBase.h:88
An exception for DDD errors.
Definition: DDException.h:23
bool isValid() const
true, if the wrapped pointer is valid
Definition: DDBase.h:130
template<class N, class C>
const DDI::rep_traits<N,C>::reference DDBase< N, C >::val ( )
inline

Definition at line 106 of file DDBase.h.

107  { if (!isValid()) throw DDException(std::string("undefined: ") + std::string(name()));
108  return rep();
109  };
const DDI::rep_traits< N, C >::reference rep() const
Definition: DDBase.h:95
const N & name() const
Definition: DDBase.h:88
An exception for DDD errors.
Definition: DDException.h:23
bool isValid() const
true, if the wrapped pointer is valid
Definition: DDBase.h:130

Member Data Documentation

template<class N, class C>
prep_type DDBase< N, C >::prep_
protected