| The Gaudi Framework v28r2p1 (f1a77ff4)

- 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() ) { s << numericID() ; }
32 else if ( literal() ) { s << literalID() ; }
33 else { s << "UNDEFINED" ; }
34 return s ;
35 }
36 // ============================================================================
37 // The END
38 // ============================================================================
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:82
std::string
STL class.
std::ostringstream
STL class.
GaudiAlg::ID::literal
bool literal() const noexcept
Is this ID numeric.
Definition: GaudiHistoID.h:76
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:80
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:245
GaudiAlg::ID::numeric
bool numeric() const noexcept
Is this ID numeric.
Definition: GaudiHistoID.h:74
std::ostream
STL class.