ATLAS Offline Software
HitIdHelper.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 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;
16  int vMax;
17  int nBits;
18  int firstBit;
19 };
20 
21 typedef std::vector<IdField> IdFields;
22 
23 class HitIdHelper {
24 public:
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:
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
HitIdHelper::m_IDs
IdFields m_IDs
Definition: HitIdHelper.h:34
IdField
Definition: HitIdHelper.h:13
HitIdHelper::SetFieldValue
void SetFieldValue(const std::string &name, int n, HitID &targetID) const
Definition: HitIdHelper.cxx:31
IdFields
std::vector< IdField > IdFields
Definition: HitIdHelper.h:21
HitIdHelper::InitializeField
void InitializeField(const std::string &n, int vmn, int vmx)
Definition: HitIdHelper.cxx:10
HitIdHelper::PrintFields
void PrintFields()
Definition: HitIdHelper.cxx:63
athena.value
value
Definition: athena.py:124
HitIdHelper::SetBit
static void SetBit(int &i, int bitpos)
Definition: HitIdHelper.cxx:83
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
HitIdHelper::Print
static void Print(int id)
Definition: HitIdHelper.cxx:73
IdField::vMax
int vMax
Definition: HitIdHelper.h:16
HitID
int HitID
Definition: HitIdHelper.h:11
HitIdHelper::GetFieldValue
int GetFieldValue(const std::string &name, HitID targetID) const
Definition: HitIdHelper.cxx:48
lumiFormat.i
int i
Definition: lumiFormat.py:85
HitIdHelper::Store
static void Store(int &id, int value, int first, int field)
Definition: HitIdHelper.cxx:97
beamspotman.n
n
Definition: beamspotman.py:731
HitIdHelper::UnsetBit
static void UnsetBit(int &i, int bitpos)
Definition: HitIdHelper.cxx:89
HitIdHelper::Retrieve
static int Retrieve(int id, int first, int field)
Definition: HitIdHelper.cxx:106
IdField::firstBit
int firstBit
Definition: HitIdHelper.h:18
HitIdHelper::~HitIdHelper
virtual ~HitIdHelper()
Definition: HitIdHelper.h:26
IdField::vMin
int vMin
Definition: HitIdHelper.h:15
IdField::fieldName
std::string fieldName
Definition: HitIdHelper.h:14
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
HitIdHelper
Definition: HitIdHelper.h:23
HitIdHelper::HitIdHelper
HitIdHelper()
Definition: HitIdHelper.h:25
DeMoScan.first
bool first
Definition: DeMoScan.py:536
HitIdHelper::m_currentStorage
int m_currentStorage
Definition: HitIdHelper.h:35
HitID
int HitID
Definition: GenericMuonSimHit.h:13
IdField::nBits
int nBits
Definition: HitIdHelper.h:17
hotSpotInTAG.nb
nb
Definition: hotSpotInTAG.py:164