#include <DetectorDescription/Core/interface/DDVector.h>
Public Types | |
typedef std::vector< double > ::size_type | size_t |
size type for the size of the stored values | |
typedef std::vector< double > | value_type |
iterator for read-only acces to stored values | |
Public Member Functions | |
DDVector (const DDName &name, std::vector< double > *value) | |
creation of a new named constant; if it already existed with the given name, it's overwritten with new values | |
DDVector (const DDName &name) | |
a refenrence to a constant | |
DDVector () | |
an uninitialized constant; one can assign an initialized constant to make it valid | |
operator double () const | |
convert to a double | |
operator std::vector< double > () const | |
convert to a std::vector<double> | |
operator std::vector< int > () const | |
convert to a std::vector<int> (expensive!) | |
double | operator[] (size_t pos) const |
returns the value on position pos; does not check boundaries! | |
size_t | size () const |
the size of the array of values | |
double | value () const |
return the first stored value; does not check boundaries! | |
const value_type & | values () const |
the stored values | |
value_type::const_iterator | vectorBegin () const |
read-only iterator pointing to the begin of the stored values | |
value_type::const_iterator | vectorEnd () const |
read-only iterator poining one place after the stored values |
Definition at line 17 of file DDVector.h.
typedef std::vector<double>::size_type DDVector::size_t |
typedef std::vector<double> DDVector::value_type |
iterator for read-only acces to stored values
value type of the managed object
Definition at line 28 of file DDVector.h.
DDVector::DDVector | ( | ) |
an uninitialized constant; one can assign an initialized constant to make it valid
Definition at line 9 of file DDVector.cc.
00009 : DDBase<DDName,std::vector<double>*>() { }
DDVector::DDVector | ( | const DDName & | name | ) |
a refenrence to a constant
Definition at line 12 of file DDVector.cc.
References DDI::Singleton< I >::instance(), and DDBase< DDName, std::vector< double > * >::prep_.
00012 : DDBase<DDName,std::vector<double>*>() 00013 { 00014 prep_ = StoreT::instance().create(name); 00015 }
DDVector::DDVector | ( | const DDName & | name, | |
std::vector< double > * | 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 DDVector.cc.
References DDI::Singleton< I >::instance(), and DDBase< DDName, std::vector< double > * >::prep_.
00018 { 00019 prep_ = StoreT::instance().create(name,vals); 00020 }
DDVector::operator double | ( | ) | const [inline] |
convert to a double
Definition at line 58 of file DDVector.h.
References DDBase< DDName, std::vector< double > * >::rep().
00058 { return rep()[0]; }
DDVector::operator std::vector< double > | ( | ) | const [inline] |
convert to a std::vector<double>
Definition at line 61 of file DDVector.h.
References DDBase< DDName, std::vector< double > * >::rep().
00061 { return rep(); }
DDVector::operator std::vector< int > | ( | ) | const |
convert to a std::vector<int> (expensive!)
Definition at line 44 of file DDVector.cc.
References DDBase< DDName, std::vector< double > * >::begin(), DDBase< DDName, std::vector< double > * >::end(), int, it, DDBase< DDName, std::vector< double > * >::rep(), HLT_VtxMuL3::result, and size().
00045 { 00046 std::vector<int> result(rep().size()); 00047 std::vector<int>::size_type sz=0; 00048 std::vector<double>::const_iterator it(rep().begin()), ed(rep().end()); 00049 for (; it != ed; ++it) { 00050 result[sz] = int(*it); 00051 ++sz; 00052 } 00053 return result; 00054 }
double DDVector::operator[] | ( | size_t | pos | ) | const [inline] |
returns the value on position pos; does not check boundaries!
Definition at line 46 of file DDVector.h.
References DDBase< DDName, std::vector< double > * >::rep().
00046 { return rep()[pos]; }
the size of the array of values
Definition at line 40 of file DDVector.h.
References DDBase< DDName, std::vector< double > * >::rep().
Referenced by operator std::vector< int >(), and operator<<().
00040 { return rep().size(); }
double DDVector::value | ( | ) | const [inline] |
return the first stored value; does not check boundaries!
Definition at line 49 of file DDVector.h.
References DDBase< DDName, std::vector< double > * >::rep().
00049 { return rep()[0]; }
const value_type& DDVector::values | ( | ) | const [inline] |
the stored values
Definition at line 43 of file DDVector.h.
References DDBase< DDName, std::vector< double > * >::rep().
Referenced by operator<<().
00043 { return rep(); }
value_type::const_iterator DDVector::vectorBegin | ( | ) | const [inline] |
read-only iterator pointing to the begin of the stored values
Definition at line 52 of file DDVector.h.
References DDBase< DDName, std::vector< double > * >::rep().
00052 { return rep().begin(); }
value_type::const_iterator DDVector::vectorEnd | ( | ) | const [inline] |
read-only iterator poining one place after the stored values
Definition at line 55 of file DDVector.h.
References DDBase< DDName, std::vector< double > * >::rep().
00055 { return rep().end(); }