ATLAS Offline Software
Loading...
Searching...
No Matches
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
11typedef int HitID;
12
13struct IdField {
14 std::string fieldName;
15 int vMin;
16 int vMax;
17 int nBits;
19};
20
21typedef std::vector<IdField> IdFields;
22
24public:
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);
33protected:
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
int HitID
std::vector< IdField > IdFields
Definition HitIdHelper.h:21
int GetFieldValue(const std::string &name, HitID targetID) const
static void UnsetBit(int &i, int bitpos)
static void Print(int id)
static void Store(int &id, int value, int first, int field)
IdFields m_IDs
Definition HitIdHelper.h:34
static int Retrieve(int id, int first, int field)
int m_currentStorage
Definition HitIdHelper.h:35
void PrintFields()
virtual ~HitIdHelper()
Definition HitIdHelper.h:26
static void SetBit(int &i, int bitpos)
void InitializeField(const std::string &n, int vmn, int vmx)
void SetFieldValue(const std::string &name, int n, HitID &targetID) const
int firstBit
Definition HitIdHelper.h:18
int nBits
Definition HitIdHelper.h:17
std::string fieldName
Definition HitIdHelper.h:14