ATLAS Offline Software
Loading...
Searching...
No Matches
Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/Identifier/Identifier.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef IdentifierStandAlone
6#define IdentifierStandAlone
7
8// Not really sure why this is needed.
9// If it isn't there, then we get
10// error: 'Long64_t' does not name a type
11// in Identifier.h, only I haven't changed that.
12// Some dependancy isn't defined quite right.
13#include <RtypesCore.h>
14
15class Identifier
16{
17 public:
18 typedef Long64_t value_type;
19
20 typedef enum bit_defs_enum
21 {
22 NBITS = sizeof(value_type) * 8, // bits per byte
23 MAX_BIT = (static_cast<value_type>(1) << (NBITS - 1)),
24 ALL_BITS = ~(static_cast<value_type>(0))
25 } bit_defs;
26
27 typedef enum max_value_type_enum {
28 //max_value = 0xFFFFFFFFFFFFFFFFULL
29 max_value = ~(static_cast<value_type>(0))
30 } max_value_type;
31
33 Identifier(const Identifier& value) = default;
34 Identifier(value_type value):m_id(value) {};
35
36 operator value_type() const { return m_id; }
37
38 Identifier& operator = (const Identifier& old) = default;
39 Identifier& operator = (value_type value) {m_id=value;return (*this);};
40 bool operator == (const Identifier& other) const {return (m_id == other.m_id);}
41 bool operator != (const Identifier& other) const {return (m_id != other.m_id);}
42 bool operator < (const Identifier& other) const {return (m_id < other.m_id);}
43 bool operator > (const Identifier& other) const {return (m_id > other.m_id);}
44 bool operator <= (const Identifier& other) const {return (m_id <= other.m_id);}
45 bool operator >= (const Identifier& other) const {return (m_id >= other.m_id);}
46 bool operator == (Identifier::value_type other) const {return (m_id == other);}
47 bool operator != (Identifier::value_type other) const {return (m_id != other);}
48
49 protected:
50 value_type m_id;
51
52};
53
54#endif
55
bool operator!=(const DataVector< T > &a, const DataVector< T > &b)
Based on operator==.
bool operator>(const DataVector< T > &a, const DataVector< T > &b)
Based on operator<.
bool operator<=(const DataVector< T > &a, const DataVector< T > &b)
Based on operator<.
bool operator>=(const DataVector< T > &a, const DataVector< T > &b)
Based on operator<.
bool operator<(const DataVector< T > &a, const DataVector< T > &b)
Vector ordering relation.
bool operator==(const DataVector< T > &a, const DataVector< T > &b)
Vector equality comparison.
Identifier(const Identifier &value)=default