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() ) { s << numericID() ; }
32  else if ( literal() ) { s << literalID() ; }
33  else { s << "UNDEFINED" ; }
34  return s ;
35 }
36 // ============================================================================
37 // The END
38 // ============================================================================
GAUDI_API std::ostream & fillStream(std::ostream &s) const
NumericID numericID() const noexcept
Returns the numerical ID.
Definition: GaudiHistoID.h:82
STL class.
bool literal() const noexcept
Is this ID numeric.
Definition: GaudiHistoID.h:76
const LiteralID & literalID() const noexcept
Returns the ID as a LiteralID.
Definition: GaudiHistoID.h:80
GAUDI_API LiteralID idAsString() const
Return ID as string, for both numeric and literal IDs.
string s
Definition: gaudirun.py:245
bool numeric() const noexcept
Is this ID numeric.
Definition: GaudiHistoID.h:74
STL class.