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)
 
void create (const N &name, C vals)
 
 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
 
DDI::rep_traits< N, C >::reference rep ()
 
const DDI::rep_traits< N, C >::reference rep () const
 
std::string toString () const
 
const DDI::rep_traits< N, C >::reference val ()
 
const DDI::rep_traits< N, C >::reference val () const
 
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

◆ def_type

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

Definition at line 51 of file DDBase.h.

◆ StoreT

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

Definition at line 50 of file DDBase.h.

Constructor & Destructor Documentation

◆ DDBase()

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

Definition at line 55 of file DDBase.h.

55 : prep_(nullptr) {}

◆ ~DDBase()

template<class N, class C>
virtual DDBase< N, C >::~DDBase ( )
inlinevirtual

Definition at line 56 of file DDBase.h.

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

Member Function Documentation

◆ begin()

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

Definition at line 53 of file DDBase.h.

53 { return StoreT::instance().begin(); }

◆ create() [1/2]

template<class N, class C>
void DDBase< N, C >::create ( const N name)
inline

Definition at line 97 of file DDBase.h.

97 { prep_ = StoreT::instance().create(name); }

◆ create() [2/2]

template<class N, class C>
void DDBase< N, C >::create ( const N name,
vals 
)
inline

Definition at line 96 of file DDBase.h.

96 { prep_ = StoreT::instance().create(name, std::move(vals)); }

◆ ddname()

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

Definition at line 61 of file DDBase.h.

61 { return prep_->name(); }

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

◆ end()

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

Definition at line 52 of file DDBase.h.

52 { return StoreT::instance().end(); }

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

◆ isDefined()

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

◆ isValid()

template<class N, class C>
bool DDBase< N, C >::isValid ( void  ) const
inline

◆ name()

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

Definition at line 59 of file DDBase.h.

59 { return prep_->name(); }

Referenced by config.CFG::__str__(), PrintGeomSummary::addSolid(), ListIds::analyze(), DDG4SolidConverter::box(), HcalTB06BeamParametersFromDD::build(), HcalTB02ParametersFromDD::build(), EcalSimParametersFromDD::build(), MuonOffsetFromDD::build(), GEMGeometryBuilder::build(), MagGeoBuilderFromDDD::build(), ME0GeometryParsFromDD::buildChamber(), GEMGeometryParsFromDD::buildChamber(), ME0GeometryBuilder::buildChamber(), GEMGeometryBuilder::buildChamber(), ME0GeometryParsFromDD::buildEtaPartition(), GEMGeometryParsFromDD::buildEtaPartition(), ME0GeometryBuilder::buildEtaPartition(), GEMGeometryBuilder::buildEtaPartition(), ME0GeometryParsFromDD::buildGeometry(), RPCGeometryBuilder::buildGeometry(), RPCGeometryParsFromDD::buildGeometry(), GEMGeometryParsFromDD::buildGeometry(), ME0GeometryBuilder::buildGeometry(), ME0GeometryParsFromDD::buildLayer(), ME0GeometryBuilder::buildLayer(), GEMGeometryParsFromDD::buildSuperChamber(), GEMGeometryBuilder::buildSuperChamber(), DDDividedGeometryObject::checkNDivAndWidth(), DDG4SolidConverter::cons(), DDHGCalTBModuleX::constructBlocks(), DDHCalBarrelAlgo::constructGeneralVolume(), DDHCalEndcapAlgo::constructGeneralVolume(), DDHCalBarrelAlgo::constructInsideDetectors(), DDHCalBarrelAlgo::constructInsideLayers(), DDHCalEndcapModuleAlgo::constructInsideModule(), DDHCalEndcapAlgo::constructInsideModule(), DDHCalEndcapModuleAlgo::constructInsideModule0(), DDHCalEndcapAlgo::constructInsideModule0(), DDHCalBarrelAlgo::constructInsideSector(), DDHCalEndcapAlgo::constructInsideSector(), DDAHcalModuleAlgo::constructLayers(), DDHGCalTBModule::constructLayers(), DDHGCalTBModuleX::constructLayers(), DDHGCalModuleAlgo::constructLayers(), DDHGCalModule::constructLayers(), DDHGCalEEAlgo::constructLayers(), DDHGCalHEAlgo::constructLayers(), DDHGCalHEFileAlgo::constructLayers(), DDHGCalEEFileAlgo::constructLayers(), DDHGCalMixLayer::constructLayers(), DDHGCalSiliconModule::constructLayers(), DDHCalBarrelAlgo::constructMidLayer(), DDHCalEndcapModuleAlgo::constructScintLayer(), DDHCalBarrelAlgo::constructSideLayer(), DDG4Builder::convertMaterial(), DDBase< DDName, std::unique_ptr< DDI::Material > >::create(), TGeoFromDddService::createMaterial(), TGeoMgrFromDdd::createMaterial(), TGeoFromDddService::createShape(), TGeoMgrFromDdd::createShape(), TGeoFromDddService::createVolume(), TGeoMgrFromDdd::createVolume(), DDG4SolidConverter::cuttubs(), DDCheckAll(), DDCheckMaterial(), DDCheckPD(), DDCompareBoolSol(), DDCompareCPV(), DDCompareDDRot(), DDCompareEPV(), DDCompareLP(), DDCompareSolid(), DDExpandedViewDump(), HGCalSimHitValidation::defineGeometry(), validation.Sample::digest(), DDEcalPreshowerAlgo::doLadders(), DDEcalPreshowerAlgo::doLayers(), DDTECModuleAlgo::doPos(), DDEcalPreshowerAlgo::doSens(), DDEcalEndcapAlgo::EECreateCR(), DDEcalEndcapAlgo::EECreateSC(), DDG4SolidConverter::ellipticaltube(), DDHGCalCell::execute(), DDHGCalWafer8::execute(), DDHGCalWaferF::execute(), DDHGCalWaferP::execute(), DDTIDModuleAlgo::execute(), DDPixBarLayerAlgo::execute(), DDTIBLayerAlgo::execute(), DDPixBarLayerUpgradeAlgo::execute(), DDHCalTBCableAlgo::execute(), DDTECModuleAlgo::execute(), DDEcalBarrelAlgo::execute(), DDEcalBarrelNewAlgo::execute(), DDG4SolidConverter::extrudedpolygon(), VIDSelectorBase.VIDSelectorBase::initialize(), DreamSD::initMap(), DDG4SolidConverter::intersection(), HcalGeomParameters::loadGeometry(), HGCalGeomParameters::loadGeometryHexagon(), HGCalGeomParameters::loadGeometryHexagon8(), HGCalGeomParameters::loadGeometryHexagonModule(), DDDividedTubsPhi::makeDDLogicalPart(), DDDividedTrdY::makeDDLogicalPart(), DDLDivision::makeDivider(), DDFilteredView::material(), DDFilteredView::name(), operator<<(), DDG4SolidConverter::polycone_rrz(), DDG4SolidConverter::polycone_rz(), DDG4SolidConverter::polyhedra_rrz(), DDG4SolidConverter::polyhedra_rz(), DDHGCalHEFileAlgo::positionMix(), DDHGCalHEAlgo::positionMix(), DDHGCalMixLayer::positionMix(), DDHGCalTBModuleX::positionSensitive(), DDCoreToDDXMLOutput::solid(), DDG4SolidConverter::sphere(), DDG4SolidConverter::subtraction(), DDG4SolidConverter::torus(), DDG4SolidConverter::trap(), DDG4SolidConverter::tubs(), DDG4SolidConverter::unionsolid(), DDBase< DDName, std::unique_ptr< DDI::Material > >::val(), MagGeoBuilderFromDDD::volumeHandle::volumeHandle(), DDEcalBarrelAlgo::web(), and DDEcalBarrelNewAlgo::web().

◆ operator bool()

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

Definition at line 83 of file DDBase.h.

83 { return isValid(); }

◆ operator<()

template<class N, class C>
bool DDBase< N, C >::operator< ( const DDBase< N, C > &  b) const
inline

Definition at line 84 of file DDBase.h.

84 { return prep_ < b.prep_; }

◆ operator==()

template<class N, class C>
bool DDBase< N, C >::operator== ( const DDBase< N, C > &  b) const
inline

Definition at line 81 of file DDBase.h.

81 { return prep_ == b.prep_; }

◆ operator>()

template<class N, class C>
bool DDBase< N, C >::operator> ( const DDBase< N, C > &  b) const
inline

Definition at line 85 of file DDBase.h.

85 { return prep_ > b.prep_; }

◆ rep() [1/2]

template<class N, class C>
DDI::rep_traits<N, C>::reference DDBase< N, C >::rep ( )
inline

Definition at line 67 of file DDBase.h.

67 { return *(prep_->second); }

◆ rep() [2/2]

template<class N, class C>
const DDI::rep_traits<N, C>::reference DDBase< N, C >::rep ( ) const
inline

Definition at line 65 of file DDBase.h.

65 { return *(prep_->second); }

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

◆ toString()

template<class N, class C>
std::string DDBase< N, C >::toString ( ) const
inline

◆ val() [1/2]

template<class N, class C>
const DDI::rep_traits<N, C>::reference DDBase< N, C >::val ( )
inline

Definition at line 75 of file DDBase.h.

75  {
76  if (!isValid())
77  throw cms::Exception("DDException") << "undefined: " << name();
78  return rep();
79  }

◆ val() [2/2]

template<class N, class C>
const DDI::rep_traits<N, C>::reference DDBase< N, C >::val ( ) const
inline

Definition at line 69 of file DDBase.h.

69  {
70  if (!isValid())
71  throw cms::Exception("DDException") << "undefined: " << name();
72  return rep();
73  }

Member Data Documentation

◆ prep_

template<class N, class C>
DDI::rep_type<N, C>* DDBase< N, C >::prep_
private
electrons_cff.bool
bool
Definition: electrons_cff.py:366
funct::false
false
Definition: Factorize.h:29
DDI::rep_type::second
I second
Definition: rep_type.h:37
DDBase::prep_
DDI::rep_type< N, C > * prep_
Definition: DDBase.h:100
DDI::rep_type::name
const rep_traits< N, I >::name_type & name() const
Definition: rep_type.h:39
DDBase::name
const N & name() const
Definition: DDBase.h:59
N
#define N
Definition: blowfish.cc:9
DDBase::rep
const DDI::rep_traits< N, C >::reference rep() const
Definition: DDBase.h:65
b
double b
Definition: hdecay.h:118
DDBase::isValid
bool isValid() const
true, if the wrapped pointer is valid
Definition: DDBase.h:95
DDI::Singleton::instance
static value_type & instance()
eostools.move
def move(src, dest)
Definition: eostools.py:511
Exception
Definition: hltDiff.cc:245