All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Gaudi::Utils Namespace Reference

Namespaces

 Histos
 Collection of useful utilities for manipulations with AIDA hisgograms.
 
 RegEx
 RegeEx: nemspace to hold gaudi regular expression checking.
 

Classes

struct  _GetType
 Helper structure to define the proper return type for "get"-functions. More...
 
struct  _GetType< Gaudi::NamedRange_< CONTAINER > >
 the template specialization for "named ranges" More...
 
struct  _GetType< Gaudi::Range_< CONTAINER > >
 the template specialization for "ranges" More...
 
struct  _GetType< TYPE & >
 the template specialization for references More...
 
struct  _GetType< TYPE * >
 the template specialization for pointers More...
 
class  Aida2ROOT
 Accessor to underlying ROOT-representation of transient histograms The actual code is imported from Bender project. More...
 
class  AlgContext
 Helper "sentry" class to automatize the safe register/unregister the algorithm's context. More...
 
class  AlgNameSelector
 The trivial selector of algorithm by type. More...
 
class  AlgSelector
 Simple interface class for selection of algorithms. More...
 
class  AlgTypeSelector
 The trivial selector of algorithm by type. More...
 
class  AlgTypeSelector< const TYPE & >
 
class  AlgTypeSelector< const TYPE * >
 
class  AlgTypeSelector< const TYPE >
 
class  AlgTypeSelector< TYPE & >
 
class  AlgTypeSelector< TYPE * >
 
struct  CheckData
 Helper structure for implementation of "exists"-functions for GaudiCommon<BASE> More...
 
struct  CheckData< const TYPE >
 the template specialization for 'const'-type More...
 
struct  CheckData< Gaudi::NamedRange_< std::vector< const TYPE * > > >
 the template specialization for ranges More...
 
struct  CheckData< Gaudi::Range_< std::vector< const TYPE * > > >
 the template specialization for ranges More...
 
struct  CheckData< TYPE & >
 the template specialization for reference types More...
 
struct  CheckData< TYPE * >
 the template specialization for pointer types More...
 
struct  GetData
 Helper structure for implementation of "get"-functions for GaudiCommon<BASE> More...
 
struct  GetData< const TYPE >
 the template specialization for const types More...
 
struct  GetData< Gaudi::NamedRange_< std::vector< const TYPE * > > >
 the template specialization for named ranges More...
 
struct  GetData< Gaudi::Range_< std::vector< const TYPE * > > >
 the template specialization for ranges More...
 
struct  GetData< TYPE & >
 the template specialization for reference types More...
 
struct  GetData< TYPE * >
 the template specialization for pointer types More...
 
struct  GetOrCreateData
 Helper structure for implementation of "getOrCreate"-functions for GaudiCommon<BASE> More...
 
struct  GetOrCreateData< const TYPE, const TYPE2 >
 
struct  GetOrCreateData< const TYPE, TYPE2 >
 
struct  GetOrCreateData< Gaudi::NamedRange_< std::vector< const TYPE * > >, TYPE2 >
 
struct  GetOrCreateData< Gaudi::Range_< std::vector< const TYPE * > >, TYPE2 >
 
struct  GetOrCreateData< TYPE &, TYPE2 & >
 
struct  GetOrCreateData< TYPE &, TYPE2 >
 
struct  GetOrCreateData< TYPE *, TYPE2 * >
 
struct  GetOrCreateData< TYPE *, TYPE2 >
 
struct  GetOrCreateData< TYPE, const TYPE2 >
 
struct  GetOrCreateData< TYPE, TYPE2 & >
 
struct  GetOrCreateData< TYPE, TYPE2 * >
 
class  HistoStats
 The collection of trivial functions to access the statistical information for the histograms. More...
 
class  LockedChrono
 Helper object, useful for measurement of CPU-performance of highly-recursive structures, e.g. More...
 
class  MapBase
 Helper base-class to allow the generic Python-decoration for all "map-like" classes in Gaudi. More...
 
struct  PropertyTypeTraits
 helper structure to define the types for properties More...
 
struct  PropertyTypeTraits< boost::array< T, N > >
 the specialization of property-traits for class boost::array to take care the non-trivial assignements and constructors for this class More...
 
struct  PropertyTypeTraits< char(&)[N]>
 specialisation for C-strings More...
 
struct  PropertyTypeTraits< const T(&)[N]>
 specialiation for const-arrays More...
 
struct  PropertyTypeTraits< T(&)[N]>
 
struct  PropertyTypeTraits< T[N]>
 specialization for arrays More...
 
class  SignalMonitorSvc
 Implementation of Gaudi::ISignalMonitor. More...
 
class  StopSignalHandler
 Service that stop the processing if a signal is received. More...
 
class  TypeNameString
 Helper class to parse a string of format "type/name". More...
 

Functions

GAUDI_API IAlgorithmgetAlgorithm (const IAlgContextSvc *svc, const AlgSelector &sel)
 simple function to get the algorithm from Context Service More...
 
GAUDI_API IAlgorithmgetAlgorithm (const std::vector< IAlgorithm * > &lst, const AlgSelector &sel)
 simple function to get the algorithm from Context Service More...
 
GAUDI_API GaudiAlgorithmgetGaudiAlg (const IAlgContextSvc *svc)
 simple function to extract the last active GaudiAlgorithm from the context More...
 
GAUDI_API GaudiHistoAlggetHistoAlg (const IAlgContextSvc *svc)
 simple function to extract the last active GaudiHistoAlg from the context More...
 
GAUDI_API GaudiTupleAlggetTupleAlg (const IAlgContextSvc *svc)
 simple function to extract the last active GaudiTupleAlg from the context More...
 
GAUDI_API GaudiSequencergetGaudiSequencer (const IAlgContextSvc *svc)
 simple function to extract the last active GaudiSequencer from the context More...
 
GAUDI_API SequencergetSequencerAlg (const IAlgContextSvc *svc)
 simple function to extract the last active Sequencer from the context More...
 
GAUDI_API IAlgorithmgetSequencer (const IAlgContextSvc *svc)
 simple function to extract the last active "Sequencer" () GaudiSequencer or simple Sequencer) from the context More...
 
template<class TYPE >
_GetType< TYPE >::return_type getFromTS (IDataProviderSvc *service, const std::string &location)
 Helper function to provide the minimal lookup and cast functionality of SmartDataPtr used in the helper classes. More...
 
template<class ITERATOR >
std::ostream & toStream (ITERATOR first,ITERATOR last,std::ostream &s,const std::string &open,const std::string &close,const std::string &delim)
 the helper function to print the sequence More...
 
template<class TYPE , std::size_t N>
std::ostream & toStream (const boost::array< TYPE, N > &obj, std::ostream &s)
 printout of class boost::array The format is "Python's tuple" More...
 
GAUDI_API bool hasProperty (const IProperty *p, const std::string &name)
 simple function which check the existence of the property with the given name. More...
 
GAUDI_API bool hasProperty (const IInterface *p, const std::string &name)
 simple function which check the existence of the property with the given name. More...
 
GAUDI_API PropertygetProperty (const IProperty *p, const std::string &name)
 simple function which gets the property with given name from the component More...
 
GAUDI_API PropertygetProperty (const IInterface *p, const std::string &name)
 simple function which gets the property with given name from the component More...
 
GAUDI_API bool hasProperty (const std::vector< const Property * > *p, const std::string &name)
 check the property by name from the list of the properties More...
 
GAUDI_API const PropertygetProperty (const std::vector< const Property * > *p, const std::string &name)
 get the property by name from the list of the properties More...
 
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 More...
 
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 More...
 
GAUDI_API 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 More...
 
GAUDI_API 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 More...
 
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 More...
 
GAUDI_API 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 More...
 
GAUDI_API 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 More...
 
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 More...
 
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 More...
 
GAUDI_API 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 More...
 
GAUDI_API 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 More...
 
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 More...
 
GAUDI_API 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 More...
 
GAUDI_API 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 More...
 
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 More...
 
GAUDI_API 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 More...
 
GAUDI_API 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 More...
 
GAUDI_API 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 More...
 
GAUDI_API std::ostream & toStream (const Gaudi::StringKey &key, std::ostream &s)
 send the object to stream (needed to use it as property) More...
 
template<class SCALAR >
std::ostream & toStream (const SCALAR &, std::ostream &)
 
template<class SCALAR , unsigned int N>
std::ostream & toStream (const ROOT::Math::SVector< SCALAR, N > &obj, std::ostream &s)
 the general streaming function for SVector using python-tupel format More...
 
template<class TYPE >
std::ostream & toStream (const TYPE &obj, std::ostream &s)
 the generic implementation of the printout to the std::ostream More...
 
std::ostream & toStream (const std::string &obj, std::ostream &s)
 the printtout of the strings. More...
 
std::ostream & toStream (const bool obj, std::ostream &s)
 the printout of boolean values "a'la Python" More...
 
std::ostream & toStream (const float obj, std::ostream &s, const int prec=6)
 the printout of float values with the reasonable precision More...
 
std::ostream & toStream (const double obj, std::ostream &s, const int prec=8)
 the printout of double values with the reasonable precision More...
 
std::ostream & toStream (const long double obj, std::ostream &s, const int prec=10)
 the printout of long double values with the reasonable precision More...
 
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 )" More...
 
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. More...
 
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. More...
 
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. More...
 
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 )" More...
 
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 )" More...
 
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 )" More...
 
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 )" More...
 
template<class TYPE , unsigned int N>
std::ostream & toStream (TYPE(&obj)[N], std::ostream &s)
 the specialization for C-arrays, a'la python tuple More...
 
template<class TYPE , unsigned int N>
std::ostream & toStream (const TYPE(&obj)[N], std::ostream &s)
 the specialization for C-arrays, a'la python tuple More...
 
template<unsigned int N>
std::ostream & toStream (char(&obj)[N], std::ostream &s)
 the specialization for C-string, a'la python tuple More...
 
template<unsigned int N>
std::ostream & toStream (const char(&obj)[N], std::ostream &s)
 the specialization for C-string, a'la python tuple More...
 
std::ostream & toStream (const char *obj, std::ostream &s)
 the specialization for C-string, a'la python tuple More...
 
template<class TYPE >
std::string toString (const TYPE &obj)
 the generic implementation of the type conversion to the string More...
 
std::ostream & operator<< (std::ostream &s, const TypeNameString &tn)
 Output stream operator for TypeNameString instances. More...
 
GAUDI_API std::ostream & toStream (const Gaudi::XYZPoint &obj, std::ostream &s)
 print XYZ point More...
 
GAUDI_API std::ostream & toStream (const Gaudi::XYZVector &obj, std::ostream &s)
 print XYZ vector More...
 
GAUDI_API std::ostream & toStream (const Gaudi::LorentzVector &obj, std::ostream &s)
 print Lorentz vector More...
 
GAUDI_API std::ostream & toStream (const TH1D &histo, std::ostream &stream, const bool asXML=false)
 stream the ROOT histogram into output stream More...
 
GAUDI_API std::ostream & toStream (const TH2D &histo, std::ostream &stream, const bool asXML=false)
 stream the ROOT histogram into output stream More...
 
GAUDI_API std::ostream & toStream (const TH1F &histo, std::ostream &stream, const bool asXML=false)
 stream the ROOT histogram into output stream More...
 
GAUDI_API std::ostream & toStream (const TH2F &histo, std::ostream &stream, const bool asXML=false)
 stream the ROOT histogram into output stream More...
 
GAUDI_API std::ostream & toStream (const AIDA::IHistogram1D &histo, std::ostream &stream, const bool asXML=false)
 stream the AIDA histogram into output stream More...
 
GAUDI_API std::ostream & toStream (const AIDA::IHistogram2D &histo, std::ostream &stream, const bool asXML=false)
 stream the AIDA histogram into output stream More...
 
GAUDI_API std::string toString (const TH1D &histo, const bool asXML=false)
 convert the histogram into the string More...
 
GAUDI_API std::string toString (const TH2D &histo, const bool asXML=false)
 convert the histogram into the string More...
 
GAUDI_API std::string toString (const TH1F &histo, const bool asXML=false)
 convert the histogram into the string More...
 
GAUDI_API std::string toString (const TH2F &histo, const bool asXML=false)
 convert the histogram into the string More...
 
GAUDI_API std::string toString (const AIDA::IHistogram1D &histo, const bool asXML=false)
 convert the histogram into the string More...
 
GAUDI_API std::string toString (const AIDA::IHistogram2D &histo, const bool asXML=false)
 convert the histogram into the string More...
 
GAUDI_API std::string toString (const AIDA::IHistogram1D *histo)
 convert the histogram into the string More...
 
GAUDI_API std::string toString (AIDA::IHistogram1D *histo)
 convert the histogram into the string More...
 
GAUDI_API std::string toString (const TH1D *histo)
 convert the histogram into the string More...
 
GAUDI_API std::string toString (TH1D *histo)
 convert the histogram into the string More...
 
GAUDI_API std::string toString (const TH2D *histo)
 convert the histogram into the string More...
 
GAUDI_API std::string toString (TH2D *histo)
 convert the histogram into the string More...
 

Function Documentation

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 ) << endmsg ;
}

The regular counter is printed as 6 fields

  • number of entries (long)
  • overal sum (double)
  • mean value (double)
  • RMS (double)
  • minimal value (double)
  • maximal value (double)

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 overall 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:

  • number of entries (long)
  • overall sum (double)
  • binomial efficiency [perCent] (double)
  • uncertainty in binomial efficiency [perCent] (double)

The printout is performed according to format, specified by parameter "format2"

See also
http://boost.org/libs/format
Parameters
namethe name associated with the counter
countercounter to be printed
flaguse the special format for "efficiency" rows
format1row format for the regular rows
format2special row format for the "efficiency" rows
Returns
formatted row in the table

Definition at line 302 of file StatEntity.cpp.

306 {
307  using namespace boost::io ;
308  if ( flag && 0 <= counter.eff() && 0 <= counter.effErr() )
309  {
310  boost::format fmt( format2 ) ;
311  fmt.exceptions ( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) ) ;
312  fmt
313  % counter.nEntries ()
314  % counter.sum ()
315  % ( counter.eff () * 100 )
316  % ( counter.effErr () * 100 ) ;
317  return fmt.str() ;
318  }
319  boost::format fmt ( format1 ) ;
320  fmt.exceptions ( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) ) ;
321  fmt
322  % counter.nEntries ()
323  % counter.sum ()
324  % counter.mean ()
325  % counter.rms ()
326  % counter.min ()
327  % counter.max () ;
328  return fmt.str() ;
329 }
double effErr() const
shortcut,
Definition: StatEntity.h:187
const double & max() const
maximal value
Definition: StatEntity.h:110
const unsigned long & nEntries() const
getters
Definition: StatEntity.h:96
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:133
const double & sum() const
accumulated value
Definition: StatEntity.h:98
double eff() const
shortcut,
Definition: StatEntity.h:185
double mean() const
mean value of counter
Definition: StatEntity.cpp:85
const double & min() const
minimal value
Definition: StatEntity.h:108
double rms() const
r.m.s of value
Definition: StatEntity.cpp:95
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 << endmsg ;
// loop over counters:
for ( ... )
{
const std::string& name = ... ;
const StatEntity& counter = ... ;
info() << formatAsTableRow( name , counter ) << endmsg ;
}

The table row for the regular counter is printed as 7 fields

  • counter name (string)
  • number of entries (long)
  • overal sum (double)
  • mean value (double)
  • RMS (double)
  • minimal value (double)
  • maximal value (double)

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 overall reshuffling of the reformatted columns

If the parameter "flag" is set to true AND the counter name, converted to the lowercase constant 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")

  • counter name (string)
  • number of entries (long)
  • overall sum (double)
  • binomial efficiency [perCent] (double)
  • uncertainty in binomial efficiency [perCent] (double)

The printout is performed according to format, specified by parameter "format2"

See also
http://boost.org/libs/format
Parameters
namethe name associated with the counter
countercounter to be printed
flaguse the special format for "efficiency" rows
format1row format for the regular rows
format2special row format for the "efficiency" rows
Returns
formatted row in the table

Definition at line 341 of file StatEntity.cpp.

346 {
347  using namespace boost::io ;
348  if ( flag && effCounter ( name ) && 0 <= counter.eff() && 0 <= counter.effErr() )
349  {
350  boost::format fmt( format2 ) ;
351  fmt.exceptions ( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) ) ;
352  fmt
353  % ( "\"" + name + "\"" )
354  % counter.nEntries ()
355  % counter.sum ()
356  % ( counter.eff () * 100 )
357  % ( counter.effErr () * 100 ) ;
358  return fmt.str() ;
359  }
360  boost::format fmt ( format1 ) ;
361  fmt.exceptions ( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) ) ;
362  fmt
363  % ( "\"" + name + "\"" )
364  % counter.nEntries ()
365  % counter.sum ()
366  % counter.mean ()
367  % counter.rms ()
368  % counter.min ()
369  % counter.max () ;
370  return fmt.str() ;
371 }
double effErr() const
shortcut,
Definition: StatEntity.h:187
const double & max() const
maximal value
Definition: StatEntity.h:110
const unsigned long & nEntries() const
getters
Definition: StatEntity.h:96
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:133
const double & sum() const
accumulated value
Definition: StatEntity.h:98
double eff() const
shortcut,
Definition: StatEntity.h:185
double mean() const
mean value of counter
Definition: StatEntity.cpp:85
const double & min() const
minimal value
Definition: StatEntity.h:108
double rms() const
r.m.s of value
Definition: StatEntity.cpp:95
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 << endmsg ;
// loop over counters:
for ( ... )
{
const std::string& name = ... ;
const std::string& group = .. ;
const StatEntity& counter = ... ;
info() << formatAsTableRow ( name , group , counter ) << endmsg ;
}

The table row for the regular counter is printed as 8 fields

  • counter name (string)
  • counter group (string)
  • number of entries (long)
  • overall sum (double)
  • mean value (double)
  • RMS (double)
  • minimal value (double)
  • maximal value (double)

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 overall 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")

  • counter name (string)
  • counter group (string)
  • number of entries (long)
  • overall sum (double)
  • binomial efficiency [perCent] (double)
  • uncertainty in binomial efficiency [perCent] (double)

The printout is performed according to format, specified by parameter "format2"

See also
http://boost.org/libs/format
Parameters
namethe name associated with the counter
groupthe group associated with the counter
countercounter to be printed
flaguse the special format for "efficiency" rows
format1row format for the regular rows
format2the special row format for the "efficiency" rows
Returns
formatted row in the table

Definition at line 384 of file StatEntity.cpp.

390 {
391  using namespace boost::io ;
392  if ( flag && ( effCounter ( name ) || effCounter ( group ) )
393  && 0 <= counter.eff() && 0 <= counter.effErr() )
394  {
395  boost::format fmt( format2 ) ;
396  fmt.exceptions ( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) ) ;
397  fmt
398  % ( "\"" + name + ":" )
399  % ( ":" + group + "\"" )
400  % counter.nEntries ()
401  % counter.sum ()
402  % ( counter.eff () * 100 )
403  % ( counter.effErr () * 100 ) ;
404  return fmt.str() ;
405  }
406  boost::format fmt ( format1 ) ;
407  fmt.exceptions ( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) ) ;
408  fmt
409  % ( "\"" + name + ":" )
410  % ( ":" + group + "\"" )
411  % counter.nEntries ()
412  % counter.sum ()
413  % counter.mean ()
414  % counter.rms ()
415  % counter.min ()
416  % counter.max () ;
417  return fmt.str() ;
418 }
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:133
IAlgorithm * Gaudi::Utils::getAlgorithm ( const IAlgContextSvc svc,
const AlgSelector &  sel 
)

simple function to get the algorithm from Context Service

// get the selector
const AlgSelector& selector = ... ;
// get the context service:
const IAlgContextSvc* svc = ... ;
// get the appropriate algorithm:
IAlgorithm* alg = getAlgorithm ( svc , selector ) ;
See also
IAlgContextSvc
Gaudi::Utils::AlgSelector
Parameters
svcpointer to Algororithm Contetx Service
selthe selection functor
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-09-07

Definition at line 29 of file GetAlg.cpp.

31 {
32  if ( 0 == svc ) { return 0 ; } // RETURN
33  return getAlgorithm ( svc->algorithms() , sel ) ;
34 }
virtual const Algorithms & algorithms() const =0
get the stack of executed algorithms
GAUDI_API IAlgorithm * getAlgorithm(const IAlgContextSvc *svc, const AlgSelector &sel)
simple function to get the algorithm from Context Service
Definition: GetAlg.cpp:29
IAlgorithm * Gaudi::Utils::getAlgorithm ( const std::vector< IAlgorithm * > &  lst,
const AlgSelector &  sel 
)

simple function to get the algorithm from Context Service

// get the selector
const AlgSelector& selector = ... ;
// get the list of algorithms:
const std::vector<IAlgorithm*>& algs = ... ;
// get the appropriate algorithm:
IAlgorithm* alg = getAlgorithm ( algs , selector ) ;
See also
IAlgContextSvc
Gaudi::Utils::AlgSelector
Parameters
lstlist of the algorithms
selthe selection functor
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-09-07

Definition at line 40 of file GetAlg.cpp.

42 {
43  for ( std::vector<IAlgorithm*>::const_reverse_iterator it = lst.rbegin() ;
44  lst.rend() != it ; ++it )
45  {
46  // use the selector:
47  if ( sel ( *it ) ) { return *it ; } // return
48  }
49  return 0 ;
50 }
template<class TYPE >
_GetType<TYPE>::return_type Gaudi::Utils::getFromTS ( IDataProviderSvc service,
const std::string &  location 
)
inline

Helper function to provide the minimal lookup and cast functionality of SmartDataPtr used in the helper classes.

Definition at line 63 of file GetData.h.

64  {
65  DataObject *obj = NULL;
66  // Return the casted pointer if the retrieve was successful or NULL otherwise.
67  return service->retrieveObject(location, obj).isSuccess() ?
68  dynamic_cast<typename _GetType<TYPE>::return_type>(obj) :
69  NULL;
70  }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
GaudiAlgorithm * Gaudi::Utils::getGaudiAlg ( const IAlgContextSvc svc)

simple function to extract the last active GaudiAlgorithm from the context

// get the context service:
const IAlgContextSvc* svc = ... ;
GaudiAlgorithm* ga = getGaudiAlg ( svc ) ;
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-09-07

Definition at line 67 of file GetAlgs.cpp.

68 { return getAlg<GaudiAlgorithm> ( svc ) ; }
GaudiSequencer * Gaudi::Utils::getGaudiSequencer ( const IAlgContextSvc svc)

simple function to extract the last active GaudiSequencer from the context

// get the context service:
const IAlgContextSvc* svc = ... ;
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-09-07

Definition at line 127 of file GetAlgs.cpp.

128 { return getAlg<GaudiSequencer> ( svc ) ; }
GaudiHistoAlg * Gaudi::Utils::getHistoAlg ( const IAlgContextSvc svc)

simple function to extract the last active GaudiHistoAlg from the context

// get the context service:
const IAlgContextSvc* svc = ... ;
GaudiHistoAlg* ha = getHistoAlg ( svc ) ;
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-09-07

Definition at line 87 of file GetAlgs.cpp.

88 { return getAlg<GaudiHistoAlg> ( svc ) ; }
Property * Gaudi::Utils::getProperty ( const IProperty p,
const std::string &  name 
)

simple function which gets the property with given name from the component

const IProperty* p = ... ;
const Property* pro = getProperty( p , "Context" ) ;
Parameters
ppointer to IProperty object
nameproperty name (case insensitive)
Returns
property with the given name (if exists), NULL otherwise
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-09-09

Definition at line 349 of file Property.cpp.

351 {
352  // trivial check
353  if ( 0 == p ) { return 0 ; } // RETURN
354  // get all properties
355  typedef std::vector<Property*> List ;
356  const List& lst = p->getProperties() ;
357  if ( lst.empty() ) { return 0 ; } // RETURN
358  // comparison criteria:
359  List::const_iterator ifound =
360  std::find_if ( lst.begin() , lst.end() , _ByName_( name ) ) ;
361  if ( lst.end() == ifound ) { return 0 ; } // RETURN
362  // OK
363  return *ifound ;
364 }
virtual const std::vector< Property * > & getProperties() const =0
Get list of properties.
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" ) ;
Parameters
ppointer to IInterface object
nameproperty name (case insensitive)
Returns
property with the given name (if exists), NULL otherwise
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-09-09

Definition at line 385 of file Property.cpp.

386 {
387  // trivial check
388  if ( 0 == p ) { return 0 ; } // RETURN
389  // remove const-qualifier
390  IInterface* _i = const_cast<IInterface*>( p ) ;
391  if ( 0 == _i ) { return 0 ; } // RETURN
392  SmartIF<IProperty> property ( _i ) ;
393  if ( !property ) { return 0 ; } // RETURN
394  return getProperty ( property , name ) ;
395 }
GAUDI_API Property * getProperty(const IProperty *p, const std::string &name)
simple function which gets the property with given name from the component
Definition: Property.cpp:349
Definition of the basic interface.
Definition: IInterface.h:160
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" )
See also
IJobOptionsSvc
Parameters
plist of properties
nameproperty name (case insensitive)
Returns
property with the given name (if exists), NULL otherwise
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-09-09

Definition at line 452 of file Property.cpp.

454 {
455  // trivial check
456  if ( 0 == p ) { return 0 ; } // RETURN
457  std::vector<const Property*>::const_iterator ifound =
458  std::find_if ( p->begin() , p->end() , _ByName_( name ) ) ;
459  if ( p->end() == ifound ) { return 0 ; } // RETURN
460  // OK
461  return *ifound ;
462 }
IAlgorithm * Gaudi::Utils::getSequencer ( const IAlgContextSvc svc)

simple function to extract the last active "Sequencer" () GaudiSequencer or simple Sequencer) from the context

// get the context service:
const IAlgContextSvc* svc = ... ;
IAlgorithm* a = getSequencer ( svc ) ;
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-09-07

Definition at line 167 of file GetAlgs.cpp.

168 {
169  if ( 0 == svc ) { return 0 ; } // RETURN
170  //
171  typedef IAlgContextSvc::Algorithms ALGS ;
172  const ALGS& algs = svc->algorithms() ;
173  AlgTypeSelector<GaudiSequencer> sel1 ;
174  AlgTypeSelector<Sequencer> sel2 ;
175  for ( ALGS::const_reverse_iterator it = algs.rbegin() ;
176  algs.rend() != it ; ++it )
177  {
178  if ( sel1 ( *it ) ) { return *it ; }
179  if ( sel2 ( *it ) ) { return *it ; }
180  }
181  return 0 ; // RETURN ;
182 }
virtual const Algorithms & algorithms() const =0
get the stack of executed algorithms
std::vector< IAlgorithm * > Algorithms
the actual type of algorithm' stack
Sequencer * Gaudi::Utils::getSequencerAlg ( const IAlgContextSvc svc)

simple function to extract the last active Sequencer from the context

// get the context service:
const IAlgContextSvc* svc = ... ;
Sequencer* sa = getSequencerAlg ( svc ) ;
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-09-07

Definition at line 146 of file GetAlgs.cpp.

147 { return getAlg<Sequencer> ( svc ) ; }
GaudiTupleAlg * Gaudi::Utils::getTupleAlg ( const IAlgContextSvc svc)

simple function to extract the last active GaudiTupleAlg from the context

// get the context service:
const IAlgContextSvc* svc = ... ;
GaudiTupleAlg* ta = getTupleAlg ( svc ) ;
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-09-07

Definition at line 107 of file GetAlgs.cpp.

108 { return getAlg<GaudiTupleAlg> ( svc ) ; }
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" ) ;
Parameters
ppointer to IProperty object
nameproperty name (case insensitive)
Returns
true if "p" has a property with such name
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-09-09

Definition at line 232 of file Property.cpp.

234 {
235  if ( 0 == p ) { return false ; }
236  // delegate the actual work to another method ;
237  return 0 != getProperty ( p , name ) ;
238 }
GAUDI_API Property * getProperty(const IProperty *p, const std::string &name)
simple function which gets the property with given name from the component
Definition: Property.cpp:349
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" ) ;
Parameters
ppointer to IInterface object (any component)
nameproperty name (case insensitive)
Returns
true if "p" has a property with such name
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-09-09

Definition at line 204 of file Property.cpp.

206 {
207  // trivial check
208  if ( 0 == p ) { return false ; } // RETURN
209  // gelegate to another method
210  return 0 != getProperty ( p , name ) ;
211 }
GAUDI_API Property * getProperty(const IProperty *p, const std::string &name)
simple function which gets the property with given name from the component
Definition: Property.cpp:349
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" )
See also
IJobOptionsSvc
Parameters
plist of properties
nameproperty name (case insensitive)
Returns
true if the property exists
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-09-09

Definition at line 421 of file Property.cpp.

423 {
424  // delegate to another method
425  return 0 != getProperty ( p , name ) ;
426 }
GAUDI_API Property * getProperty(const IProperty *p, const std::string &name)
simple function which gets the property with given name from the component
Definition: Property.cpp:349
std::ostream& Gaudi::Utils::operator<< ( std::ostream &  s,
const TypeNameString &  tn 
)
inline

Output stream operator for TypeNameString instances.

Definition at line 28 of file TypeNameString.h.

28  {
29  return s << tn.type() << '/' << tn.name();
30  }
string s
Definition: gaudirun.py:210
template<class TYPE >
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

Parameters
componentcomponent which needs to be configured
namename of the property
valuevalue of the property
docthe new documentation string
See also
IProperty
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13
IProperty* component = ... ;
std::vector<double> data = ... ;
StatusCode sc = setProperty ( component , "Data" , data ) ;
std::map<std::string,double> cuts = ... ;
sc = setProperty ( component , "Cuts" , cuts ) ;
std::map<std::string,std::string> dict = ... ;
sc = setProperty ( component , "Dictionary" , dict ) ;

Note: the native interface IProperty allows setting of the properties either directly from other properties or from strings only

Parameters
componentcomponent which needs to be configured
namename of the property
valuevalue of the property
docthe new documentation string
See also
IProperty
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13

Definition at line 1212 of file Property.h.

1216  {
1217  if ( 0 == component ) { return StatusCode::FAILURE ; } // RETURN
1218  if ( !hasProperty ( component , name ) ) { return StatusCode::FAILURE ; }
1219  const std::string val = Gaudi::Utils::toString ( value ) ;
1220  return Gaudi::Utils::setProperty ( component , name , val , doc ) ;
1221  }
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
Definition: Property.h:1212
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:367
GAUDI_API bool hasProperty(const std::vector< const Property * > *p, const std::string &name)
check the property by name from the list of the properties
Definition: Property.cpp:421
template<class TYPE >
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

Parameters
componentcomponent which needs to be configured
namename of the property
valuevalue of the property
See also
IProperty
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13

Definition at line 1112 of file Property.h.

1115  { return setProperty ( component , name , value , std::string() ) ; }
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
Definition: Property.h:1483
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

Parameters
componentcomponent which needs to be configured
namename of the property
valuevalue of the property
docthe new documentation string
See also
IProperty
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13

Definition at line 502 of file Property.cpp.

506 {
507  if ( 0 == component ) { return StatusCode::FAILURE ; } // RETURN
508  if ( !hasProperty ( component , name ) ) { return StatusCode::FAILURE ; }
509  StatusCode sc = component -> setProperty ( name , value ) ;
510  if ( !doc.empty() )
511  {
512  Property* p = getProperty( component , name ) ;
513  if ( 0 != p ) { p -> setDocumentation ( doc ) ; }
514  }
515  sc.ignore() ;
516  return sc ;
517 }
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
Definition: Property.h:1212
GAUDI_API bool hasProperty(const IProperty *p, const std::string &name)
simple function which check the existence of the property with the given name.
Definition: Property.cpp:232
GAUDI_API Property * getProperty(const IProperty *p, const std::string &name)
simple function which gets the property with given name from the component
Definition: Property.cpp:349
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:43
void ignore() const
Definition: StatusCode.h:107
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

Parameters
componentcomponent which needs to be configured
namename of the property
valuevalue of the property
docthe new documentation string
See also
IProperty
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13

Definition at line 479 of file Property.cpp.

483 {
484  const std::string val = std::string( value ) ;
485  return Gaudi::Utils::setProperty ( component , name , val , doc ) ;
486 }
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
Definition: Property.h:1212
template<unsigned N>
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

Parameters
componentcomponent which needs to be configured
namename of the property
valuevalue of the property
docthe new documentation string
See also
IProperty
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13

Definition at line 1170 of file Property.h.

1174  {
1175  if ( 0 == component ) { return StatusCode::FAILURE ; }
1176  const std::string val = std::string ( value , value + N ) ;
1177  return setProperty ( component , name , val , doc ) ;
1178  }
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
Definition: Property.h:1483
int N
Definition: IOTest.py:90
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 ) ;
Parameters
componentcomponent which needs to be configured
namename of the property
propertythe property
docthe new documentation string
See also
IProperty
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13

Definition at line 542 of file Property.cpp.

546 {
547  if ( 0 == component || 0 == property ) { return StatusCode::FAILURE ; }
548  if ( !hasProperty ( component , name ) ) { return StatusCode::FAILURE ; }
549  Property* p = getProperty ( component , name ) ;
550  if ( 0 == p ) { return StatusCode::FAILURE ; }
551  if ( !p->assign ( *property ) ) { return StatusCode::FAILURE ; }
552  if ( !doc.empty() ) { p->setDocumentation( doc ) ; }
553  return StatusCode::SUCCESS ;
554 }
virtual bool assign(const Property &source)=0
import the property value form the source
GAUDI_API bool hasProperty(const IProperty *p, const std::string &name)
simple function which check the existence of the property with the given name.
Definition: Property.cpp:232
GAUDI_API Property * getProperty(const IProperty *p, const std::string &name)
simple function which gets the property with given name from the component
Definition: Property.cpp:349
void setDocumentation(const std::string &documentation)
set the documentation string
Definition: Property.h:92
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:43
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 ) ;
Parameters
componentcomponent which needs to be configured
namename of the property
propertythe property
docthe new documentation string
See also
IProperty
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13

Definition at line 579 of file Property.cpp.

583 { return setProperty ( component , name , &property , doc ) ; }
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
Definition: Property.h:1212
template<class TYPE >
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 = ... ;
StatusCode sc = setProperty ( component , "Data" , prop ) ;
Parameters
componentcomponent which needs to be configured
namename of the property
valuethe property
docthe new documentation string
See also
IProperty
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13

Definition at line 1301 of file Property.h.

1305  {
1306  const Property* property = &value ;
1307  return setProperty ( component , name , property , doc ) ;
1308  }
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
Definition: Property.h:1483
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:43
template<class TYPE >
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 ) ;
Parameters
componentcomponent which needs to be configured
namename of the property
valuevalue of the property
docthe new documentation string
See also
IProperty
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13

Definition at line 1332 of file Property.h.

1336  {
1337  if ( 0 == component ) { return StatusCode::FAILURE ; }
1338  SmartIF<IProperty> property ( component ) ;
1339  if ( !property ) { return StatusCode::FAILURE ; }
1340  return setProperty ( property , name , value , doc ) ;
1341  }
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
Definition: Property.h:1483
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

Parameters
componentcomponent which needs to be configured
namename of the property
valuevalue of the property
docthe new documentation string
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13

Definition at line 599 of file Property.cpp.

603 {
604  if ( 0 == component ) { return StatusCode::FAILURE ; }
605  SmartIF<IProperty> property ( component ) ;
606  if ( !property ) { return StatusCode::FAILURE ; }
607  return setProperty ( property , name , value , doc ) ;
608 }
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
Definition: Property.h:1212
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

Parameters
componentcomponent which needs to be configured
namename of the property
valuevalue of the property
docthe new documentation string
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13

Definition at line 624 of file Property.cpp.

628 {
629  const std::string val = std::string( value ) ;
630  return setProperty ( component , name , val , doc ) ;
631 }
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
Definition: Property.h:1212
template<unsigned N>
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

Parameters
componentcomponent which needs to be configured
namename of the property
valuevalue of the property
docthe new documentation string
See also
IProperty
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13

Definition at line 1394 of file Property.h.

1398  {
1399  if ( 0 == component ) { return StatusCode::FAILURE ; }
1400  const std::string val = std::string ( value , value + N ) ;
1401  return setProperty ( component , name , val , doc ) ;
1402  }
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
Definition: Property.h:1483
int N
Definition: IOTest.py:90
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 ) ;
Parameters
componentcomponent which needs to be configured
namename of the property
propertythe property
docthe new documentation string
See also
IProperty
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13

Definition at line 656 of file Property.cpp.

660 {
661  if ( 0 == component ) { return StatusCode::FAILURE ; }
662  SmartIF<IProperty> prop ( component ) ;
663  if ( !prop ) { return StatusCode::FAILURE ; }
664  return setProperty ( prop , name , property , doc ) ;
665 }
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
Definition: Property.h:1212
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 ) ;
Parameters
componentcomponent which needs to be configured
namename of the property
propertythe property
docthe new documentation string
See also
IProperty
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13

Definition at line 690 of file Property.cpp.

694 { return setProperty ( component , name , &property , doc ) ; }
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
Definition: Property.h:1212
template<class TYPE >
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 = ... ;
StatusCode sc = setProperty ( component , "Data" , prop ) ;
Parameters
componentcomponent which needs to be configured
namename of the property
valuethe property
docthe new documentation string
See also
IProperty
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13

Definition at line 1483 of file Property.h.

1487  {
1488  const Property* property = &value ;
1489  return setProperty ( component , name , property , doc ) ;
1490  }
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
Definition: Property.h:1483
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:43
template<class ITERATOR >
std::ostream & Gaudi::Utils::toStream ( ITERATOR  first,
ITERATOR  last,
std::ostream &  s,
const std::string &  open,
const std::string &  close,
const std::string &  delim 
)
inline

the helper function to print the sequence

Parameters
first(INPUT) begin-iterator for the sequence
last(INPUT) end-iterator for the sequence
s(UPDATE) the stream itself
open(INPUT) "open"-symbol
close(INPUT) "close"-symbol
delim(INPUT) "delimiter"-symbol
Returns
the stream
Author
Vanya BELYAEV Ivan..nosp@m.BEly.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-15

Definition at line 341 of file ToStream.h.

347  {
348  s << open ;
349  for ( ITERATOR curr = first ; curr != last ; ++curr )
350  {
351  if ( first != curr ) { s << delim ; }
352  toStream ( *curr , s ) ;
353  }
354  s << close ;
355  //
356  return s ;
357  }
std::ostream & toStream(const char *obj, std::ostream &s)
the specialization for C-string, a'la python tuple
Definition: ToStream.h:316
string s
Definition: gaudirun.py:210
std::ostream & Gaudi::Utils::toStream ( const TH1D &  histo,
std::ostream &  stream,
const bool  asXML = false 
)

stream the ROOT histogram into output stream

Parameters
histo(INPUT) the histogram to be streamed
stream(OUTPUT) the stream
asXML(INPUT) use XML-format
Returns
the updated stream
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-26

Definition at line 184 of file Histo2String.cpp.

186  { return _toStream_1D_ ( histo , stream , asXML ) ; }
template<class TYPE >
std::ostream & Gaudi::Utils::toStream ( const TYPE &  obj,
std::ostream &  s 
)
inline

the generic implementation of the printout to the std::ostream

Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-12

Definition at line 325 of file ToStream.h.

326  { return s << obj ; }
string s
Definition: gaudirun.py:210
template<class TYPE , std::size_t N>
std::ostream& Gaudi::Utils::toStream ( const boost::array< TYPE, N > &  obj,
std::ostream &  s 
)
inline

printout of class boost::array The format is "Python's tuple"

Parameters
obj(INPUT) the arary to be printed
s(UPDATE) the actual stream
Returns
the updated stream
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-16

Definition at line 53 of file BoostArrayAsProperty.h.

54  {
55  return toStream
56  ( obj.begin () , obj.end () , s , "( " , " )" , " , " ) ;
57  }
std::ostream & toStream(const boost::array< TYPE, N > &obj, std::ostream &s)
printout of class boost::array The format is "Python's tuple"
string s
Definition: gaudirun.py:210
std::ostream & Gaudi::Utils::toStream ( const TH2D &  histo,
std::ostream &  stream,
const bool  asXML = false 
)

stream the ROOT histogram into output stream

Parameters
histo(INPUT) the histogram to be streamed
stream(OUTPUT) the stream
asXML(INPUT) use XML-format
Returns
the updated stream
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-26

Definition at line 206 of file Histo2String.cpp.

208  { return _toStream_2D_ ( histo , stream , asXML ) ; }
std::ostream & Gaudi::Utils::toStream ( const TH1F &  histo,
std::ostream &  stream,
const bool  asXML = false 
)

stream the ROOT histogram into output stream

Parameters
histo(INPUT) the histogram to be streamed
stream(OUTPUT) the stream
asXML(INPUT) use XML-format
Returns
the updated stream
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-26

Definition at line 195 of file Histo2String.cpp.

197  { return _toStream_1D_ ( histo , stream , asXML ) ; }
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

Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-12

Definition at line 78 of file ToStream.h.

79  {
80  if ( std::string::npos == obj.find('\'') )
81  { s << "\'" << obj << "\'" ; }
82  else
83  { s << "\"" << obj << "\"" ; }
84  return s ;
85  }
string s
Definition: gaudirun.py:210
template<class SCALAR >
std::ostream& Gaudi::Utils::toStream ( const SCALAR &  ,
std::ostream &   
)
template<class SCALAR , unsigned int N>
std::ostream& Gaudi::Utils::toStream ( const ROOT::Math::SVector< SCALAR, N > &  obj,
std::ostream &  s 
)

the general streaming function for SVector using python-tupel format

Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-10-07

Definition at line 87 of file SVectorAsProperty.h.

88  {
89  s << "( ";
90  for ( typename ROOT::Math::SVector<SCALAR,N>::const_iterator cur = obj.begin() ;
91  obj.end() != cur ; ++cur )
92  {
93  if ( obj.begin() != cur ) { s << " , "; }
94  toStream ( *cur , s ) ;
95  }
96  return s << " )";
97  }
std::ostream & toStream(const ROOT::Math::SVector< SCALAR, N > &obj, std::ostream &s)
the general streaming function for SVector using python-tupel format
string s
Definition: gaudirun.py:210
std::ostream & Gaudi::Utils::toStream ( const TH2F &  histo,
std::ostream &  stream,
const bool  asXML = false 
)

stream the ROOT histogram into output stream

Parameters
histo(INPUT) the histogram to be streamed
stream(OUTPUT) the stream
asXML(INPUT) use XML-format
Returns
the updated stream
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-26

Definition at line 217 of file Histo2String.cpp.

219  { return _toStream_2D_ ( histo , stream , asXML ) ; }
std::ostream& Gaudi::Utils::toStream ( const bool  obj,
std::ostream &  s 
)
inline

the printout of boolean values "a'la Python"

Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-09-09

Definition at line 91 of file ToStream.h.

92  { return s << ( obj ? "True" : "False" ) ; }
string s
Definition: gaudirun.py:210
std::ostream& Gaudi::Utils::toStream ( const float  obj,
std::ostream &  s,
const int  prec = 6 
)
inline

the printout of float values with the reasonable precision

Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-09-09

Definition at line 98 of file ToStream.h.

99  {
100  const int p = s.precision() ;
101  return s << std::setprecision ( prec ) << obj << std::setprecision ( p ) ;
102  }
string s
Definition: gaudirun.py:210
std::ostream & Gaudi::Utils::toStream ( const AIDA::IHistogram1D &  histo,
std::ostream &  stream,
const bool  asXML = false 
)

stream the AIDA histogram into output stream

Parameters
histo(INPUT) the histogram to be streamed
stream(OUTPUT) the stream
asXML(INPUT) use XML-format
Returns
the updated stream
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-26

Definition at line 228 of file Histo2String.cpp.

231 {
232  //
233  AIDA::IHistogram1D* aida = const_cast<AIDA::IHistogram1D*> ( &histo ) ;
234  //
235  const TH1D* root = Gaudi::Utils::Aida2ROOT::aida2root ( aida ) ;
236  if ( 0 == root ) { return stream ; } // RETURN
237  //
238  return toStream ( *root , stream , asXML ) ;
239 }
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
Definition: ToStream.h:341
static TH1D * aida2root(AIDA::IHistogram1D *aida)
get the underlying pointer for 1D-histogram
Definition: Aida2ROOT.cpp:55
tuple root
Definition: IOTest.py:42
std::ostream& Gaudi::Utils::toStream ( const double  obj,
std::ostream &  s,
const int  prec = 8 
)
inline

the printout of double values with the reasonable precision

Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-09-09

Definition at line 108 of file ToStream.h.

109  {
110  const int p = s.precision() ;
111  return s << std::setprecision ( prec ) << obj << std::setprecision ( p ) ;
112  }
string s
Definition: gaudirun.py:210
std::ostream & Gaudi::Utils::toStream ( const AIDA::IHistogram2D &  histo,
std::ostream &  stream,
const bool  asXML = false 
)

stream the AIDA histogram into output stream

Parameters
histo(INPUT) the histogram to be streamed
stream(OUTPUT) the stream
asXML(INPUT) use XML-format
Returns
the updated stream
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-26

Definition at line 248 of file Histo2String.cpp.

251 {
252  //
253  AIDA::IHistogram2D* aida = const_cast<AIDA::IHistogram2D*> ( &histo ) ;
254  //
255  const TH2D* root = Gaudi::Utils::Aida2ROOT::aida2root ( aida ) ;
256  if ( 0 == root ) { return stream ; } // RETURN
257  //
258  return toStream ( *root , stream , asXML ) ;
259 }
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
Definition: ToStream.h:341
static TH1D * aida2root(AIDA::IHistogram1D *aida)
get the underlying pointer for 1D-histogram
Definition: Aida2ROOT.cpp:55
tuple root
Definition: IOTest.py:42
std::ostream& Gaudi::Utils::toStream ( const long double  obj,
std::ostream &  s,
const int  prec = 10 
)
inline

the printout of long double values with the reasonable precision

Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-09-09

Definition at line 118 of file ToStream.h.

119  {
120  const int p = s.precision() ;
121  return s << std::setprecision ( prec ) << obj << std::setprecision ( p ) ;
122  }
string s
Definition: gaudirun.py:210
template<class KTYPE , class VTYPE >
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 )"

Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-12

Definition at line 133 of file ToStream.h.

134  {
135  s << "( " ;
136  toStream ( obj.first , s ) ;
137  s << " , " ;
138  toStream ( obj.second , s ) ;
139  return s << " )" ;
140  }
std::ostream & toStream(const char *obj, std::ostream &s)
the specialization for C-string, a'la python tuple
Definition: ToStream.h:316
string s
Definition: gaudirun.py:210
template<class TYPE , class ALLOCATOR >
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 ]"

Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-12

Definition at line 150 of file ToStream.h.

151  {
152  return toStream ( obj.begin() , obj.end () , s , "[ " , " ]" , " , " ) ;
153  }
std::ostream & toStream(const char *obj, std::ostream &s)
the specialization for C-string, a'la python tuple
Definition: ToStream.h:316
string s
Definition: gaudirun.py:210
template<class TYPE , class ALLOCATOR >
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 ]"

Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-04-08

Definition at line 163 of file ToStream.h.

164  {
165  return toStream ( obj.begin() , obj.end () , s , "[ " , " ]" , " , " ) ;
166  }
std::ostream & toStream(const char *obj, std::ostream &s)
the specialization for C-string, a'la python tuple
Definition: ToStream.h:316
string s
Definition: gaudirun.py:210
template<class TYPE , class CMP , class ALLOCATOR >
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 ]"

Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-12

Definition at line 176 of file ToStream.h.

177  {
178  return toStream ( obj.begin() , obj.end () , s , "[ " , " ]" , " , " ) ;
179  }
std::ostream & toStream(const char *obj, std::ostream &s)
the specialization for C-string, a'la python tuple
Definition: ToStream.h:316
string s
Definition: gaudirun.py:210
template<class KTYPE , class VTYPE , class CMP , class ALLOCATOR >
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 )"

Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-12

Definition at line 190 of file ToStream.h.

191  {
192  s << "{ ";
193  for ( typename std::map<KTYPE,VTYPE,CMP,ALLOCATOR>::const_iterator cur =
194  obj.begin() ; obj.end() != cur ; ++cur )
195  {
196  if ( obj.begin() != cur ) { s << " , " ; }
197  toStream ( cur -> first , s ) ;
198  s << " : " ;
199  toStream ( cur -> second , s ) ;
200  }
201  return s << " }";
202  }
std::ostream & toStream(const char *obj, std::ostream &s)
the specialization for C-string, a'la python tuple
Definition: ToStream.h:316
string s
Definition: gaudirun.py:210
template<class KTYPE , class VTYPE , class CMP , class ALLOCATOR >
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 )"

See also
GaudiUtils::VectorMap
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-12

Definition at line 214 of file ToStream.h.

215  {
216  s << "{ ";
218  obj.end() != cur ; ++cur )
219  {
220  if ( obj.begin() != cur ) { s << " , " ; }
221  toStream ( cur -> first , s ) ;
222  s << " : " ;
223  toStream ( cur -> second , s ) ;
224  }
225  return s << " }";
226  }
std::ostream & toStream(const char *obj, std::ostream &s)
the specialization for C-string, a'la python tuple
Definition: ToStream.h:316
iterator end() const
"end" iterator for sequential access (const-only version!)
Definition: VectorMap.h:200
iterator begin() const
"begin" iterator for sequential access (const-only version!)
Definition: VectorMap.h:198
_vector::const_iterator const_iterator
visible const_iterator (exported)
Definition: VectorMap.h:151
string s
Definition: gaudirun.py:210
std::ostream & Gaudi::Utils::toStream ( const Gaudi::XYZPoint obj,
std::ostream &  s 
)

print XYZ point

Definition at line 131 of file ParsersVct.cpp.

132 {
133  s << "( " ;
134  toStream ( obj.X () , s ) ;
135  s << " , " ;
136  toStream ( obj.Y () , s ) ;
137  s << " , " ;
138  toStream ( obj.Z () , s ) ;
139  s << " )" ;
140  return s ;
141 }
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
Definition: ToStream.h:341
string s
Definition: gaudirun.py:210
std::ostream & Gaudi::Utils::toStream ( const Gaudi::XYZVector obj,
std::ostream &  s 
)

print XYZ vector

Definition at line 146 of file ParsersVct.cpp.

147 {
148  s << "( " ;
149  toStream ( obj.X () , s ) ;
150  s << " , " ;
151  toStream ( obj.Y () , s ) ;
152  s << " , " ;
153  toStream ( obj.Z () , s ) ;
154  s << " )" ;
155 
156  return s ;
157 }
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
Definition: ToStream.h:341
string s
Definition: gaudirun.py:210
std::ostream & Gaudi::Utils::toStream ( const Gaudi::LorentzVector obj,
std::ostream &  s 
)

print Lorentz vector

Definition at line 162 of file ParsersVct.cpp.

163 {
164 
165  s << "( " ;
166  toStream ( obj.Px () , s , 12 ) ;
167  s << " , " ;
168  toStream ( obj.Py () , s , 12 ) ;
169  s << " , " ;
170  toStream ( obj.Pz () , s , 13 ) ;
171  s << " , " ;
172  toStream ( obj.E () , s , 14 ) ;
173  s << " )" ;
174 
175  return s ;
176 }
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
Definition: ToStream.h:341
string s
Definition: gaudirun.py:210
template<class KTYPE , class VTYPE , class MAP >
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 )"

See also
GaudiUtils::VectorMap
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-12

Definition at line 238 of file ToStream.h.

239  {
240  s << "{ ";
241  for ( typename GaudiUtils::Map<KTYPE,VTYPE,MAP>::const_iterator cur = obj.begin() ;
242  obj.end() != cur ; ++cur )
243  {
244  if ( obj.begin() != cur ) { s << " , " ; }
245  toStream ( cur -> first , s ) ;
246  s << " : " ;
247  toStream ( cur -> second , s ) ;
248  }
249  return s << " }";
250  }
std::ostream & toStream(const char *obj, std::ostream &s)
the specialization for C-string, a'la python tuple
Definition: ToStream.h:316
iterator end()
Definition: Map.h:131
map_type::const_iterator const_iterator
Definition: Map.h:99
iterator begin()
Definition: Map.h:130
string s
Definition: gaudirun.py:210
std::ostream & Gaudi::Utils::toStream ( const Gaudi::StringKey key,
std::ostream &  s 
)

send the object to stream (needed to use it as property)

See also
Gaudi::StringKey
Gaudi::Utils::toString
Gaudi::Utils::toStream
Parameters
key(INPUT) the object to be printed
s(OUTPUT) the stream
Returns
the stream
Author
Vanya BELYAEV Iavn..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-10-07

Definition at line 75 of file StringKey.cpp.

76 { return Gaudi::Utils::toStream ( key.str() , s ) ; }
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
Definition: ToStream.h:341
string s
Definition: gaudirun.py:210
const std::string & str() const
the actual string
Definition: StringKey.h:47
template<class KTYPE , class VTYPE , class HASH , class MAP >
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 )"

See also
GaudiUtils::VectorMap
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-12

Definition at line 262 of file ToStream.h.

263  {
264  s << "{ ";
266  obj.end() != cur ; ++cur )
267  {
268  if ( obj.begin() != cur ) { s << " , " ; }
269  toStream ( cur -> first , s ) ;
270  s << " : " ;
271  toStream ( cur -> second , s ) ;
272  }
273  return s << " }";
274  }
std::ostream & toStream(const char *obj, std::ostream &s)
the specialization for C-string, a'la python tuple
Definition: ToStream.h:316
iterator end()
Definition: Map.h:131
map_type::const_iterator const_iterator
Definition: Map.h:99
iterator begin()
Definition: Map.h:130
string s
Definition: gaudirun.py:210
template<class TYPE , unsigned int N>
std::ostream& Gaudi::Utils::toStream ( TYPE(&)  obj[N],
std::ostream &  s 
)

the specialization for C-arrays, a'la python tuple

Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.nf.nl
Date
2009-10-05

Definition at line 281 of file ToStream.h.

282  {
283  return toStream ( obj , obj + N , s , "( " , " )" , " , " ) ;
284  }
std::ostream & toStream(const char *obj, std::ostream &s)
the specialization for C-string, a'la python tuple
Definition: ToStream.h:316
int N
Definition: IOTest.py:90
string s
Definition: gaudirun.py:210
template<class TYPE , unsigned int N>
std::ostream& Gaudi::Utils::toStream ( const TYPE(&)  obj[N],
std::ostream &  s 
)

the specialization for C-arrays, a'la python tuple

Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.nf.nl
Date
2009-10-05

Definition at line 291 of file ToStream.h.

292  {
293  return toStream ( obj , obj + N , s , "( " , " )" , " , " ) ;
294  }
std::ostream & toStream(const char *obj, std::ostream &s)
the specialization for C-string, a'la python tuple
Definition: ToStream.h:316
int N
Definition: IOTest.py:90
string s
Definition: gaudirun.py:210
template<unsigned int N>
std::ostream& Gaudi::Utils::toStream ( char(&)  obj[N],
std::ostream &  s 
)

the specialization for C-string, a'la python tuple

Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.nf.nl
Date
2009-10-05

Definition at line 301 of file ToStream.h.

302  { return toStream ( std::string ( obj , obj+N ) , s ) ; }
std::ostream & toStream(const char *obj, std::ostream &s)
the specialization for C-string, a'la python tuple
Definition: ToStream.h:316
int N
Definition: IOTest.py:90
string s
Definition: gaudirun.py:210
template<unsigned int N>
std::ostream& Gaudi::Utils::toStream ( const char(&)  obj[N],
std::ostream &  s 
)

the specialization for C-string, a'la python tuple

Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.nf.nl
Date
2009-10-05

Definition at line 309 of file ToStream.h.

310  { return toStream ( std::string ( obj , obj+N ) , s ) ; }
std::ostream & toStream(const char *obj, std::ostream &s)
the specialization for C-string, a'la python tuple
Definition: ToStream.h:316
int N
Definition: IOTest.py:90
string s
Definition: gaudirun.py:210
std::ostream& Gaudi::Utils::toStream ( const char *  obj,
std::ostream &  s 
)
inline

the specialization for C-string, a'la python tuple

Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.nf.nl
Date
2009-10-05

Definition at line 316 of file ToStream.h.

317  { return toStream ( std::string ( obj ) , s ) ; }
std::ostream & toStream(const char *obj, std::ostream &s)
the specialization for C-string, a'la python tuple
Definition: ToStream.h:316
string s
Definition: gaudirun.py:210
std::string Gaudi::Utils::toString ( const TH1D &  histo,
const bool  asXML = false 
)

convert the histogram into the string

Parameters
histo(INPUT) the histogram to be streamed
asXML(INPUT) use XML-format
Returns
the string representation of the histogram
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-26

Definition at line 270 of file Histo2String.cpp.

272 {
273  std::ostringstream o ;
274  toStream ( histo , o , asXML ) ;
275  return o.str() ;
276 }
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
Definition: ToStream.h:341
std::string Gaudi::Utils::toString ( const TH2D &  histo,
const bool  asXML = false 
)

convert the histogram into the string

Parameters
histo(INPUT) the histogram to be streamed
asXML(INPUT) use XML-format
Returns
the string representation of the histogram
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-26

Definition at line 304 of file Histo2String.cpp.

306 {
307  std::ostringstream o ;
308  toStream ( histo , o , asXML ) ;
309  return o.str() ;
310 }
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
Definition: ToStream.h:341
std::string Gaudi::Utils::toString ( const TH1F &  histo,
const bool  asXML = false 
)

convert the histogram into the string

Parameters
histo(INPUT) the histogram to be streamed
asXML(INPUT) use XML-format
Returns
the string representation of the histogram
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-26

Definition at line 287 of file Histo2String.cpp.

289 {
290  std::ostringstream o ;
291  toStream ( histo , o , asXML ) ;
292  return o.str() ;
293 }
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
Definition: ToStream.h:341
std::string Gaudi::Utils::toString ( const TH2F &  histo,
const bool  asXML = false 
)

convert the histogram into the string

Parameters
histo(INPUT) the histogram to be streamed
asXML(INPUT) use XML-format
Returns
the string representation of the histogram
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-26

Definition at line 321 of file Histo2String.cpp.

323 {
324  std::ostringstream o ;
325  toStream ( histo , o , asXML ) ;
326  return o.str() ;
327 }
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
Definition: ToStream.h:341
std::string Gaudi::Utils::toString ( const AIDA::IHistogram1D &  histo,
const bool  asXML = false 
)

convert the histogram into the string

Parameters
histo(INPUT) the histogram to be streamed
asXML(INPUT) use XML-format
Returns
the string representation of the histogram
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-26

Definition at line 338 of file Histo2String.cpp.

340 {
341  std::ostringstream o ;
342  toStream ( histo , o , asXML ) ;
343  return o.str() ;
344 }
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
Definition: ToStream.h:341
std::string Gaudi::Utils::toString ( const AIDA::IHistogram2D &  histo,
const bool  asXML = false 
)

convert the histogram into the string

Parameters
histo(INPUT) the histogram to be streamed
asXML(INPUT) use XML-format
Returns
the string representation of the histogram
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-26

Definition at line 355 of file Histo2String.cpp.

357 {
358  std::ostringstream o ;
359  toStream ( histo , o , asXML ) ;
360  return o.str() ;
361 }
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
Definition: ToStream.h:341
std::string Gaudi::Utils::toString ( const AIDA::IHistogram1D *  histo)

convert the histogram into the string

Parameters
histo(INPUT) the histogram to be streamed
asXML(INPUT) use XML-format
Returns
the string representation of the histogram
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-26

Definition at line 371 of file Histo2String.cpp.

372 {
373  if ( 0 == histo ) { return std::string ("{}") ; }
374  return toString ( *histo ) ;
375 }
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:367
std::string Gaudi::Utils::toString ( AIDA::IHistogram1D *  histo)

convert the histogram into the string

Parameters
histo(INPUT) the histogram to be streamed
asXML(INPUT) use XML-format
Returns
the string representation of the histogram
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-26

Definition at line 385 of file Histo2String.cpp.

386 {
387  if ( 0 == histo ) { return std::string ("{}") ; }
388  return toString ( *histo ) ;
389 }
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:367
std::string Gaudi::Utils::toString ( const TH1D *  histo)

convert the histogram into the string

Parameters
histo(INPUT) the histogram to be streamed
asXML(INPUT) use XML-format
Returns
the string representation of the histogram
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-26

Definition at line 399 of file Histo2String.cpp.

400 {
401  if ( 0 == histo ) { return std::string ("{}") ; }
402  return toString ( *histo ) ;
403 }
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:367
std::string Gaudi::Utils::toString ( TH1D *  histo)

convert the histogram into the string

Parameters
histo(INPUT) the histogram to be streamed
asXML(INPUT) use XML-format
Returns
the string representation of the histogram
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-26

Definition at line 427 of file Histo2String.cpp.

428 {
429  if ( 0 == histo ) { return std::string ("{}") ; }
430  return toString ( *histo ) ;
431 }
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:367
std::string Gaudi::Utils::toString ( const TH2D *  histo)

convert the histogram into the string

Parameters
histo(INPUT) the histogram to be streamed
asXML(INPUT) use XML-format
Returns
the string representation of the histogram
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-26

Definition at line 413 of file Histo2String.cpp.

414 {
415  if ( 0 == histo ) { return std::string ("{}") ; }
416  return toString ( *histo ) ;
417 }
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:367
std::string Gaudi::Utils::toString ( TH2D *  histo)

convert the histogram into the string

Parameters
histo(INPUT) the histogram to be streamed
asXML(INPUT) use XML-format
Returns
the string representation of the histogram
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-26

Definition at line 441 of file Histo2String.cpp.

442 {
443  if ( 0 == histo ) { return std::string ("{}") ; }
444  return toString ( *histo ) ;
445 }
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:367
template<class TYPE >
std::string Gaudi::Utils::toString ( const TYPE &  obj)
inline

the generic implementation of the type conversion to the string

Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-12
See also
Gaudi::Utils::toStream
Todo:
need to be compared with boost::lexical_cast

Definition at line 367 of file ToStream.h.

368  {
369  std::ostringstream s;
370  std::ios::fmtflags orig_flags = s.flags();
371  s.setf(std::ios::showpoint); // to display correctly floats
372  toStream ( obj , s);
373  s.flags(orig_flags);
374  return s.str();
375  }
std::ostream & toStream(const char *obj, std::ostream &s)
the specialization for C-string, a'la python tuple
Definition: ToStream.h:316
string s
Definition: gaudirun.py:210