CMS 3D CMS Logo

DDMap Class Reference

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

#include <DetectorDescription/Core/interface/DDMap.h>

Inheritance diagram for DDMap:

DDBase< N, C >

List of all members.

Public Types

typedef dd_map_type::size_type size_t
 size type for the size of the stored values
typedef dd_map_type value_type
 the type of the managed object

Public Member Functions

 DDMap (const DDName &name, dd_map_type *value)
 creation of a new named constant; if it already existed with the given name, it's overwritten with new values
 DDMap (const DDName &name)
 a refenrence to a constant
 DDMap ()
 an uninitialized constant; one can assign an initialized constant to make it valid
value_type::const_iterator mapBegin () const
 read-only iterator pointing to the begin of the stored values
value_type::const_iterator mapEnd () const
 read-only iterator poining one place after the stored values
const double & operator[] (const std::string &name) const throw (DDException)
 returns the value on position pos; does not check boundaries!
size_t size () const
 the size of the array of values
const dd_map_typevalues () const
 the stored values


Detailed Description

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

Definition at line 19 of file DDMap.h.


Member Typedef Documentation

typedef dd_map_type::size_type DDMap::size_t

size type for the size of the stored values

Definition at line 26 of file DDMap.h.

typedef dd_map_type DDMap::value_type

the type of the managed object

Definition at line 23 of file DDMap.h.


Constructor & Destructor Documentation

DDMap::DDMap (  ) 

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

Definition at line 9 of file DDMap.cc.

DDMap::DDMap ( const DDName name  ) 

a refenrence to a constant

Definition at line 12 of file DDMap.cc.

References DDI::Singleton< I >::instance(), and DDBase< N, C >::prep_.

00012                                 : DDBase<DDName,dd_map_type*>() 
00013 {
00014   prep_ = StoreT::instance().create(name);
00015 }

DDMap::DDMap ( const DDName name,
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 17 of file DDMap.cc.

References DDI::Singleton< I >::instance(), and DDBase< N, C >::prep_.

00018 {
00019   prep_ = StoreT::instance().create(name,vals);
00020 }  


Member Function Documentation

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

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

Definition at line 50 of file DDMap.h.

References DDBase< N, C >::rep().

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

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

read-only iterator poining one place after the stored values

Definition at line 53 of file DDMap.h.

References DDBase< N, C >::rep().

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

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

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

Definition at line 44 of file DDMap.h.

References DDBase< N, C >::name(), r, and DDBase< N, C >::rep().

00044                                                                                {
00045      const dd_map_type & r(rep()); 
00046      return r[name];
00047    } 

size_t DDMap::size ( void   )  const [inline]

the size of the array of values

Definition at line 38 of file DDMap.h.

References DDBase< N, C >::rep().

Referenced by operator<<().

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

const dd_map_type& DDMap::values (  )  const [inline]

the stored values

Definition at line 41 of file DDMap.h.

References DDBase< N, C >::rep().

Referenced by operator<<().

00041 { return rep(); }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:18:09 2009 for CMSSW by  doxygen 1.5.4