Gaudi Framework, version v24r2

Home   Generated: Wed Dec 4 2013
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GaudiHistoID.cpp
Go to the documentation of this file.
1 // $Id:$
2 // ============================================================================
3 /* @file gaudiHistoID.cpp
4  *
5  * Implementation file for class GaudiAlg::ID
6  *
7  * $Id: GaudiHistoID.cpp,v 1.1 2006/03/09 14:50:22 hmd Exp $
8  *
9  * @author Chris Jones Christopher.Rob.Jones@cern.ch
10  * @date 03/02/2006
11  */
12 // ============================================================================
13 // Include Files
14 // ============================================================================
15 // STD & STL
16 // ============================================================================
17 #include <sstream>
18 // ============================================================================
19 // local
20 // ============================================================================
21 #include "GaudiAlg/GaudiHistoID.h"
22 // ============================================================================
23 // Boost
24 // ============================================================================
25 #include "boost/functional/hash.hpp"
26 // ============================================================================
27 // Implicit constructor from a numeric ID
28 // ============================================================================
30  : m_nID ( id )
31  , m_aID ( "" )
32  , m_hash ( boost::hash_value ( id ) )
33 {}
34 // ============================================================================
35 // Implicit constructor from a literal ID
36 // ============================================================================
38  : m_nID ( -1 )
39  , m_aID ( id )
40  , m_hash ( boost::hash_value ( id ) )
41 {}
42 // ============================================================================
43 // Implicit constructor from a literal ID
44 // ============================================================================
45 GaudiAlg::ID::ID ( const char* id )
46  : m_nID ( -1 )
47  , m_aID ( id )
48  , m_hash ( 0 )
49 { m_hash = boost::hash_value ( m_aID ) ; }
50 // ============================================================================
52 {
54  fillStream ( s ) ;
55  return s.str() ;
56 }
57 // ============================================================================
58 // Operator overloading for ostream
59 // ============================================================================
61 {
62  if ( numeric() ) { s << numericID() ; }
63  else if ( literal() ) { s << literalID() ; }
64  else { s << "UNDEFINED" ; }
65  return s ;
66 }
67 // ============================================================================
68 // The END
69 // ============================================================================

Generated at Wed Dec 4 2013 14:33:07 for Gaudi Framework, version v24r2 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004