87 typedef std::map<Key, Value>
Map1;
111 const Key key =
Key( gauss2() );
112 const Value value1 =
Value(
int( 100 * gauss() ) ) / 100.0;
115 <<
" " <<
toString(
m_map1.insert( std::make_pair( key, value1 ) ).second ) <<
" "
116 <<
toString(
m_map2.insert( std::make_pair( key, value1 ) ).second ) <<
" "
117 <<
toString(
m_map3.insert( std::make_pair( key, value1 ) ).second ) <<
" "
139 const Value value2 = gauss();
142 <<
" " <<
toString(
m_map1.insert( std::make_pair( key, value2 ) ).second ) <<
" "
143 <<
toString(
m_map2.insert( std::make_pair( key, value2 ) ).second ) <<
" "
144 <<
toString(
m_map3.insert( std::make_pair( key, value2 ) ).second ) <<
" "
152 if ( 0 == ::labs( key ) % 2 ) {
163 always() <<
" Count key 0 : "
164 <<
" " <<
m_map1.count( 0 ) <<
" " <<
m_map2.count( 0 ) <<
" " <<
m_map3.count( 0 ) <<
" "
166 always() <<
" Count key 1 : "
167 <<
" " <<
m_map1.count( 1 ) <<
" " <<
m_map2.count( 1 ) <<
" " <<
m_map3.count( 1 ) <<
" "
169 always() <<
" Count key 7 : "
170 <<
" " <<
m_map1.count( 7 ) <<
" " <<
m_map2.count( 7 ) <<
" " <<
m_map3.count( 7 ) <<
" "
172 always() <<
" Count key -100 : "
173 <<
" " <<
m_map1.count( -100 ) <<
" " <<
m_map2.count( -100 ) <<
" " <<
m_map3.count( -100 ) <<
" "
181 <<
" map2['" << key <<
"']: " <<
m_map2[key] <<
", map3['" << key <<
"']: " <<
m_map3[key] <<
", map4['"
186 always() <<
" NON-CONST: "
187 <<
" map1['" << key <<
"']: " <<
m_map1[key] <<
", map2['" << key <<
"']: " <<
m_map2[key] <<
", map3['"
188 << key <<
"']: " <<
m_map3[key] <<
", map4['" << key <<
"']: " <<
m_map4[key] <<
endmsg;
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
#define DECLARE_COMPONENT(type)
implementation of various functions for streaming.
MsgStream & always() const
shortcut for the method msgStream(MSG::ALWAYS)
Algorithm(std::string name, ISvcLocator *svcloc, std::string version=PACKAGE_VERSION)
Constructor.
StatusCode finalize() override
the default (empty) implementation of IStateful::finalize() method
SmartIF< IRndmGenSvc > & randSvc() const
The standard RandomGen service, Return a pointer to the service if present.
Common class providing an architecture-independent hash map.
Extension of the STL map.
A bit modified version of 'Loki::AssocVector' associative vector from Loki library by Andrei Alexandr...
Simple algorithm which shows various "map-like" containers available in Gaudi.
void print2(Key key)
non-const printout
void print1(Key key) const
const-printout
StatusCode execute() override
the main execution method
MapAlg & operator=(const MapAlg &)=delete
The assignement is disabled.
StatusCode finalize() override
finalization
GaudiUtils::VectorMap< Key, Value > Map2
GaudiUtils::Map< Key, Value > Map3
std::map< Key, Value > Map1
MapAlg(const MapAlg &)=delete
The copy constructor is disabled.
GaudiUtils::HashMap< Key, Value > Map4
Parameters for the Gauss random number generation.
Random number accessor This small class encapsulates the use of the random number generator.
This class is used for returning status codes from appropriate routines.
constexpr static const auto SUCCESS
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.