CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions
DDMap Class Reference

a named constant corresponding to the DDL-XML tag <Constant> and <ConstantsVector> More...

#include <DDMap.h>

Inheritance diagram for DDMap:
DDBase< DDName, std::unique_ptr< dd_map_type > >

Public Types

using size_t = dd_map_type::size_type
 size type for the size of the stored values More...
 
using value_type = dd_map_type
 the type of the managed object More...
 
- Public Types inherited from DDBase< DDName, std::unique_ptr< dd_map_type > >
using def_type = std::pair< const DDName *, bool >
 
using StoreT = DDI::Singleton< DDI::Store< DDName, std::unique_ptr< dd_map_type > > >
 

Public Member Functions

 DDMap ()
 an uninitialized constant; one can assign an initialized constant to make it valid More...
 
 DDMap (const DDName &name)
 a refenrence to a constant More...
 
 DDMap (const DDName &name, std::unique_ptr< dd_map_type > value)
 creation of a new named constant; if it already existed with the given name, it's overwritten with new values More...
 
value_type::const_iterator mapBegin () const
 read-only iterator pointing to the begin of the stored values More...
 
value_type::const_iterator mapEnd () const
 read-only iterator poining one place after the stored values More...
 
const double & operator[] (const std::string &name) const
 returns the value on position pos; does not check boundaries! More...
 
size_t size () const
 the size of the array of values More...
 
const dd_map_typevalues () const
 the stored values More...
 
- Public Member Functions inherited from DDBase< DDName, std::unique_ptr< dd_map_type > >
void create (const DDName &name)
 
void create (const DDName &name, std::unique_ptr< dd_map_type > vals)
 
 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
 
DDI::rep_traits< DDName, std::unique_ptr< dd_map_type > >::reference rep ()
 
const DDI::rep_traits< DDName, std::unique_ptr< dd_map_type > >::reference rep () const
 
std::string toString () const
 
const DDI::rep_traits< DDName, std::unique_ptr< dd_map_type > >::reference val ()
 
const DDI::rep_traits< DDName, std::unique_ptr< dd_map_type > >::reference val () const
 
virtual ~DDBase ()
 

Additional Inherited Members

- Static Public Member Functions inherited from DDBase< DDName, std::unique_ptr< dd_map_type > >
static auto begin ()
 
static auto end ()
 

Detailed Description

a named constant corresponding to the DDL-XML tag <Constant> and <ConstantsVector>

Definition at line 22 of file DDMap.h.

Member Typedef Documentation

◆ size_t

using DDMap::size_t = dd_map_type::size_type

size type for the size of the stored values

Definition at line 28 of file DDMap.h.

◆ value_type

the type of the managed object

Definition at line 25 of file DDMap.h.

Constructor & Destructor Documentation

◆ DDMap() [1/3]

DDMap::DDMap ( )

an uninitialized constant; one can assign an initialized constant to make it valid

Definition at line 5 of file DDMap.cc.

◆ DDMap() [2/3]

DDMap::DDMap ( const DDName name)

◆ DDMap() [3/3]

DDMap::DDMap ( const DDName name,
std::unique_ptr< dd_map_type value 
)

creation of a new named constant; if it already existed with the given name, it's overwritten with new values

Definition at line 9 of file DDMap.cc.

9 { create(name, std::move(vals)); }

References DDBase< DDName, std::unique_ptr< dd_map_type > >::create(), eostools::move(), and DDBase< DDName, std::unique_ptr< dd_map_type > >::name().

Member Function Documentation

◆ mapBegin()

value_type::const_iterator DDMap::mapBegin ( ) const
inline

read-only iterator pointing to the begin of the stored values

Definition at line 52 of file DDMap.h.

52 { return rep().begin(); }

References DDBase< DDName, std::unique_ptr< dd_map_type > >::rep().

◆ mapEnd()

value_type::const_iterator DDMap::mapEnd ( ) const
inline

read-only iterator poining one place after the stored values

Definition at line 55 of file DDMap.h.

55 { return rep().end(); }

References DDBase< DDName, std::unique_ptr< dd_map_type > >::rep().

◆ operator[]()

const double& DDMap::operator[] ( const std::string &  name) const
inline

returns the value on position pos; does not check boundaries!

Definition at line 46 of file DDMap.h.

46  {
47  const dd_map_type& r(rep());
48  return r[name];
49  }

References DDBase< DDName, std::unique_ptr< dd_map_type > >::name(), alignCSCRings::r, and DDBase< DDName, std::unique_ptr< dd_map_type > >::rep().

◆ size()

size_t DDMap::size ( void  ) const
inline

the size of the array of values

Definition at line 40 of file DDMap.h.

40 { return rep().size(); }

References DDBase< DDName, std::unique_ptr< dd_map_type > >::rep().

Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), and operator<<().

◆ values()

const dd_map_type& DDMap::values ( ) const
inline

the stored values

Definition at line 43 of file DDMap.h.

43 { return rep(); }

References DDBase< DDName, std::unique_ptr< dd_map_type > >::rep().

Referenced by operator<<().

DDBase< DDName, std::unique_ptr< dd_map_type > >::name
const DDName & name() const
Definition: DDBase.h:59
DDBase< DDName, std::unique_ptr< dd_map_type > >::rep
const DDI::rep_traits< DDName, std::unique_ptr< dd_map_type > >::reference rep() const
Definition: DDBase.h:65
alignCSCRings.r
r
Definition: alignCSCRings.py:93
ReadMapType< double >
eostools.move
def move(src, dest)
Definition: eostools.py:511
DDBase< DDName, std::unique_ptr< dd_map_type > >::create
void create(const DDName &name, std::unique_ptr< dd_map_type > vals)
Definition: DDBase.h:96
DDBase
Definition: DDBase.h:10