ATLAS Offline Software
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"
13 
14 class HWIdentifier32 : public Identifier32 {
15 
16 public:
17 
19  HWIdentifier32 ();
20 
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 
37 {}
38 
41 {}
42 
45 {}
46 
47 inline HWIdentifier32::HWIdentifier32(unsigned long long value)
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 
68  : Identifier32::Identifier32(old.get_identifier32().get_compact())
69 { }
70 
71 #endif // IDENTIFIER_HWIDENTIFIER32_H
Identifier32
Definition: Identifier32.h:25
Identifier32::operator=
Identifier32 & operator=(const Identifier32 &other)=default
Assignment.
athena.value
value
Definition: athena.py:122
HWIdentifier32
Definition: HWIdentifier32.h:14
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
HWIdentifier32::HWIdentifier32
HWIdentifier32()
Default constructor.
Definition: HWIdentifier32.h:35
CSV_InDetExporter.old
old
Definition: CSV_InDetExporter.py:145
value_type
Definition: EDM_MasterSearch.h:11
Identifier32.h