The Gaudi Framework  v29r0 (ff2e7097)
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 // ============================================================================
21 {
23  fillStream( s );
24  return s.str();
25 }
26 // ============================================================================
27 // Operator overloading for ostream
28 // ============================================================================
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 // ============================================================================
GAUDI_API std::ostream & fillStream(std::ostream &s) const
NumericID numericID() const noexcept
Returns the numerical ID.
Definition: GaudiHistoID.h:74
STL class.
bool literal() const noexcept
Is this ID numeric.
Definition: GaudiHistoID.h:68
const LiteralID & literalID() const noexcept
Returns the ID as a LiteralID.
Definition: GaudiHistoID.h:72
GAUDI_API LiteralID idAsString() const
Return ID as string, for both numeric and literal IDs.
string s
Definition: gaudirun.py:253
bool numeric() const noexcept
Is this ID numeric.
Definition: GaudiHistoID.h:66
STL class.