The Gaudi Framework  v40r0 (475e45c1)
CustomPropertiesAlg.cpp File Reference
#include "CustomPropertiesAlg.h"
#include <string>
#include <unordered_map>
#include <Gaudi/Parsers/Factory.h>
#include <GaudiKernel/ToStream.h>
#include <map>
Include dependency graph for CustomPropertiesAlg.cpp:

Go to the source code of this file.

Classes

struct  Gaudi::Parsers::Grammar_< Iterator, MyCustomType, Skipper >
 

Namespaces

 Gaudi
 This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from python with a format liks : ( nbins, min, max, title ) where title can be ommited.
 
 Gaudi::Parsers
 
 Gaudi::TestSuite
 

Typedefs

typedef std::unordered_map< std::string, std::string > MyCustomType
 

Functions

StatusCode Gaudi::Parsers::parse (MyCustomType &result, std::string_view input)
 
ostream & std::operator<< (ostream &s, const MyCustomType &m)
 

Typedef Documentation

◆ MyCustomType

typedef std::unordered_map<std::string, std::string> MyCustomType

Definition at line 20 of file CustomPropertiesAlg.cpp.

Function Documentation

◆ operator<<()

ostream& std::operator<< ( ostream &  s,
const MyCustomType m 
)

Definition at line 47 of file CustomPropertiesAlg.cpp.

47  {
48  bool first = true;
49  s << '{';
50  // this is not strictly needed, but it makes the output sorted, which is
51  // always nice (in particular for tests)
52  const map<string, string> m1( m.begin(), m.end() );
53  for ( const auto& i : m1 ) {
54  if ( first )
55  first = false;
56  else
57  s << ", ";
58  Gaudi::Utils::toStream( i.first, s ) << ": ";
59  Gaudi::Utils::toStream( i.second, s );
60  }
61  s << '}';
62  return s;
63  }
gaudirun.s
string s
Definition: gaudirun.py:346
Gaudi::Units::m
constexpr double m
Definition: SystemOfUnits.h:107
Gaudi::Utils::toStream
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:304