Gaudi Framework, version v25r2
Home
Generated: Wed Jun 4 2014
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
.cern.ch
sw
Gaudi
releases
GAUDI
GAUDI_v25r2
GaudiAlg
src
lib
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
// ============================================================================
29
GaudiAlg::ID::ID
(
const
GaudiAlg::ID::NumericID
id
)
30
: m_nID ( id )
31
, m_aID (
""
)
32
, m_hash ( boost::
hash_value
( id ) )
33
{}
34
// ============================================================================
35
// Implicit constructor from a literal ID
36
// ============================================================================
37
GaudiAlg::ID::ID
(
const
GaudiAlg::ID::LiteralID
&
id
)
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
// ============================================================================
51
GaudiAlg::ID::LiteralID
GaudiAlg::ID::idAsString
()
const
52
{
53
std::ostringstream
s
;
54
fillStream ( s ) ;
55
return
s.str() ;
56
}
57
// ============================================================================
58
// Operator overloading for ostream
59
// ============================================================================
60
std::ostream&
GaudiAlg::ID::fillStream
( std::ostream&
s
)
const
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 Jun 4 2014 14:48:55 for Gaudi Framework, version v25r2 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004