ATLAS Offline Software
Loading...
Searching...
No Matches
LArCalorimeter
LArBadChannelTool
LArBadChannelTool
HWIdentifier32.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
//<doc><file> $Id: HWIdentifier32.h,v 1.3 2004-02-24 13:52:15 schaffer Exp $
6
//<version> $Name: not supported by cvs2svn $
7
8
#ifndef IDENTIFIER_HWIDENTIFIER32_H
9
# define IDENTIFIER_HWIDENTIFIER32_H
10
11
#include "Identifier/Identifier.h"
12
#include "
Identifier/Identifier32.h
"
13
14
class
HWIdentifier32
:
public
Identifier32
{
15
16
public
:
17
19
HWIdentifier32
();
20
22
explicit
HWIdentifier32
(
value_type
value);
23
25
explicit
HWIdentifier32
(
const
Identifier32
& old);
26
28
explicit
HWIdentifier32
(
unsigned
long
long
value);
29
31
explicit
HWIdentifier32
(
const
Identifier
& old);
32
};
33
34
35
inline
HWIdentifier32::HWIdentifier32
()
36
:
Identifier32
::
Identifier32
()
37
{}
38
39
inline
HWIdentifier32::HWIdentifier32
(
value_type
value)
40
:
Identifier32
::
Identifier32
(value)
41
{}
42
43
inline
HWIdentifier32::HWIdentifier32
(
const
Identifier32
& old)
44
:
Identifier32
::
Identifier32
(old)
45
{}
46
47
inline
HWIdentifier32::HWIdentifier32
(
unsigned
long
long
value)
48
:
Identifier32
::
Identifier32
()
49
{
50
bool
hi = (value >> 32);
51
bool
lo = (value << 32);
52
if
(hi && lo)
return
;
// full 64-bit identifier, so return invalid
53
//if (hi) m_id = (static_cast<value_type>(value >> 32));
54
//else if (lo) m_id = (static_cast<value_type>(value));
55
if
(hi) {
56
const
HWIdentifier32
myid(value >> 32);
57
this->operator=(myid);
58
}
else
if
(lo) {
59
const
HWIdentifier32
myid(value);
60
this->operator=(myid);
61
}
else
{
62
const
HWIdentifier32
myid(
static_cast<
value_type
>
(0));
63
this->operator=(myid);
64
}
65
}
66
67
inline
HWIdentifier32::HWIdentifier32
(
const
Identifier
& old)
68
:
Identifier32
::
Identifier32
(old.get_identifier32().
get_compact
())
69
{ }
70
71
#endif
// IDENTIFIER_HWIDENTIFIER32_H
Identifier32.h
HWIdentifier32::HWIdentifier32
HWIdentifier32()
Default constructor.
Definition
HWIdentifier32.h:35
Identifier32::get_compact
value_type get_compact() const
Get the compact id.
Definition
Identifier32.h:44
Identifier32::Identifier32
Identifier32()=default
Identifier32::value_type
unsigned int value_type
Definition
Identifier32.h:28
Identifier
Definition
IdentifierFieldParser.cxx:14
Generated on
for ATLAS Offline Software by
1.14.0