Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 // ============================================================================
22  fillStream( s );
23  return s.str();
24 }
25 // ============================================================================
26 // Operator overloading for ostream
27 // ============================================================================
29  if ( numeric() ) {
30  s << numericID();
31  } else if ( literal() ) {
32  s << literalID();
33  } else {
34  s << "UNDEFINED";
35  }
36  return s;
37 }
38 // ============================================================================
39 // The END
40 // ============================================================================
GAUDI_API std::ostream & fillStream(std::ostream &s) const
NumericID numericID() const noexcept
Returns the numerical ID.
Definition: GaudiHistoID.h:72
STL class.
bool literal() const noexcept
Is this ID numeric.
Definition: GaudiHistoID.h:66
const LiteralID & literalID() const noexcept
Returns the ID as a LiteralID.
Definition: GaudiHistoID.h:70
GAUDI_API LiteralID idAsString() const
Return ID as string, for both numeric and literal IDs.
string s
Definition: gaudirun.py:312
bool numeric() const noexcept
Is this ID numeric.
Definition: GaudiHistoID.h:64
STL class.