Gaudi::Utils Namespace Reference

Namespaces

 Histos
 Collection of useful utilities for manipulations with AIDA hisgograms.
 
 QuasiRandom
 
 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...
 
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< std::array< T, N > >
 the specialization of property-traits for class std::array to take care the non-trivial assignements and constructors for this class 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...
 
struct  TuplePrinter
 
struct  TuplePrinter< Tuple, 1 >
 
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 std::ostream & toStream (const DataHandle &v, std::ostream &o)
 
GAUDI_API std::ostream & toStream (const DataObjID &v, std::ostream &o)
 
GAUDI_API std::ostream & toStream (const DataObjIDColl &v, std::ostream &o)
 
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...
 
template<class TYPE , std::size_t N>
std::ostream & toStream (const std::array< TYPE, N > &obj, std::ostream &s)
 printout of class std::array The format is "Python's tuple" 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<typename... Args>
std::ostream & toStream (const std::tuple< Args...> &tuple, std::ostream &s)
 the helper function to print the 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

GAUDI_API 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 299 of file StatEntity.cpp.

303 {
304  using namespace boost::io ;
305  if ( flag && 0 <= counter.eff() && 0 <= counter.effErr() )
306  {
307  boost::format fmt( format2 ) ;
308  fmt.exceptions ( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) ) ;
309  fmt
310  % counter.nEntries ()
311  % counter.sum ()
312  % ( counter.eff () * 100 )
313  % ( counter.effErr () * 100 ) ;
314  return fmt.str() ;
315  }
316  boost::format fmt ( format1 ) ;
317  fmt.exceptions ( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) ) ;
318  fmt
319  % counter.nEntries ()
320  % counter.sum ()
321  % counter.mean ()
322  % counter.rms ()
323  % counter.min ()
324  % counter.max () ;
325  return fmt.str() ;
326 }
double effErr() const
shortcut,
Definition: StatEntity.h:183
const double & max() const
maximal value
Definition: StatEntity.h:106
const unsigned long & nEntries() const
getters
Definition: StatEntity.h:92
const double & sum() const
accumulated value
Definition: StatEntity.h:94
double eff() const
shortcut,
Definition: StatEntity.h:181
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:119
double mean() const
mean value of counter
Definition: StatEntity.cpp:82
const double & min() const
minimal value
Definition: StatEntity.h:104
double rms() const
r.m.s of value
Definition: StatEntity.cpp:92
GAUDI_API 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 338 of file StatEntity.cpp.

343 {
344  using namespace boost::io ;
345  if ( flag && effCounter ( name ) && 0 <= counter.eff() && 0 <= counter.effErr() )
346  {
347  boost::format fmt( format2 ) ;
348  fmt.exceptions ( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) ) ;
349  fmt
350  % ( "\"" + name + "\"" )
351  % counter.nEntries ()
352  % counter.sum ()
353  % ( counter.eff () * 100 )
354  % ( counter.effErr () * 100 ) ;
355  return fmt.str() ;
356  }
357  boost::format fmt ( format1 ) ;
358  fmt.exceptions ( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) ) ;
359  fmt
360  % ( "\"" + name + "\"" )
361  % counter.nEntries ()
362  % counter.sum ()
363  % counter.mean ()
364  % counter.rms ()
365  % counter.min ()
366  % counter.max () ;
367  return fmt.str() ;
368 }
double effErr() const
shortcut,
Definition: StatEntity.h:183
const double & max() const
maximal value
Definition: StatEntity.h:106
const unsigned long & nEntries() const
getters
Definition: StatEntity.h:92
const double & sum() const
accumulated value
Definition: StatEntity.h:94
double eff() const
shortcut,
Definition: StatEntity.h:181
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:119
double mean() const
mean value of counter
Definition: StatEntity.cpp:82
const double & min() const
minimal value
Definition: StatEntity.h:104
double rms() const
r.m.s of value
Definition: StatEntity.cpp:92
GAUDI_API 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 381 of file StatEntity.cpp.

387 {
388  using namespace boost::io ;
389  if ( flag && ( effCounter ( name ) || effCounter ( group ) )
390  && 0 <= counter.eff() && 0 <= counter.effErr() )
391  {
392  boost::format fmt( format2 ) ;
393  fmt.exceptions ( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) ) ;
394  fmt
395  % ( "\"" + name + ":" )
396  % ( ":" + group + "\"" )
397  % counter.nEntries ()
398  % counter.sum ()
399  % ( counter.eff () * 100 )
400  % ( counter.effErr () * 100 ) ;
401  return fmt.str() ;
402  }
403  boost::format fmt ( format1 ) ;
404  fmt.exceptions ( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) ) ;
405  fmt
406  % ( "\"" + name + ":" )
407  % ( ":" + group + "\"" )
408  % counter.nEntries ()
409  % counter.sum ()
410  % counter.mean ()
411  % counter.rms ()
412  % counter.min ()
413  % counter.max () ;
414  return fmt.str() ;
415 }
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:119
GAUDI_API 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 26 of file GetAlg.cpp.

28 {
29  return svc ? getAlgorithm ( svc->algorithms() , sel ) : nullptr;
30 }
GAUDI_API IAlgorithm * getAlgorithm(const IAlgContextSvc *svc, const AlgSelector &sel)
simple function to get the algorithm from Context Service
Definition: GetAlg.cpp:26
virtual const Algorithms & algorithms() const =0
get the stack of executed algorithms
GAUDI_API 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 36 of file GetAlg.cpp.

38 {
39  auto it = std::find_if( lst.rbegin(), lst.rend(), std::cref(sel));
40  return it != lst.rend() ? *it : nullptr ;
41 }
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 61 of file GetData.h.

62  {
63  DataObject *obj = nullptr;
64  // Return the casted pointer if the retrieve was successful or nullptr otherwise.
65  return service->retrieveObject(location, obj).isSuccess() ?
66  dynamic_cast<typename _GetType<TYPE>::return_type>(obj) :
67  nullptr;
68  }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
GAUDI_API 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 63 of file GetAlgs.cpp.

64 { return getAlg<GaudiAlgorithm> ( svc ) ; }
GAUDI_API 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 123 of file GetAlgs.cpp.

124 { return getAlg<GaudiSequencer> ( svc ) ; }
GAUDI_API 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 83 of file GetAlgs.cpp.

84 { return getAlg<GaudiHistoAlg> ( svc ) ; }
GAUDI_API 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 278 of file Property.cpp.

280 {
281  // trivial check
282  if ( !p ) { return nullptr ; } // RETURN
283  // get all properties
284  const auto& props = p->getProperties() ;
285  // comparison criteria:
286  auto ifound = std::find_if ( props.begin(), props.end(), is_iByName{ name } );
287  return ifound != props.end() ? *ifound : nullptr;
288 }
virtual const std::vector< Property * > & getProperties() const =0
Get list of properties.
GAUDI_API 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 309 of file Property.cpp.

310 {
311  // trivial check
312  if ( !p ) { return nullptr ; } // RETURN
313  // remove const-qualifier
314  IInterface* _i = const_cast<IInterface*>( p ) ;
315  if ( !_i ) { return nullptr ; } // RETURN
316  SmartIF<IProperty> property( _i ) ;
317  return property ? getProperty ( property , name ) : nullptr;
318 }
const char *PyHelper() getProperty(IInterface *p, char *name)
Definition: Bootstrap.cpp:258
Definition of the basic interface.
Definition: IInterface.h:234
GAUDI_API 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 375 of file Property.cpp.

377 {
378  // trivial check
379  if ( !p ) { return nullptr ; } // RETURN
380  auto ifound = std::find_if ( p->begin() , p->end() , is_iByName{ name } ) ;
381  return p->end() != ifound ? *ifound : nullptr ; // RETURN
382 }
GAUDI_API 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 163 of file GetAlgs.cpp.

164 {
165  if ( !svc ) { return nullptr ; } // RETURN
166  //
167  AlgTypeSelector<GaudiSequencer> sel1 ;
168  AlgTypeSelector<Sequencer> sel2 ;
169 
170  const auto& algs = svc->algorithms();
171  auto a = std::find_if( algs.rbegin(), algs.rend(),
172  [&](IAlgorithm* alg) { return sel1(alg) || sel2(alg); } );
173  return a!=algs.rend() ? *a : nullptr;
174 }
virtual const Algorithms & algorithms() const =0
get the stack of executed algorithms
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:23
GAUDI_API 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 142 of file GetAlgs.cpp.

143 { return getAlg<Sequencer> ( svc ) ; }
GAUDI_API 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 103 of file GetAlgs.cpp.

104 { return getAlg<GaudiTupleAlg> ( svc ) ; }
GAUDI_API 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 159 of file Property.cpp.

161 {
162  // delegate the actual work to another method ;
163  return p && getProperty ( p , name ) ;
164 }
const char *PyHelper() getProperty(IInterface *p, char *name)
Definition: Bootstrap.cpp:258
GAUDI_API 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 133 of file Property.cpp.

135 {
136  // delegate to another method after trivial check
137  return p && getProperty ( p , name ) ;
138 }
const char *PyHelper() getProperty(IInterface *p, char *name)
Definition: Bootstrap.cpp:258
GAUDI_API 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 344 of file Property.cpp.

346 {
347  // delegate to another method
348  return getProperty ( p , name ) ;
349 }
const char *PyHelper() getProperty(IInterface *p, char *name)
Definition: Bootstrap.cpp:258
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:245
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 1187 of file Property.h.

1191  {
1192  return component && hasProperty(component,name) ?
1193  Gaudi::Utils::setProperty ( component , name ,
1194  Gaudi::Utils::toString ( value ) , doc ) :
1196  }
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:1187
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:371
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
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:344
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 1087 of file Property.h.

1090  { return setProperty ( component , name , value , std::string() ) ; }
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Definition: Bootstrap.cpp:254
GAUDI_API 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 421 of file Property.cpp.

425 {
426  if ( !component ) { return StatusCode::FAILURE ; } // RETURN
427  if ( !hasProperty ( component , name ) ) { return StatusCode::FAILURE ; }
428  StatusCode sc = component -> setProperty ( name , value ) ;
429  if ( !doc.empty() )
430  {
431  Property* p = getProperty( component , name ) ;
432  if ( p ) { p -> setDocumentation ( doc ) ; }
433  }
434  sc.ignore() ;
435  return sc ;
436 }
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:159
const char *PyHelper() getProperty(IInterface *p, char *name)
Definition: Bootstrap.cpp:258
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Definition: Bootstrap.cpp:254
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:38
void ignore() const
Definition: StatusCode.h:108
GAUDI_API 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 399 of file Property.cpp.

403 {
404  return Gaudi::Utils::setProperty ( component , name , std::string{value} , doc ) ;
405 }
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:1187
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 1145 of file Property.h.

1149  {
1150  return component ? setProperty ( component , name ,
1151  std::string ( value , value + N ), doc )
1152  : StatusCode::FAILURE;
1153  }
int N
Definition: IOTest.py:90
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Definition: Bootstrap.cpp:254
GAUDI_API 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 461 of file Property.cpp.

465 {
466  if ( !component || !property ) return StatusCode::FAILURE ;
467  Property* p = getProperty ( component , name ) ;
468  if ( !p || !p->assign ( *property ) ) return StatusCode::FAILURE ;
469  if ( !doc.empty() ) { p->setDocumentation( doc ) ; }
470  return StatusCode::SUCCESS ;
471 }
virtual bool assign(const Property &source)=0
import the property value form the source
void setDocumentation(std::string documentation)
set the documentation string
Definition: Property.h:94
const char *PyHelper() getProperty(IInterface *p, char *name)
Definition: Bootstrap.cpp:258
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:38
GAUDI_API 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 496 of file Property.cpp.

500 { return setProperty ( component , name , &property , doc ) ; }
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Definition: Bootstrap.cpp:254
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 1276 of file Property.h.

1280  {
1281  return setProperty ( component , name , &value , doc ) ;
1282  }
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Definition: Bootstrap.cpp:254
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 1306 of file Property.h.

1310  {
1311  if ( !component ) { return StatusCode::FAILURE ; }
1312  auto property = SmartIF<IProperty>{ component } ;
1313  return property ? setProperty ( property , name , value , doc )
1314  : StatusCode::FAILURE;
1315  }
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Definition: Bootstrap.cpp:254
GAUDI_API 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 516 of file Property.cpp.

520 {
521  if ( !component ) { return StatusCode::FAILURE ; }
522  SmartIF<IProperty> property ( component ) ;
523  return property ? setProperty ( property , name , value , doc )
524  : StatusCode::FAILURE ;
525 }
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Definition: Bootstrap.cpp:254
GAUDI_API 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 541 of file Property.cpp.

545 {
546  return setProperty ( component , name , std::string{ value } , doc ) ;
547 }
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Definition: Bootstrap.cpp:254
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 1368 of file Property.h.

1372  {
1373  if ( 0 == component ) { return StatusCode::FAILURE ; }
1374  return setProperty ( component , name ,
1375  std::string{ value , value + N }, doc ) ;
1376  }
int N
Definition: IOTest.py:90
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Definition: Bootstrap.cpp:254
GAUDI_API 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 572 of file Property.cpp.

576 {
577  if ( !component ) { return StatusCode::FAILURE ; }
578  SmartIF<IProperty> prop ( component ) ;
579  if ( !prop ) { return StatusCode::FAILURE ; }
580  return setProperty ( prop , name , property , doc ) ;
581 }
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Definition: Bootstrap.cpp:254
GAUDI_API 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 606 of file Property.cpp.

610 { return setProperty ( component , name , &property , doc ) ; }
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Definition: Bootstrap.cpp:254
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 1457 of file Property.h.

1461  {
1462  return setProperty ( component , name , &value , doc ) ;
1463  }
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Definition: Bootstrap.cpp:254
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 319 of file ToStream.h.

325  {
326  using ref_t = typename std::iterator_traits<ITERATOR>::reference;
328  return ostream_joiner( s << open, first, last, delim,
329  [](std::ostream& os, ref_t i ) -> std::ostream&
330  { return toStream( i, os ); } ) << close;
331  }
Stream & ostream_joiner(Stream &os, Iterator first, Iterator last, Separator sep, OutputElement output=OutputElement{})
Definition: SerializeSTL.h:35
std::ostream & toStream(const std::tuple< Args...> &tuple, std::ostream &s)
the helper function to print the tuple
Definition: ToStream.h:358
string s
Definition: gaudirun.py:245
list i
Definition: ana.py:128
TO * reference(FROM *from)
Definition: KeyedObject.cpp:20
GAUDI_API 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 303 of file ToStream.h.

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

printout of class std::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 50 of file StdArrayAsProperty.h.

51  {
52  return toStream
53  ( obj.begin () , obj.end () , s , " ( " , " )" , " , " ) ;
54  }
std::ostream & toStream(const std::array< TYPE, N > &obj, std::ostream &s)
printout of class std::array The format is "Python's tuple"
string s
Definition: gaudirun.py:245
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 51 of file BoostArrayAsProperty.h.

52  {
53  return toStream
54  ( obj.begin () , obj.end () , s , "( " , " )" , " , " ) ;
55  }
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:245
GAUDI_API 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 ) ; }
GAUDI_API 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 77 of file ToStream.h.

78  {
79  auto c = ( std::string::npos == obj.find('\'') ? '\'' : '\"' );
80  return s << c << obj << c;
81  }
tuple c
Definition: gaudirun.py:391
string s
Definition: gaudirun.py:245
template<class SCALAR >
std::ostream & Gaudi::Utils::toStream ( const SCALAR &  ,
std::ostream &   
)
GAUDI_API std::ostream & Gaudi::Utils::toStream ( const DataHandle v,
std::ostream &  o 
)

Definition at line 32 of file DataHandle.cpp.

33  {
34  o << "'" << v.objKey() << "'";
35  return o;
36  }
virtual const std::string & objKey() const
Definition: DataHandle.h:40
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 85 of file SVectorAsProperty.h.

86  {
87  s << "( ";
88  for ( auto cur = obj.begin() ; obj.end() != cur ; ++cur )
89  {
90  if ( obj.begin() != cur ) { s << " , "; }
91  toStream ( *cur , s ) ;
92  }
93  return s << " )";
94  }
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:245
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 87 of file ToStream.h.

88  { return s << ( obj ? "True" : "False" ) ; }
string s
Definition: gaudirun.py:245
GAUDI_API 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 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 94 of file ToStream.h.

95  {
96  const int p = s.precision() ;
97  return s << std::setprecision ( prec ) << obj << std::setprecision ( p ) ;
98  }
string s
Definition: gaudirun.py:245
GAUDI_API 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  auto root = Gaudi::Utils::Aida2ROOT::aida2root ( &histo ) ;
233  return root ? toStream ( *root , stream , asXML ) : stream ;
234 }
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:319
static TH1D * aida2root(AIDA::IHistogram1D *aida)
get the underlying pointer for 1D-histogram
Definition: Aida2ROOT.cpp:72
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 104 of file ToStream.h.

105  {
106  const int p = s.precision() ;
107  return s << std::setprecision ( prec ) << obj << std::setprecision ( p ) ;
108  }
string s
Definition: gaudirun.py:245
GAUDI_API 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 243 of file Histo2String.cpp.

246 {
247  //
248  auto root = Gaudi::Utils::Aida2ROOT::aida2root ( &histo ) ;
249  return root ? toStream ( *root , stream , asXML ) : stream;
250 }
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:319
static TH1D * aida2root(AIDA::IHistogram1D *aida)
get the underlying pointer for 1D-histogram
Definition: Aida2ROOT.cpp:72
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 114 of file ToStream.h.

115  {
116  const int p = s.precision() ;
117  return s << std::setprecision ( prec ) << obj << std::setprecision ( p ) ;
118  }
string s
Definition: gaudirun.py:245
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 129 of file ToStream.h.

130  {
131  return toStream( obj.second,
132  toStream( obj.first, s << "( " ) << " , " )
133  << " )" ;
134  }
std::ostream & toStream(const std::tuple< Args...> &tuple, std::ostream &s)
the helper function to print the tuple
Definition: ToStream.h:358
string s
Definition: gaudirun.py:245
GAUDI_API std::ostream & Gaudi::Utils::toStream ( const DataObjID v,
std::ostream &  o 
)

Definition at line 145 of file DataObjIDProperty.cpp.

145  {
146  if (v.clid() == 0) {
147  o << "'" << v.key() << "'";
148  } else {
149  o << "(" << v.clid() << ",'" << v.key() << "')";
150  }
151  return o;
152  }
CLID clid() const
Definition: DataObjID.h:54
const std::string & key() const
Definition: DataObjID.h:49
GAUDI_API std::ostream & Gaudi::Utils::toStream ( const DataObjIDColl v,
std::ostream &  o 
)

Definition at line 155 of file DataObjIDProperty.cpp.

155  {
156  o << "[";
157  for (auto &i : v) {
158  toStream(i,o);
159  o << ",";
160  }
161  o << "]";
162  return o;
163  }
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:319
list i
Definition: ana.py:128
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 144 of file ToStream.h.

145  {
146  return toStream ( obj.begin() , obj.end () , s , "[ " , " ]" , " , " ) ;
147  }
std::ostream & toStream(const std::tuple< Args...> &tuple, std::ostream &s)
the helper function to print the tuple
Definition: ToStream.h:358
string s
Definition: gaudirun.py:245
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 157 of file ToStream.h.

158  {
159  return toStream ( obj.begin() , obj.end () , s , "[ " , " ]" , " , " ) ;
160  }
std::ostream & toStream(const std::tuple< Args...> &tuple, std::ostream &s)
the helper function to print the tuple
Definition: ToStream.h:358
string s
Definition: gaudirun.py:245
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 170 of file ToStream.h.

171  {
172  return toStream ( obj.begin() , obj.end () , s , "[ " , " ]" , " , " ) ;
173  }
std::ostream & toStream(const std::tuple< Args...> &tuple, std::ostream &s)
the helper function to print the tuple
Definition: ToStream.h:358
string s
Definition: gaudirun.py:245
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 184 of file ToStream.h.

185  {
187  return ostream_joiner( s << "{ ", obj, " , ",
188  [](std::ostream& os, const std::pair<const KTYPE,VTYPE>& i)
189  -> std::ostream&
190  { return toStream( i.second, toStream( i.first, os ) << " : " ); }
191  ) << " }";
192  }
Stream & ostream_joiner(Stream &os, Iterator first, Iterator last, Separator sep, OutputElement output=OutputElement{})
Definition: SerializeSTL.h:35
std::ostream & toStream(const std::tuple< Args...> &tuple, std::ostream &s)
the helper function to print the tuple
Definition: ToStream.h:358
string s
Definition: gaudirun.py:245
list i
Definition: ana.py:128
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 204 of file ToStream.h.

205  {
207  return ostream_joiner( s << "{ ", obj, " , ",
208  [](std::ostream& os, const std::pair<const KTYPE,VTYPE>& i )
209  -> std::ostream&
210  { return toStream( i.second, toStream( i.first, os ) << " : " ); }
211  ) << " }";
212  }
Stream & ostream_joiner(Stream &os, Iterator first, Iterator last, Separator sep, OutputElement output=OutputElement{})
Definition: SerializeSTL.h:35
std::ostream & toStream(const std::tuple< Args...> &tuple, std::ostream &s)
the helper function to print the tuple
Definition: ToStream.h:358
string s
Definition: gaudirun.py:245
list i
Definition: ana.py:128
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 224 of file ToStream.h.

225  {
227  return ostream_joiner( s << "{ ", obj, " , " ,
228  [](std::ostream& s, const std::pair<const KTYPE,VTYPE>& i )
229  -> std::ostream&
230  { return toStream( i.second, toStream( i.first, s ) << " : " ) ; }
231  ) << " }";
232  }
Stream & ostream_joiner(Stream &os, Iterator first, Iterator last, Separator sep, OutputElement output=OutputElement{})
Definition: SerializeSTL.h:35
std::ostream & toStream(const std::tuple< Args...> &tuple, std::ostream &s)
the helper function to print the tuple
Definition: ToStream.h:358
string s
Definition: gaudirun.py:245
list i
Definition: ana.py:128
GAUDI_API std::ostream & Gaudi::Utils::toStream ( const Gaudi::XYZPoint obj,
std::ostream &  s 
)

print XYZ point

Definition at line 130 of file ParsersVct.cpp.

131 {
132  s << "( " ;
133  toStream ( obj.X () , s ) ;
134  s << " , " ;
135  toStream ( obj.Y () , s ) ;
136  s << " , " ;
137  toStream ( obj.Z () , s ) ;
138  s << " )" ;
139  return s ;
140 }
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:319
string s
Definition: gaudirun.py:245
GAUDI_API std::ostream & Gaudi::Utils::toStream ( const Gaudi::XYZVector obj,
std::ostream &  s 
)

print XYZ vector

Definition at line 145 of file ParsersVct.cpp.

146 {
147  s << "( " ;
148  toStream ( obj.X () , s ) ;
149  s << " , " ;
150  toStream ( obj.Y () , s ) ;
151  s << " , " ;
152  toStream ( obj.Z () , s ) ;
153  s << " )" ;
154 
155  return s ;
156 }
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:319
string s
Definition: gaudirun.py:245
GAUDI_API std::ostream & Gaudi::Utils::toStream ( const Gaudi::LorentzVector obj,
std::ostream &  s 
)

print Lorentz vector

Definition at line 161 of file ParsersVct.cpp.

162 {
163 
164  s << "( " ;
165  toStream ( obj.Px () , s , 12 ) ;
166  s << " , " ;
167  toStream ( obj.Py () , s , 12 ) ;
168  s << " , " ;
169  toStream ( obj.Pz () , s , 13 ) ;
170  s << " , " ;
171  toStream ( obj.E () , s , 14 ) ;
172  s << " )" ;
173 
174  return s ;
175 }
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:319
string s
Definition: gaudirun.py:245
GAUDI_API 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 69 of file StringKey.cpp.

70 { 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:319
string s
Definition: gaudirun.py:245
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 244 of file ToStream.h.

245  {
247  return ostream_joiner( s << "{ ", obj, " , ",
248  [](std::ostream& os, const std::pair<const KTYPE,VTYPE>& p)
249  -> std::ostream&
250  { return toStream( p.second, toStream( p.first, os) << " : " ); }
251  ) << " }";
252  }
Stream & ostream_joiner(Stream &os, Iterator first, Iterator last, Separator sep, OutputElement output=OutputElement{})
Definition: SerializeSTL.h:35
std::ostream & toStream(const std::tuple< Args...> &tuple, std::ostream &s)
the helper function to print the tuple
Definition: ToStream.h:358
string s
Definition: gaudirun.py:245
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.f.nl
Date
2009-10-05

Definition at line 259 of file ToStream.h.

260  {
261  return toStream ( obj , obj + N , s , "( " , " )" , " , " ) ;
262  }
std::ostream & toStream(const std::tuple< Args...> &tuple, std::ostream &s)
the helper function to print the tuple
Definition: ToStream.h:358
int N
Definition: IOTest.py:90
string s
Definition: gaudirun.py:245
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.f.nl
Date
2009-10-05

Definition at line 269 of file ToStream.h.

270  {
271  return toStream ( obj , obj + N , s , "( " , " )" , " , " ) ;
272  }
std::ostream & toStream(const std::tuple< Args...> &tuple, std::ostream &s)
the helper function to print the tuple
Definition: ToStream.h:358
int N
Definition: IOTest.py:90
string s
Definition: gaudirun.py:245
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.f.nl
Date
2009-10-05

Definition at line 279 of file ToStream.h.

280  { return toStream ( std::string ( obj , obj+N ) , s ) ; }
std::ostream & toStream(const std::tuple< Args...> &tuple, std::ostream &s)
the helper function to print the tuple
Definition: ToStream.h:358
int N
Definition: IOTest.py:90
string s
Definition: gaudirun.py:245
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.f.nl
Date
2009-10-05

Definition at line 287 of file ToStream.h.

288  { return toStream ( std::string ( obj , obj+N ) , s ) ; }
std::ostream & toStream(const std::tuple< Args...> &tuple, std::ostream &s)
the helper function to print the tuple
Definition: ToStream.h:358
int N
Definition: IOTest.py:90
string s
Definition: gaudirun.py:245
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.f.nl
Date
2009-10-05

Definition at line 294 of file ToStream.h.

295  { return toStream ( std::string ( obj ) , s ) ; }
std::ostream & toStream(const std::tuple< Args...> &tuple, std::ostream &s)
the helper function to print the tuple
Definition: ToStream.h:358
string s
Definition: gaudirun.py:245
template<typename... Args>
std::ostream & Gaudi::Utils::toStream ( const std::tuple< Args...> &  tuple,
std::ostream &  s 
)
inline

the helper function to print the tuple

Parameters
tulpe(INPUT) tuple
Returns
the stream
Author
Aleander Mazurov alexa.nosp@m.nder.nosp@m..mazu.nosp@m.rov@.nosp@m.cern..nosp@m.ch
Date
2015-03-21

Definition at line 358 of file ToStream.h.

358  {
359  return TuplePrinter<decltype(tuple), sizeof...(Args)>::toStream(tuple, s << " ( ")<< " ) ";
360  }
std::ostream & toStream(const std::tuple< Args...> &tuple, std::ostream &s)
the helper function to print the tuple
Definition: ToStream.h:358
string s
Definition: gaudirun.py:245
GAUDI_API 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 261 of file Histo2String.cpp.

263 {
264  std::ostringstream o ;
265  toStream ( histo , o , asXML ) ;
266  return o.str() ;
267 }
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:319
GAUDI_API 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 295 of file Histo2String.cpp.

297 {
298  std::ostringstream o ;
299  toStream ( histo , o , asXML ) ;
300  return o.str() ;
301 }
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:319
GAUDI_API 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 278 of file Histo2String.cpp.

280 {
281  std::ostringstream o ;
282  toStream ( histo , o , asXML ) ;
283  return o.str() ;
284 }
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:319
GAUDI_API 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 312 of file Histo2String.cpp.

314 {
315  std::ostringstream o ;
316  toStream ( histo , o , asXML ) ;
317  return o.str() ;
318 }
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:319
GAUDI_API 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 329 of file Histo2String.cpp.

331 {
332  std::ostringstream o ;
333  toStream ( histo , o , asXML ) ;
334  return o.str() ;
335 }
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:319
GAUDI_API 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 346 of file Histo2String.cpp.

348 {
349  std::ostringstream o ;
350  toStream ( histo , o , asXML ) ;
351  return o.str() ;
352 }
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:319
GAUDI_API 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 362 of file Histo2String.cpp.

363 {
364  return histo ? toString ( *histo ) : "{}";
365 }
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:371
GAUDI_API 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 375 of file Histo2String.cpp.

376 {
377  return histo ? toString ( *histo ) : "{}";
378 }
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:371
GAUDI_API 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 388 of file Histo2String.cpp.

389 {
390  return histo ? toString ( *histo ) : "{}";
391 }
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:371
GAUDI_API 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 414 of file Histo2String.cpp.

415 {
416  return histo ? toString ( *histo ) : "{}";
417 }
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:371
GAUDI_API 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 401 of file Histo2String.cpp.

402 {
403  return histo ? toString ( *histo ) : "{}";
404 }
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:371
GAUDI_API 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 427 of file Histo2String.cpp.

428 {
429  return histo ? toString ( *histo ) : "{}";
430 }
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:371
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
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 371 of file ToStream.h.

372  {
373  std::ostringstream s;
374  std::ios::fmtflags orig_flags = s.flags();
375  s.setf(std::ios::showpoint); // to display correctly floats
376  toStream ( obj , s);
377  s.flags(orig_flags);
378  return s.str();
379  }
std::ostream & toStream(const std::tuple< Args...> &tuple, std::ostream &s)
the helper function to print the tuple
Definition: ToStream.h:358
string s
Definition: gaudirun.py:245