ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
HitManagement
HitManagement
HitIdHelper.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef HITMANAGEMENT_HitIdHelper_H
6
#define HITMANAGEMENT_HitIdHelper_H
7
8
#include <string>
9
#include <vector>
10
11
typedef
int
HitID
;
12
13
struct
IdField
{
14
std::string
fieldName
;
15
int
vMin
= 0;
16
int
vMax
= 0;
17
int
nBits
= 0;
18
int
firstBit
= 0;
19
};
20
21
typedef
std::vector<IdField>
IdFields
;
22
23
class
HitIdHelper
{
24
public
:
25
HitIdHelper
():
m_currentStorage
(0) {}
26
virtual
~HitIdHelper
() {}
27
void
InitializeField
(
const
std::string& n,
int
vmn,
int
vmx);
28
void
InitializeField
(
const
std::string& n,
int
nb);
29
void
SetFieldValue
(
const
std::string& name,
int
n,
HitID
& targetID)
const
;
30
int
GetFieldValue
(
const
std::string& name,
HitID
targetID)
const
;
31
void
PrintFields
();
32
static
void
Print
(
int
id
);
33
protected
:
34
IdFields
m_IDs
;
35
int
m_currentStorage
;
36
static
void
SetBit
(
int
& i,
int
bitpos) ;
37
static
void
UnsetBit
(
int
& i,
int
bitpos) ;
38
static
void
Store
(
int
&
id
,
int
value,
int
first,
int
field) ;
39
static
int
Retrieve
(
int
id
,
int
first,
int
field) ;
40
};
41
42
#endif
HitID
int HitID
Definition
GenericMuonSimHit.h:13
IdFields
std::vector< IdField > IdFields
Definition
HitIdHelper.h:21
HitIdHelper::GetFieldValue
int GetFieldValue(const std::string &name, HitID targetID) const
Definition
HitIdHelper.cxx:47
HitIdHelper::UnsetBit
static void UnsetBit(int &i, int bitpos)
Definition
HitIdHelper.cxx:88
HitIdHelper::Print
static void Print(int id)
Definition
HitIdHelper.cxx:72
HitIdHelper::Store
static void Store(int &id, int value, int first, int field)
Definition
HitIdHelper.cxx:96
HitIdHelper::m_IDs
IdFields m_IDs
Definition
HitIdHelper.h:34
HitIdHelper::Retrieve
static int Retrieve(int id, int first, int field)
Definition
HitIdHelper.cxx:105
HitIdHelper::m_currentStorage
int m_currentStorage
Definition
HitIdHelper.h:35
HitIdHelper::PrintFields
void PrintFields()
Definition
HitIdHelper.cxx:62
HitIdHelper::~HitIdHelper
virtual ~HitIdHelper()
Definition
HitIdHelper.h:26
HitIdHelper::SetBit
static void SetBit(int &i, int bitpos)
Definition
HitIdHelper.cxx:82
HitIdHelper::HitIdHelper
HitIdHelper()
Definition
HitIdHelper.h:25
HitIdHelper::InitializeField
void InitializeField(const std::string &n, int vmn, int vmx)
Definition
HitIdHelper.cxx:10
HitIdHelper::SetFieldValue
void SetFieldValue(const std::string &name, int n, HitID &targetID) const
Definition
HitIdHelper.cxx:30
IdField
Definition
HitIdHelper.h:13
IdField::vMin
int vMin
Definition
HitIdHelper.h:15
IdField::firstBit
int firstBit
Definition
HitIdHelper.h:18
IdField::nBits
int nBits
Definition
HitIdHelper.h:17
IdField::vMax
int vMax
Definition
HitIdHelper.h:16
IdField::fieldName
std::string fieldName
Definition
HitIdHelper.h:14
Generated on
for ATLAS Offline Software by
1.17.0