CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
DDBase< N, C > Class Template Reference

#include <DDBase.h>

Classes

class  iterator
 

Public Types

using def_type = std::pair< const N *, bool >
 
using StoreT = DDI::Singleton< DDI::Store< N, C > >
 

Public Member Functions

void create (const N &name, C vals)
 
void create (const N &name)
 
 DDBase ()
 
const Nddname () const
 
def_type isDefined () const
 
bool isValid () const
 true, if the wrapped pointer is valid More...
 
const Nname () 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 auto begin ()
 
static auto end ()
 

Private Attributes

DDI::rep_type< N, C > * prep_
 

Detailed Description

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

Definition at line 10 of file DDBase.h.

Member Typedef Documentation

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

Definition at line 66 of file DDBase.h.

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

Definition at line 65 of file DDBase.h.

Constructor & Destructor Documentation

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

Definition at line 70 of file DDBase.h.

71  : prep_( nullptr ) { }
DDI::rep_type< N, C > * prep_
Definition: DDBase.h:130
template<class N, class C>
virtual DDBase< N, C >::~DDBase ( )
inlinevirtual

Definition at line 72 of file DDBase.h.

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

Member Function Documentation

template<class N, class C>
static auto DDBase< N, C >::begin ( void  )
inlinestatic

Definition at line 68 of file DDBase.h.

68 { return StoreT::instance().begin(); }
static value_type & instance()
template<class N, class C>
void DDBase< N, C >::create ( const N name,
vals 
)
inline

Definition at line 121 of file DDBase.h.

121  {
122  prep_ = StoreT::instance().create( name, std::move( vals ) );
123  }
const N & name() const
Definition: DDBase.h:74
static value_type & instance()
DDI::rep_type< N, C > * prep_
Definition: DDBase.h:130
def move(src, dest)
Definition: eostools.py:511
template<class N, class C>
void DDBase< N, C >::create ( const N name)
inline

Definition at line 124 of file DDBase.h.

124  {
125  prep_ = StoreT::instance().create( name );
126  }
const N & name() const
Definition: DDBase.h:74
static value_type & instance()
DDI::rep_type< N, C > * prep_
Definition: DDBase.h:130
template<class N, class C>
const N& DDBase< N, C >::ddname ( ) const
inline

Definition at line 76 of file DDBase.h.

Referenced by DDMaterial::addMaterial(), DDG4Builder::BuildGeometry(), DDHCalBarrelAlgo::constructInsideDetectors(), DDHCalBarrelAlgo::constructInsideLayers(), DDHCalEndcapModuleAlgo::constructInsideModule(), DDHCalEndcapAlgo::constructInsideModule(), DDHCalEndcapModuleAlgo::constructInsideModule0(), DDHCalEndcapAlgo::constructInsideModule0(), DDAHcalModuleAlgo::constructLayers(), DDHGCalModule::constructLayers(), DDHGCalModuleAlgo::constructLayers(), DDHGCalTBModule::constructLayers(), DDHGCalEEAlgo::constructLayers(), DDHGCalHEAlgo::constructLayers(), DDHCalBarrelAlgo::constructMidLayer(), DDHCalEndcapModuleAlgo::constructScintLayer(), DDHCalEndcapAlgo::constructScintLayer(), DDHCalBarrelAlgo::constructSideLayer(), DDG4Builder::convertLV(), DDCheckConnect(), DDCheckMaterial(), DDHtmlLpDetails::details(), DDHtmlMaDetails::details(), DDHGCalCell::execute(), DDHGCalWafer8::execute(), DDTIDModuleAlgo::execute(), DDPixBarLayerAlgo::execute(), DDTIBLayerAlgo_MTCC::execute(), DDPixBarLayerUpgradeAlgo::execute(), DDHCalTBCableAlgo::execute(), DDHCalForwardAlgo::execute(), DDTIBLayerAlgo::execute(), DDTECModuleAlgo::execute(), DDErrorDetection::lp_cpv(), DDDividedBoxX::makeDDLogicalPart(), DDDividedConsRho::makeDDLogicalPart(), DDDividedTubsRho::makeDDLogicalPart(), DDDividedPolyconeRho::makeDDLogicalPart(), DDDividedTrdX::makeDDLogicalPart(), DDDividedPolyhedraRho::makeDDLogicalPart(), DDDividedConsPhi::makeDDLogicalPart(), DDDividedBoxY::makeDDLogicalPart(), DDDividedPolyconePhi::makeDDLogicalPart(), DDDividedPolyhedraPhi::makeDDLogicalPart(), DDDividedBoxZ::makeDDLogicalPart(), DDDividedConsZ::makeDDLogicalPart(), DDDividedTubsZ::makeDDLogicalPart(), DDDividedPolyconeZ::makeDDLogicalPart(), DDDividedPolyhedraZ::makeDDLogicalPart(), DDDividedTrdZ::makeDDLogicalPart(), DDDividedTubsPhi::makeDDRotation(), DDDividedConsPhi::makeDDRotation(), DDDividedPolyhedraPhi::makeDDRotation(), DDDividedPolyconePhi::makeDDRotation(), DDExpandedNodeLess::operator()(), operator<<(), DDHGCalHEAlgo::positionMix(), DDAHcalModuleAlgo::positionSensitive(), DDHGCalModuleAlgo::positionSensitive(), DDHGCalTBModule::positionSensitive(), DDHGCalModule::positionSensitive(), DDHGCalEEAlgo::positionSensitive(), DDHGCalHEAlgo::positionSensitive(), and DDI::LogicalPart::stream().

76 { return prep_->name(); }
DDI::rep_type< N, C > * prep_
Definition: DDBase.h:130
const rep_traits< N, I >::name_type & name() const
Definition: rep_type.h:41
template<class N, class C>
static auto DDBase< N, C >::end ( void  )
inlinestatic

Definition at line 67 of file DDBase.h.

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

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

Definition at line 107 of file DDBase.h.

Referenced by DDG4Builder::BuildGeometry(), DDDividedGeometryObject::checkParametersValidity(), DDCheckMaterial(), DDCheckPD(), DDHtmlLpDetails::details(), DDHtmlMaDetails::details(), DDHtmlRoDetails::details(), operator<<(), DDLDivision::processElement(), and DDErrorDetection::so().

108  {
109  return prep_ ?
110  std::make_pair( &( prep_->name()), bool( prep_->second ))
111  :
112  std::make_pair(( const N* )nullptr, false );
113  }
#define nullptr
DDI::rep_type< N, C > * prep_
Definition: DDBase.h:130
#define N
Definition: blowfish.cc:9
const rep_traits< N, I >::name_type & name() const
Definition: rep_type.h:41
template<class N, class C>
bool DDBase< N, C >::isValid ( void  ) const
inline
template<class N, class C>
const N& DDBase< N, C >::name ( ) const
inline

Definition at line 74 of file DDBase.h.

Referenced by config.CFG::__str__(), PrintGeomSummary::addSolid(), ListIds::analyze(), DDG4SolidConverter::box(), GEMGeometryBuilderFromDDD::build(), MagGeoBuilderFromDDD::build(), CmsMTDConstruction::buildBTLModule(), ME0GeometryParsFromDD::buildChamber(), ME0GeometryBuilderFromDDD::buildChamber(), GEMGeometryParsFromDD::buildChamber(), GEMGeometryBuilderFromDDD::buildChamber(), CmsMTDConstruction::buildComponent(), CmsMTDTrayBuilder::buildComponent(), CmsMTDDiscBuilder::buildComponent(), CmsMTDSubStrctBuilder::buildComponent(), CmsMTDEndcapBuilder::buildComponent(), CmsMTDBuilder::buildComponent(), CTPPSGeometryESModule::buildDetGeomDesc(), ME0GeometryParsFromDD::buildEtaPartition(), ME0GeometryBuilderFromDDD::buildEtaPartition(), GEMGeometryParsFromDD::buildEtaPartition(), GEMGeometryBuilderFromDDD::buildEtaPartition(), ME0GeometryParsFromDD::buildGeometry(), ME0GeometryBuilderFromDDD::buildGeometry(), RPCGeometryBuilderFromDDD::buildGeometry(), GEMGeometryParsFromDD::buildGeometry(), RPCGeometryParsFromDD::buildGeometry(), ME0GeometryParsFromDD::buildLayer(), ME0GeometryBuilderFromDDD::buildLayer(), GEMGeometryParsFromDD::buildSuperChamber(), GEMGeometryBuilderFromDDD::buildSuperChamber(), DDDividedGeometryObject::checkNDivAndWidth(), DDG4SolidConverter::cons(), DDHCalBarrelAlgo::constructGeneralVolume(), DDHCalEndcapAlgo::constructGeneralVolume(), DDHCalBarrelAlgo::constructInsideDetectors(), DDHCalBarrelAlgo::constructInsideLayers(), DDHCalEndcapModuleAlgo::constructInsideModule(), DDHCalEndcapAlgo::constructInsideModule(), DDHCalEndcapModuleAlgo::constructInsideModule0(), DDHCalEndcapAlgo::constructInsideModule0(), DDHCalBarrelAlgo::constructInsideSector(), DDHCalEndcapAlgo::constructInsideSector(), DDAHcalModuleAlgo::constructLayers(), DDHGCalModule::constructLayers(), DDHGCalModuleAlgo::constructLayers(), DDHGCalTBModule::constructLayers(), DDHGCalEEAlgo::constructLayers(), DDHGCalHEAlgo::constructLayers(), DDHCalBarrelAlgo::constructMidLayer(), DDHCalEndcapModuleAlgo::constructScintLayer(), DDHCalEndcapAlgo::constructScintLayer(), DDHCalBarrelAlgo::constructSideLayer(), DDG4Builder::convertLV(), DDG4Builder::convertMaterial(), TGeoMgrFromDdd::createMaterial(), TGeoFromDddService::createMaterial(), TGeoMgrFromDdd::createShape(), TGeoFromDddService::createShape(), TGeoMgrFromDdd::createVolume(), TGeoFromDddService::createVolume(), DDG4SolidConverter::cuttubs(), DDBox::DDBox(), DDCheckAll(), DDCheckMaterial(), DDCheckPD(), DDCons::DDCons(), DDCutTubs::DDCutTubs(), DDEllipticalTube::DDEllipticalTube(), DDExpandedViewDump(), DDExtrudedPolygon::DDExtrudedPolygon(), DDIntersection::DDIntersection(), DDPolycone::DDPolycone(), DDPolyhedra::DDPolyhedra(), DDPseudoTrap::DDPseudoTrap(), DDShapelessSolid::DDShapelessSolid(), DDSphere::DDSphere(), DDSubtraction::DDSubtraction(), DDTorus::DDTorus(), DDTrap::DDTrap(), DDTruncTubs::DDTruncTubs(), DDTubs::DDTubs(), DDUnion::DDUnion(), HGCalSimHitValidation::defineGeometry(), DDMaterial::density(), validation.Sample::digest(), DDTECModuleAlgo::doPos(), DDG4SolidConverter::ellipticaltube(), DDHGCalWafer8::execute(), DDHGCalCell::execute(), DDHCalTBCableAlgo::execute(), DDTIDModuleAlgo::execute(), DDPixBarLayerAlgo::execute(), DDTIBLayerAlgo_MTCC::execute(), DDTIBLayerAlgo::execute(), DDPixBarLayerUpgradeAlgo::execute(), DDTECModuleAlgo::execute(), DDEcalBarrelAlgo::execute(), DDEcalBarrelNewAlgo::execute(), DDG4SolidConverter::extrudedpolygon(), MuonDDDNumbering::getInt(), HcalTB06BeamSD::getNames(), MaterialBudgetHcalHistos::getNames(), HCalSD::getNames(), HCalSD::HCalSD(), HcalTB06BeamSD::HcalTB06BeamSD(), VIDSelectorBase.VIDSelectorBase::initialize(), DreamSD::initMap(), HcalTB02SD::initMap(), ECalSD::initMap(), DDG4SolidConverter::intersection(), HcalGeomParameters::loadGeometry(), HGCalGeomParameters::loadGeometryHexagon(), DDDividedTubsPhi::makeDDLogicalPart(), DDDividedTrdY::makeDDLogicalPart(), DDLDivision::makeDivider(), DDCompareEPV::operator()(), DDCompareCPV::operator()(), DDCompareLP::operator()(), DDCompareSolid::operator()(), DDCompareBoolSol::operator()(), DDCompareDDRot::operator()(), operator<<(), DDG4SolidConverter::polycone_rrz(), DDG4SolidConverter::polycone_rz(), DDG4SolidConverter::polyhedra_rrz(), DDG4SolidConverter::polyhedra_rz(), DDHGCalHEAlgo::positionMix(), DDG4SolidConverter::pseudotrap(), CocoaAnalyzer::ReadXMLFile(), DDCoreToDDXMLOutput::solid(), DDG4SolidConverter::sphere(), DDG4SolidConverter::subtraction(), DDG4SolidConverter::torus(), DDG4SolidConverter::trap(), DDG4SolidConverter::trunctubs(), DDG4SolidConverter::tubs(), DDG4SolidConverter::unionsolid(), PrintGeomInfoAction::update(), DDBase< DDName, std::unique_ptr< DDI::Material > >::val(), Vispa.Views.PropertyView.Property::valueChanged(), MagGeoBuilderFromDDD::volumeHandle::volumeHandle(), DDEcalBarrelAlgo::web(), and DDEcalBarrelNewAlgo::web().

74 { return prep_->name(); }
DDI::rep_type< N, C > * prep_
Definition: DDBase.h:130
const rep_traits< N, I >::name_type & name() const
Definition: rep_type.h:41
template<class N, class C>
DDBase< N, C >::operator bool ( ) const
inline

Definition at line 100 of file DDBase.h.

100 { return isValid(); }
bool isValid() const
true, if the wrapped pointer is valid
Definition: DDBase.h:116
template<class N, class C>
bool DDBase< N, C >::operator< ( const DDBase< N, C > &  b) const
inline

Definition at line 101 of file DDBase.h.

101 { return prep_ < b.prep_; }
DDI::rep_type< N, C > * prep_
Definition: DDBase.h:130
template<class N, class C>
bool DDBase< N, C >::operator== ( const DDBase< N, C > &  b) const
inline

Definition at line 98 of file DDBase.h.

98 { return prep_ == b.prep_; }
DDI::rep_type< N, C > * prep_
Definition: DDBase.h:130
template<class N, class C>
bool DDBase< N, C >::operator> ( const DDBase< N, C > &  b) const
inline

Definition at line 102 of file DDBase.h.

102 { return prep_ > b.prep_; }
DDI::rep_type< N, C > * prep_
Definition: DDBase.h:130
template<class N, class C>
const DDI::rep_traits< N, C >::reference DDBase< N, C >::rep ( ) const
inline

Definition at line 80 of file DDBase.h.

Referenced by operator<<(), and DDBase< DDName, std::unique_ptr< DDI::Material > >::val().

80  {
81  return *( prep_->second );
82  }
DDI::rep_type< N, C > * prep_
Definition: DDBase.h:130
template<class N, class C>
DDI::rep_traits< N, C >::reference DDBase< N, C >::rep ( )
inline

Definition at line 84 of file DDBase.h.

84  {
85  return *( prep_->second );
86  }
DDI::rep_type< N, C > * prep_
Definition: DDBase.h:130
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 88 of file DDBase.h.

88  {
89  if( !isValid()) throw cms::Exception( "DDException" ) << "undefined: " << name();
90  return rep();
91  }
const N & name() const
Definition: DDBase.h:74
const DDI::rep_traits< N, C >::reference rep() const
Definition: DDBase.h:80
bool isValid() const
true, if the wrapped pointer is valid
Definition: DDBase.h:116
template<class N, class C>
const DDI::rep_traits<N,C>::reference DDBase< N, C >::val ( )
inline

Definition at line 93 of file DDBase.h.

93  {
94  if( !isValid()) throw cms::Exception( "DDException" ) << "undefined: " << name();
95  return rep();
96  }
const N & name() const
Definition: DDBase.h:74
const DDI::rep_traits< N, C >::reference rep() const
Definition: DDBase.h:80
bool isValid() const
true, if the wrapped pointer is valid
Definition: DDBase.h:116

Member Data Documentation

template<class N, class C>
DDI::rep_type<N, C>* DDBase< N, C >::prep_
private