Classes | |
class | AlgContext |
Helper "sentry" class to automatize the safe register/unregister the algorithm's context. More... | |
Functions | |
bool | hasProperty (const IProperty *p, const std::string &name) |
simple function which check the existence of the property with the given name. | |
bool | hasProperty (const IInterface *p, const std::string &name) |
simple function which check the existence of the property with the given name. | |
Property * | getProperty (const IProperty *p, const std::string &name) |
simple function which gets the property with given name from the component | |
Property * | getProperty (const IInterface *p, const std::string &name) |
simple function which gets the property with given name from the component | |
bool | hasProperty (const std::vector< const Property * > *p, const std::string &name) |
check the property by name from the list of the properties | |
const Property * | getProperty (const std::vector< const Property * > *p, const std::string &name) |
get the property by name from the list of the properties | |
template<class TYPE> | |
StatusCode | setProperty (IProperty *component, const std::string &name, const TYPE &value, const std::string &doc) |
simple function to set the property of the given object from the value | |
template<class TYPE> | |
StatusCode | setProperty (IProperty *component, const std::string &name, const TYPE &value) |
simple function to set the property of the given object from the value | |
StatusCode | setProperty (IProperty *component, const std::string &name, const std::string &value, const std::string &doc="") |
the full specialization of the previous method setProperty( IProperty, std::string, const TYPE&) for standard strings | |
StatusCode | setProperty (IProperty *component, const std::string &name, const char *value, const std::string &doc="") |
the full specialization of the method setProperty( IProperty, std::string, const TYPE&) for C-strings | |
template<unsigned N> | |
StatusCode | setProperty (IProperty *component, const std::string &name, const char(&value)[N], const std::string &doc="") |
the full specialization of the method setProperty( IProperty, std::string, const TYPE&) for C-arrays | |
StatusCode | setProperty (IProperty *component, const std::string &name, const Property *property, const std::string &doc="") |
simple function to set the property of the given object from another property | |
StatusCode | setProperty (IProperty *component, const std::string &name, const Property &property, const std::string &doc="") |
simple function to set the property of the given object from another property | |
template<class TYPE> | |
StatusCode | setProperty (IProperty *component, const std::string &name, const SimpleProperty< TYPE > &value, const std::string &doc="") |
simple function to set the property of the given object from another property | |
template<class TYPE> | |
StatusCode | setProperty (IInterface *component, const std::string &name, const TYPE &value, const std::string &doc="") |
simple function to set the property of the given object from the value | |
StatusCode | setProperty (IInterface *component, const std::string &name, const std::string &value, const std::string &doc="") |
the full specialization of the method setProperty( IInterface , std::string, const TYPE&) for standard strings | |
StatusCode | setProperty (IInterface *component, const std::string &name, const char *value, const std::string &doc="") |
the full specialization of the method setProperty( IInterface , std::string, const TYPE&) for C-strings | |
template<unsigned N> | |
StatusCode | setProperty (IInterface *component, const std::string &name, const char(&value)[N], const std::string &doc="") |
the full specialization of the method setProperty( IInterface, std::string, const TYPE&) for C-arrays | |
StatusCode | setProperty (IInterface *component, const std::string &name, const Property *property, const std::string &doc="") |
simple function to set the property of the given object from another property | |
StatusCode | setProperty (IInterface *component, const std::string &name, const Property &property, const std::string &doc="") |
simple function to set the property of the given object from another property | |
template<class TYPE> | |
StatusCode | setProperty (IInterface *component, const std::string &name, const SimpleProperty< TYPE > &value, const std::string &doc="") |
simple function to set the property of the given object from another property | |
std::string | formatAsTableRow (const StatEntity &counter, const bool flag, const std::string &format1=" |%|7d| |%|11.7g| |%|#11.5g| |%|#10.5g| |%|#10.5g| |%|#10.5g| |", const std::string &format2="*|%|7d| |%|11.5g| |(%|#9.7g| +- %|-#8.6g|)%%| ----- | ----- |") |
print the counter in a form of the table row | |
std::string | formatAsTableRow (const std::string &name, const StatEntity &counter, const bool flag=true, const std::string &format1=" %|-15.15s|%|17t||%|7d| |%|11.7g| |%|#11.5g| |%|#10.5g| |%|#10.5g| |%|#10.5g| |", const std::string &format2="*%|-15.15s|%|17t||%|7d| |%|11.5g| |(%|#9.7g| +- %|-#8.6g|)%%| ----- | ----- |") |
print the counter in a form of the table row | |
std::string | formatAsTableRow (const std::string &name, const std::string &group, const StatEntity &entity, const bool flag=true, const std::string &format1=" %|15.15s|%|-15.15s|%|32t||%|7d| |%|11.7g| |%|#11.5g| |%|#10.5g| |%|#10.5g| |%|#10.5g| |", const std::string &format2="*%|15.15s|%|-15.15s|%|32t||%|7d| |%|11.5g| |(%|#9.7g| +- %|-#8.6g|)%%| ----- | ----- |") |
print the counter in a form of the table row | |
template<class TYPE> | |
std::ostream & | toStream (const TYPE &obj, std::ostream &s) |
the generic implementation of the printout to the std::ostream | |
std::ostream & | toStream (const std::string &obj, std::ostream &s) |
the printtout of the strings. | |
std::ostream & | toStream (const bool obj, std::ostream &s) |
the printout of boolean values "a'la Python" | |
std::ostream & | toStream (const float obj, std::ostream &s) |
the printout of float values with the reasonable precision | |
std::ostream & | toStream (const double obj, std::ostream &s) |
the printout of double values with the reasonable precision | |
std::ostream & | toStream (const long double obj, std::ostream &s) |
the printout of long double values with the reasonable precision | |
template<class KTYPE, class VTYPE> | |
std::ostream & | toStream (const std::pair< KTYPE, VTYPE > &obj, std::ostream &s) |
the partial template specialization of std::pair<KTYPE,VTYPE> printout the pair is printed a'la Python tuple: " ( a , b )" | |
template<class TYPE, class ALLOCATOR> | |
std::ostream & | toStream (const std::vector< TYPE, ALLOCATOR > &obj, std::ostream &s) |
the partial template specialization of std::vector<TYPE,ALLOCATOR> printout. | |
template<class TYPE, class ALLOCATOR> | |
std::ostream & | toStream (const std::list< TYPE, ALLOCATOR > &obj, std::ostream &s) |
the partial template specialization of std::list<TYPE,ALLOCATOR> printout. | |
template<class TYPE, class CMP, class ALLOCATOR> | |
std::ostream & | toStream (const std::set< TYPE, CMP, ALLOCATOR > &obj, std::ostream &s) |
the partial template specialization of std::set<TYPE,CMP,ALLOCATOR> printout. | |
template<class KTYPE, class VTYPE, class CMP, class ALLOCATOR> | |
std::ostream & | toStream (const std::map< KTYPE, VTYPE, CMP, ALLOCATOR > &obj, std::ostream &s) |
the partial template specialization of std::map<KTYPE,VTYPE,CMP,ALLOCATOR> printout the map is printed a'la Python dict: " ( a : b , c: d , e : f )" | |
template<class KTYPE, class VTYPE, class CMP, class ALLOCATOR> | |
std::ostream & | toStream (const GaudiUtils::VectorMap< KTYPE, VTYPE, CMP, ALLOCATOR > &obj, std::ostream &s) |
the partial template specialization of GaudiUtils::VectorMap<KTYPE,VTYPE,CMP,ALLOCATOR> printout the map is printed a'la Python dict: " ( a : b , c: d , e : f )" | |
template<class KTYPE, class VTYPE, class MAP> | |
std::ostream & | toStream (const GaudiUtils::Map< KTYPE, VTYPE, MAP > &obj, std::ostream &s) |
the partial template specialization of GaudiUtils::Map<KTYPE,VTYPE,MAP> printout the map is printed a'la Python dict: " ( a : b , c: d , e : f )" | |
template<class KTYPE, class VTYPE, class HASH, class MAP> | |
std::ostream & | toStream (const GaudiUtils::HashMap< KTYPE, VTYPE, HASH, MAP > &obj, std::ostream &s) |
the partial template specialization of GaudiUtils::HashMap<KTYPE,VTYPE,HASH,MAP> printout the map is printed a'la Python dict: " ( a : b , c: d , e : f )" | |
template<class TYPE> | |
std::string | toString (const TYPE &obj) |
the generic implementation of the type conversion to the string |
bool Gaudi::Utils::hasProperty | ( | const IProperty * | p, | |
const std::string & | name | |||
) |
simple function which check the existence of the property with the given name.
const IProperty* p = ... ; const bool = hasProperty( p , "Context" ) ;
p | pointer to IProperty object | |
name | property name (case insensitive) |
bool Gaudi::Utils::hasProperty | ( | const IInterface * | p, | |
const std::string & | name | |||
) |
simple function which check the existence of the property with the given name.
IInterface* p = . const bool = hasProperty( p , "Context" ) ;
p | pointer to IInterface object (any component) | |
name | property name (case insensitive) |
simple function which gets the property with given name from the component
const IProperty* p = ... ; const Property* pro = getProperty( p , "Context" ) ;
p | pointer to IProperty object | |
name | property name (case insensitive) |
Property* Gaudi::Utils::getProperty | ( | const IInterface * | p, | |
const std::string & | name | |||
) |
simple function which gets the property with given name from the component
const IInterface* p = ... ; const Property* pro = getProperty( p , "Context" ) ;
p | pointer to IInterface object | |
name | property name (case insensitive) |
bool Gaudi::Utils::hasProperty | ( | const std::vector< const Property * > * | p, | |
const std::string & | name | |||
) |
check the property by name from the list of the properties
IJobOptionsSvc* svc = ... ; const std::string client = ... ; // get the property: bool context = hasProperty ( svc->getProperties( client ) , "Context" )
p | list of properties | |
name | property name (case insensitive) |
const Property* Gaudi::Utils::getProperty | ( | const std::vector< const Property * > * | p, | |
const std::string & | name | |||
) |
get the property by name from the list of the properties
IJobOptionsSvc* svc = ... ; const std::string client = ... ; // get the property: const Property* context = getProperty ( svc->getProperties( client ) , "Context" )
p | list of properties | |
name | property name (case insensitive) |
StatusCode Gaudi::Utils::setProperty | ( | IProperty * | component, | |
const std::string & | name, | |||
const TYPE & | value, | |||
const std::string & | doc | |||
) |
simple function to set the property of the given object from the value
IProperty* component = ... ; std::vector<double> data = ... ; StatusCode sc = setProperty ( componet , "Data" , data ) ;
Note: the interface IProperty allows setting of the properties either directly from other properties or from strings only
component | component which needs to be configured | |
name | name of the property | |
value | value of the property | |
doc | the new documentation string |
Definition at line 1156 of file Property.h.
01160 { 01161 if ( 0 == component ) { return StatusCode::FAILURE ; } // RETURN 01162 if ( !hasProperty ( component , name ) ) { return StatusCode::FAILURE ; } 01163 const std::string val = Gaudi::Utils::toString ( value ) ; 01164 return Gaudi::Utils::setProperty ( component , name , val , doc ) ; 01165 }
StatusCode Gaudi::Utils::setProperty | ( | IProperty * | component, | |
const std::string & | name, | |||
const TYPE & | value | |||
) |
simple function to set the property of the given object from the value
IProperty* component = ... ; std::vector<double> data = ... ; StatusCode sc = setProperty ( componet , "Data" , data ) ;
Note: the interface IProperty allows setting of the properties either directly from other properties or from strings only
component | component which needs to be configured | |
name | name of the property | |
value | value of the property |
Definition at line 1056 of file Property.h.
01059 { return setProperty ( component , name , value , std::string() ) ; }
StatusCode Gaudi::Utils::setProperty | ( | IProperty * | component, | |
const std::string & | name, | |||
const std::string & | value, | |||
const std::string & | doc = "" | |||
) |
the full specialization of the previous method setProperty( IProperty, std::string, const TYPE&) for standard strings
component | component which needs to be configured | |
name | name of the property | |
value | value of the property | |
doc | the new documentation string |
StatusCode Gaudi::Utils::setProperty | ( | IProperty * | component, | |
const std::string & | name, | |||
const char * | value, | |||
const std::string & | doc = "" | |||
) |
the full specialization of the method setProperty( IProperty, std::string, const TYPE&) for C-strings
component | component which needs to be configured | |
name | name of the property | |
value | value of the property | |
doc | the new documentation string |
StatusCode Gaudi::Utils::setProperty | ( | IProperty * | component, | |
const std::string & | name, | |||
const char & | value[N], | |||
const std::string & | doc = "" | |||
) |
the full specialization of the method setProperty( IProperty, std::string, const TYPE&) for C-arrays
component | component which needs to be configured | |
name | name of the property | |
value | value of the property | |
doc | the new documentation string |
Definition at line 1114 of file Property.h.
01118 { 01119 if ( 0 == component ) { return StatusCode::FAILURE ; } 01120 const std::string val = std::string ( value , value + N ) ; 01121 return setProperty ( component , name , val , doc ) ; 01122 }
StatusCode Gaudi::Utils::setProperty | ( | IProperty * | component, | |
const std::string & | name, | |||
const Property * | property, | |||
const std::string & | doc = "" | |||
) |
simple function to set the property of the given object from another property
IProperty* component = ... ; const Property* prop = ... ; StatusCode sc = setProperty ( component , "Data" , prop ) ;
component | component which needs to be configured | |
name | name of the property | |
property | the property | |
doc | the new documentation string |
StatusCode Gaudi::Utils::setProperty | ( | IProperty * | component, | |
const std::string & | name, | |||
const Property & | property, | |||
const std::string & | doc = "" | |||
) |
simple function to set the property of the given object from another property
IProperty* component = ... ; const Property& prop = ... ; StatusCode sc = setProperty ( component , "Data" , prop ) ;
component | component which needs to be configured | |
name | name of the property | |
property | the property | |
doc | the new documentation string |
StatusCode Gaudi::Utils::setProperty | ( | IProperty * | component, | |
const std::string & | name, | |||
const SimpleProperty< TYPE > & | value, | |||
const std::string & | doc = "" | |||
) |
simple function to set the property of the given object from another property
IProperty* component = ... ; SimpleProperty<std::vector<int> > m_data = ... ; StatusCode sc = setProperty ( component , "Data" , prop ) ;
component | component which needs to be configured | |
name | name of the property | |
value | the property | |
doc | the new documentation string |
Definition at line 1248 of file Property.h.
01252 { 01253 const Property* property = &value ; 01254 return setProperty ( component , name , property , doc ) ; 01255 }
StatusCode Gaudi::Utils::setProperty | ( | IInterface * | component, | |
const std::string & | name, | |||
const TYPE & | value, | |||
const std::string & | doc = "" | |||
) |
simple function to set the property of the given object from the value
IInterface* component = ... ; std::vector<double> data = ... ; StatusCode sc = setProperty ( component , "Data" , data ) ;
component | component which needs to be configured | |
name | name of the property | |
value | value of the property | |
doc | the new documentation string |
Definition at line 1279 of file Property.h.
01283 { 01284 if ( 0 == component ) { return StatusCode::FAILURE ; } 01285 SmartIF<IProperty> property ( component ) ; 01286 if ( !property ) { return StatusCode::FAILURE ; } 01287 return setProperty ( property , name , value , doc ) ; 01288 }
StatusCode Gaudi::Utils::setProperty | ( | IInterface * | component, | |
const std::string & | name, | |||
const std::string & | value, | |||
const std::string & | doc = "" | |||
) |
the full specialization of the method setProperty( IInterface , std::string, const TYPE&) for standard strings
component | component which needs to be configured | |
name | name of the property | |
value | value of the property | |
doc | the new documentation string |
StatusCode Gaudi::Utils::setProperty | ( | IInterface * | component, | |
const std::string & | name, | |||
const char * | value, | |||
const std::string & | doc = "" | |||
) |
the full specialization of the method setProperty( IInterface , std::string, const TYPE&) for C-strings
component | component which needs to be configured | |
name | name of the property | |
value | value of the property | |
doc | the new documentation string |
StatusCode Gaudi::Utils::setProperty | ( | IInterface * | component, | |
const std::string & | name, | |||
const char & | value[N], | |||
const std::string & | doc = "" | |||
) |
the full specialization of the method setProperty( IInterface, std::string, const TYPE&) for C-arrays
component | component which needs to be configured | |
name | name of the property | |
value | value of the property | |
doc | the new documentation string |
Definition at line 1341 of file Property.h.
01345 { 01346 if ( 0 == component ) { return StatusCode::FAILURE ; } 01347 const std::string val = std::string ( value , value + N ) ; 01348 return setProperty ( component , name , val , doc ) ; 01349 }
StatusCode Gaudi::Utils::setProperty | ( | IInterface * | component, | |
const std::string & | name, | |||
const Property * | property, | |||
const std::string & | doc = "" | |||
) |
simple function to set the property of the given object from another property
IInterface* component = ... ; const Property* prop = ... ; StatusCode sc = setProperty ( component , "Data" , prop ) ;
component | component which needs to be configured | |
name | name of the property | |
property | the property | |
doc | the new documentation string |
StatusCode Gaudi::Utils::setProperty | ( | IInterface * | component, | |
const std::string & | name, | |||
const Property & | property, | |||
const std::string & | doc = "" | |||
) |
simple function to set the property of the given object from another property
IInterface* component = ... ; const Property& prop = ... ; StatusCode sc = setProperty ( component , "Data" , prop ) ;
component | component which needs to be configured | |
name | name of the property | |
property | the property | |
doc | the new documentation string |
StatusCode Gaudi::Utils::setProperty | ( | IInterface * | component, | |
const std::string & | name, | |||
const SimpleProperty< TYPE > & | value, | |||
const std::string & | doc = "" | |||
) |
simple function to set the property of the given object from another property
IInterface* component = ... ; SimpleProperty<std::vector<int> > m_data = ... ; StatusCode sc = setProperty ( component , "Data" , prop ) ;
component | component which needs to be configured | |
name | name of the property | |
value | the property | |
doc | the new documentation string |
Definition at line 1432 of file Property.h.
01436 { 01437 const Property* property = &value ; 01438 return setProperty ( component , name , property , doc ) ; 01439 }
std::string Gaudi::Utils::formatAsTableRow | ( | const StatEntity & | counter, | |
const bool | flag, | |||
const std::string & | format1 = " |%|7d| |%|11.7g| |%|#11.5g| |%|#10.5g| |%|#10.5g| |%|#10.5g| |" , |
|||
const std::string & | format2 = "*|%|7d| |%|11.5g| |(%|#9.7g| +- %|-#8.6g|)%%| ----- | ----- |" | |||
) |
print the counter in a form of the table row
// loop over counters: for ( ... ) { const StatEntity& counter = ... ; info() << formatAsTableRow( counter , true ) << endreq ; }
The regular counter is printed as 6 fields
The printout is performed according to the format, described in optional "format1" parameter using Boost Format Library. The incredible flexibility of Boost Format Library allows to customize the overall layout of the table form minor change the format of individual columns to the overal reshuffling of the reformatted columns
If the parameter "flag" is set to true
, AND the content of the counter allows the interpretation of the counter as binomial efficiency counter, the printout is performed in a form of 4 numbers:
The printout is performed according to format, specifed by parameter "format2"
name | the name associated with the counter | |
counter | counter to be printed | |
flag | use the special format for "efficiency" rows | |
format1 | row format for the regular rows | |
format2 | special row format for the "efficiency" rows |
std::string Gaudi::Utils::formatAsTableRow | ( | const std::string & | name, | |
const StatEntity & | counter, | |||
const bool | flag = true , |
|||
const std::string & | format1 = " %|-15.15s|%|17t||%|7d| |%|11.7g| |%|#11.5g| |%|#10.5g| |%|#10.5g| |%|#10.5g| |" , |
|||
const std::string & | format2 = "*%|-15.15s|%|17t||%|7d| |%|11.5g| |(%|#9.7g| +- %|-#8.6g|)%%| ----- | ----- |" | |||
) |
print the counter in a form of the table row
std::string header = " Counter | # | sum |" ; header += " mean/eff^* | rms/err^* | min | max |" ; info() << header << endreq ; // loop over counters: for ( ... ) { const std::string& name = ... ; const StatEntity& counter = ... ; info() << formatAsTableRow( name , counter ) << endreq ; }
The table row for the regular counter is printed as 7 fields
The printout is performed according to the format, described in optional "format1" parameter using Boost Format Library. The incredible flexibility of Boost Format Library allows to customize the overall layout of the table form minor change the format of individual columns to the overal reshuffling of the reformatted columns
If the parameter "flag" is set to true
AND the counter name, converted to the lowercase constains one of the substrings: "eff","acc","fltr","filt","pass" AND (of course) the content of the counter allows the interpretation of the counter as the binomial efficiency counter, the printout is performed using 5 fields ("binomial efficiency format")
The printout is performed according to format, specifed by parameter "format2"
name | the name associated with the counter | |
counter | counter to be printed | |
flag | use the special format for "efficiency" rows | |
format1 | row format for the regular rows | |
format2 | special row format for the "efficiency" rows |
std::string Gaudi::Utils::formatAsTableRow | ( | const std::string & | name, | |
const std::string & | group, | |||
const StatEntity & | entity, | |||
const bool | flag = true , |
|||
const std::string & | format1 = " %|15.15s|%|-15.15s|%|32t||%|7d| |%|11.7g| |%|#11.5g| |%|#10.5g| |%|#10.5g| |%|#10.5g| |" , |
|||
const std::string & | format2 = "*%|15.15s|%|-15.15s|%|32t||%|7d| |%|11.5g| |(%|#9.7g| +- %|-#8.6g|)%%| ----- | ----- |" | |||
) |
print the counter in a form of the table row
std::string header = " Counter :: Group | # |"; header += " sum | mean/eff^* | rms/err^* | min |"; header += " max |") ; info() << header << endreq ; // loop over counters: for ( ... ) { const std::string& name = ... ; const std::string& group = .. ; const StatEntity& counter = ... ; info() << formatAsTableRow ( name , group , counter ) << endreq ; }
The table row for the regular counter is printed as 8 fields
The printout is performed according to the format, described in optional "format1" parameter using Boost Format Library. The incredible flexibility of Boost Format Library allows to customize the overall layout of the table form minor change the format of individual columns to the overal reshuffling of the reformatted columns
If the parameter "flag" is set to true
AND either the counter name or counter group, converted to the lowercase contains one of the substrings: "eff","acc","fltr","filt","pass" AND (of course) the content of the counter allows the interpretation of the counter as the binomial efficiency counter, the printout is performed using 6 fields ("binomial efficiency format")
The printout is performed according to format, specifed by parameter "format2"
name | the name associated with the counter | |
group | the group associated with the counter | |
counter | counter to be printed | |
flag | use the special format for "efficiency" rows | |
format1 | row format for the regular rows | |
format2 | the special row format for the "efficiency" rows |
std::ostream & Gaudi::Utils::toStream | ( | const TYPE & | obj, | |
std::ostream & | s | |||
) | [inline] |
the generic implementation of the printout to the std::ostream
Vanya BELYAEV ibelyaev@physics.syr.edu
Definition at line 276 of file ToStream.h.
00277 { return s << obj ; }
std::ostream& Gaudi::Utils::toStream | ( | const std::string & | obj, | |
std::ostream & | s | |||
) | [inline] |
the printtout of the strings.
the string is printed a'la Python using the quotes
Vanya BELYAEV ibelyaev@physics.syr.edu
Definition at line 50 of file ToStream.h.
00051 { 00052 if ( std::string::npos == obj.find('\'') ) 00053 { s << "\'" << obj << "\'" ; } 00054 else 00055 { s << "\"" << obj << "\"" ; } 00056 return s ; 00057 }
std::ostream& Gaudi::Utils::toStream | ( | const bool | obj, | |
std::ostream & | s | |||
) | [inline] |
the printout of boolean values "a'la Python"
Definition at line 63 of file ToStream.h.
00064 { return s << ( obj ? "True" : "False" ) ; }
std::ostream& Gaudi::Utils::toStream | ( | const float | obj, | |
std::ostream & | s | |||
) | [inline] |
the printout of float values with the reasonable precision
Definition at line 70 of file ToStream.h.
00071 { 00072 const int p = s.precision() ; 00073 return s << std::setprecision ( 6 ) << obj << std::setprecision ( p ) ; 00074 }
std::ostream& Gaudi::Utils::toStream | ( | const double | obj, | |
std::ostream & | s | |||
) | [inline] |
the printout of double values with the reasonable precision
Definition at line 80 of file ToStream.h.
00081 { 00082 const int p = s.precision() ; 00083 return s << std::setprecision ( 8 ) << obj << std::setprecision ( p ) ; 00084 }
std::ostream& Gaudi::Utils::toStream | ( | const long double | obj, | |
std::ostream & | s | |||
) | [inline] |
the printout of long double values with the reasonable precision
Definition at line 90 of file ToStream.h.
00091 { 00092 const int p = s.precision() ; 00093 return s << std::setprecision ( 10 ) << obj << std::setprecision ( p ) ; 00094 }
std::ostream& Gaudi::Utils::toStream | ( | const std::pair< KTYPE, VTYPE > & | obj, | |
std::ostream & | s | |||
) | [inline] |
the partial template specialization of std::pair<KTYPE,VTYPE>
printout the pair is printed a'la Python tuple: " ( a , b )"
Vanya BELYAEV ibelyaev@physics.syr.edu
Definition at line 105 of file ToStream.h.
00106 { 00107 s << "( " ; 00108 toStream ( obj.first , s ) ; 00109 s << " , " ; 00110 toStream ( obj.second , s ) ; 00111 return s << " )" ; 00112 }
std::ostream& Gaudi::Utils::toStream | ( | const std::vector< TYPE, ALLOCATOR > & | obj, | |
std::ostream & | s | |||
) | [inline] |
the partial template specialization of std::vector<TYPE,ALLOCATOR>
printout.
The vector is printed a'la Python list: "[ a, b, c ]"
Vanya BELYAEV ibelyaev@physics.syr.edu
Definition at line 122 of file ToStream.h.
00123 { 00124 s << "[ "; 00125 for ( typename std::vector<TYPE,ALLOCATOR>::const_iterator cur = obj.begin() ; 00126 obj.end() != cur ; ++cur ) 00127 { 00128 if ( obj.begin() != cur ) { s << " , "; } 00129 toStream ( *cur , s ) ; 00130 } 00131 return s << " ]"; 00132 }
std::ostream& Gaudi::Utils::toStream | ( | const std::list< TYPE, ALLOCATOR > & | obj, | |
std::ostream & | s | |||
) | [inline] |
the partial template specialization of std::list<TYPE,ALLOCATOR>
printout.
The vector is printed a'la Python list: "[ a, b, c ]"
Vanya BELYAEV ibelyaev@physics.syr.edu
Definition at line 142 of file ToStream.h.
00143 { 00144 s << "[ "; 00145 for ( typename std::list<TYPE,ALLOCATOR>::const_iterator cur = obj.begin() ; 00146 obj.end() != cur ; ++cur ) 00147 { 00148 if ( obj.begin() != cur ) { s << " , "; } 00149 toStream ( *cur , s ) ; 00150 } 00151 return s << " ]"; 00152 }
std::ostream& Gaudi::Utils::toStream | ( | const std::set< TYPE, CMP, ALLOCATOR > & | obj, | |
std::ostream & | s | |||
) | [inline] |
the partial template specialization of std::set<TYPE,CMP,ALLOCATOR>
printout.
The vector is printed a'la Python list: "[ a, b, c ]"
Vanya BELYAEV ibelyaev@physics.syr.edu
Definition at line 162 of file ToStream.h.
00163 { 00164 s << "[ "; 00165 for ( typename std::set<TYPE,CMP,ALLOCATOR>::const_iterator cur = obj.begin() ; 00166 obj.end() != cur ; ++cur ) 00167 { 00168 if ( obj.begin() != cur ) { s << " , "; } 00169 toStream ( *cur , s ) ; 00170 } 00171 return s << " ]"; 00172 }
std::ostream& Gaudi::Utils::toStream | ( | const std::map< KTYPE, VTYPE, CMP, ALLOCATOR > & | obj, | |
std::ostream & | s | |||
) | [inline] |
the partial template specialization of std::map<KTYPE,VTYPE,CMP,ALLOCATOR>
printout the map is printed a'la Python dict: " ( a : b , c: d , e : f )"
Vanya BELYAEV ibelyaev@physics.syr.edu
Definition at line 183 of file ToStream.h.
00184 { 00185 s << "{ "; 00186 for ( typename std::map<KTYPE,VTYPE,CMP,ALLOCATOR>::const_iterator cur = 00187 obj.begin() ; obj.end() != cur ; ++cur ) 00188 { 00189 if ( obj.begin() != cur ) { s << " , " ; } 00190 toStream ( cur -> first , s ) ; 00191 s << " : " ; 00192 toStream ( cur -> second , s ) ; 00193 } 00194 return s << " }"; 00195 }
std::ostream& Gaudi::Utils::toStream | ( | const GaudiUtils::VectorMap< KTYPE, VTYPE, CMP, ALLOCATOR > & | obj, | |
std::ostream & | s | |||
) | [inline] |
the partial template specialization of GaudiUtils::VectorMap<KTYPE,VTYPE,CMP,ALLOCATOR>
printout the map is printed a'la Python dict: " ( a : b , c: d , e : f )"
Vanya BELYAEV ibelyaev@physics.syr.edu
Definition at line 207 of file ToStream.h.
00208 { 00209 s << "{ "; 00210 for ( typename GaudiUtils::VectorMap<KTYPE,VTYPE,CMP,ALLOCATOR>::const_iterator cur = obj.begin() ; 00211 obj.end() != cur ; ++cur ) 00212 { 00213 if ( obj.begin() != cur ) { s << " , " ; } 00214 toStream ( cur -> first , s ) ; 00215 s << " : " ; 00216 toStream ( cur -> second , s ) ; 00217 } 00218 return s << " }"; 00219 }
std::ostream& Gaudi::Utils::toStream | ( | const GaudiUtils::Map< KTYPE, VTYPE, MAP > & | obj, | |
std::ostream & | s | |||
) | [inline] |
the partial template specialization of GaudiUtils::Map<KTYPE,VTYPE,MAP>
printout the map is printed a'la Python dict: " ( a : b , c: d , e : f )"
Vanya BELYAEV ibelyaev@physics.syr.edu
Definition at line 231 of file ToStream.h.
00232 { 00233 s << "{ "; 00234 for ( typename GaudiUtils::Map<KTYPE,VTYPE,MAP>::const_iterator cur = obj.begin() ; 00235 obj.end() != cur ; ++cur ) 00236 { 00237 if ( obj.begin() != cur ) { s << " , " ; } 00238 toStream ( cur -> first , s ) ; 00239 s << " : " ; 00240 toStream ( cur -> second , s ) ; 00241 } 00242 return s << " }"; 00243 }
std::ostream& Gaudi::Utils::toStream | ( | const GaudiUtils::HashMap< KTYPE, VTYPE, HASH, MAP > & | obj, | |
std::ostream & | s | |||
) | [inline] |
the partial template specialization of GaudiUtils::HashMap<KTYPE,VTYPE,HASH,MAP>
printout the map is printed a'la Python dict: " ( a : b , c: d , e : f )"
Vanya BELYAEV ibelyaev@physics.syr.edu
Definition at line 255 of file ToStream.h.
00256 { 00257 s << "{ "; 00258 for ( typename GaudiUtils::HashMap<KTYPE,VTYPE,HASH,MAP>::const_iterator cur = obj.begin() ; 00259 obj.end() != cur ; ++cur ) 00260 { 00261 if ( obj.begin() != cur ) { s << " , " ; } 00262 toStream ( cur -> first , s ) ; 00263 s << " : " ; 00264 toStream ( cur -> second , s ) ; 00265 } 00266 return s << " }"; 00267 }
std::string Gaudi::Utils::toString | ( | const TYPE & | obj | ) | [inline] |
the generic implementation of the type conversion to the string
Vanya BELYAEV ibelyaev@physics.syr.edu
Definition at line 288 of file ToStream.h.