| The Gaudi Framework v29r1 (5cd95fa2)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

GaudiHistoID.cpp
Go to the documentation of this file.
1 // ============================================================================
2 /* @file gaudiHistoID.cpp
3 *
4 * Implementation file for class GaudiAlg::ID
5 *
6 * @author Chris Jones Christopher.Rob.Jones@cern.ch
7 * @date 03/02/2006
8 */
9 // ============================================================================
10 // Include Files
11 // ============================================================================
12 // STD & STL
13 // ============================================================================
14 #include <sstream>
15 // ============================================================================
16 // local
17 // ============================================================================
18 #include "GaudiAlg/GaudiHistoID.h"
19 // ============================================================================
20 GaudiAlg::ID::LiteralID GaudiAlg::ID::idAsString() const
21 {
22 std::ostringstream s;
23 fillStream( s );
24 return s.str();
25 }
26 // ============================================================================
27 // Operator overloading for ostream
28 // ============================================================================
29 std::ostream& GaudiAlg::ID::fillStream( std::ostream& s ) const
30 {
31 if ( numeric() ) {
32 s << numericID();
33 } else if ( literal() ) {
34 s << literalID();
35 } else {
36 s << "UNDEFINED";
37 }
38 return s;
39 }
40 // ============================================================================
41 // The END
42 // ============================================================================
GaudiAlg::ID::fillStream
GAUDI_API std::ostream & fillStream(std::ostream &s) const
Definition: GaudiHistoID.cpp:29
GaudiAlg::ID::numericID
NumericID numericID() const noexcept
Returns the numerical ID.
Definition: GaudiHistoID.h:74
std::string
STL class.
std::ostringstream
STL class.
GaudiAlg::ID::literal
bool literal() const noexcept
Is this ID numeric.
Definition: GaudiHistoID.h:68
std::ostringstream::str
T str(T...args)
GaudiHistoID.h
GaudiAlg::ID::literalID
const LiteralID & literalID() const noexcept
Returns the ID as a LiteralID.
Definition: GaudiHistoID.h:72
GaudiAlg::ID::idAsString
GAUDI_API LiteralID idAsString() const
Return ID as string, for both numeric and literal IDs.
Definition: GaudiHistoID.cpp:20
gaudirun.s
string s
Definition: gaudirun.py:253
GaudiAlg::ID::numeric
bool numeric() const noexcept
Is this ID numeric.
Definition: GaudiHistoID.h:66
std::ostream
STL class.