#include <sTgcHitIdHelper.h>
|
| std::string | GetStationName (const int &hid) const |
| void | SetStationName (const std::string &name, int &hid) const |
| int | GetPhiSector (const int &hid) const |
| int | GetZSector (const int &hid) const |
| int | GetMultiLayer (const int &hid) const |
| int | GetLayer (const int &hid) const |
| int | GetSide (const int &hid) const |
| int | BuildsTgcHitId (const std::string &, const int, const int, const int, const int, const int) const |
| void | InitializeField (const std::string &n, int vmn, int vmx) |
| void | InitializeField (const std::string &n, int nb) |
| void | SetFieldValue (const std::string &name, int n, HitID &targetID) const |
| int | GetFieldValue (const std::string &name, HitID targetID) const |
| void | PrintFields () |
|
| static void | SetBit (int &i, int bitpos) |
| static void | UnsetBit (int &i, int bitpos) |
| static void | Store (int &id, int value, int first, int field) |
| static int | Retrieve (int id, int first, int field) |
Definition at line 13 of file sTgcHitIdHelper.h.
◆ sTgcHitIdHelper()
| sTgcHitIdHelper::sTgcHitIdHelper |
( |
| ) |
|
|
private |
◆ BuildsTgcHitId()
| int sTgcHitIdHelper::BuildsTgcHitId |
( |
const std::string & | statName, |
|
|
const int | phiSect, |
|
|
const int | zSect, |
|
|
const int | multiLayer, |
|
|
const int | layer, |
|
|
const int | side ) const |
Definition at line 89 of file sTgcHitIdHelper.cxx.
90 {
91
92 int theID(0);
99 return theID;
100}
void SetFieldValue(const std::string &name, int n, HitID &targetID) const
void SetStationName(const std::string &name, int &hid) const
◆ GetFieldValue()
| int HitIdHelper::GetFieldValue |
( |
const std::string & | name, |
|
|
HitID | targetID ) const |
|
inherited |
Definition at line 47 of file HitIdHelper.cxx.
48{
49 for (
unsigned int i=0;
i<
m_IDs.size();
i++)
50 {
51 if (
m_IDs[i].fieldName==name)
52 {
55 }
56 }
57 std::cout<<
"HitIdHelper: field "<<
name<<
" not found: returning 0"<<
58 std::endl;
59 return 0;
60}
static int Retrieve(int id, int first, int field)
◆ GetHelper()
◆ GetLayer()
| int sTgcHitIdHelper::GetLayer |
( |
const int & | hid | ) |
const |
Definition at line 80 of file sTgcHitIdHelper.cxx.
80 {
82}
int GetFieldValue(const std::string &name, HitID targetID) const
◆ GetMultiLayer()
| int sTgcHitIdHelper::GetMultiLayer |
( |
const int & | hid | ) |
const |
◆ GetPhiSector()
| int sTgcHitIdHelper::GetPhiSector |
( |
const int & | hid | ) |
const |
◆ GetSide()
| int sTgcHitIdHelper::GetSide |
( |
const int & | hid | ) |
const |
◆ GetStationName()
| std::string sTgcHitIdHelper::GetStationName |
( |
const int & | hid | ) |
const |
◆ GetZSector()
| int sTgcHitIdHelper::GetZSector |
( |
const int & | hid | ) |
const |
◆ Initialize()
| void sTgcHitIdHelper::Initialize |
( |
| ) |
|
|
private |
Definition at line 29 of file sTgcHitIdHelper.cxx.
29 {
30
36
37}
void InitializeField(const std::string &n, int vmn, int vmx)
◆ InitializeField() [1/2]
| void HitIdHelper::InitializeField |
( |
const std::string & | n, |
|
|
int | nb ) |
|
inherited |
Definition at line 20 of file HitIdHelper.cxx.
21{
22 int vmn=0;
23 int vmx = (1 <<
nb) - 1;
25 m_IDs.push_back(std::move(
id));
28}
◆ InitializeField() [2/2]
| void HitIdHelper::InitializeField |
( |
const std::string & | n, |
|
|
int | vmn, |
|
|
int | vmx ) |
|
inherited |
Definition at line 10 of file HitIdHelper.cxx.
11{
12 int field = vmx - vmn + 1;
13 int nb = std::bit_width(
static_cast<unsigned>(field - 1));
15 m_IDs.push_back(std::move(
id));
18}
◆ InitializeStationName()
| void sTgcHitIdHelper::InitializeStationName |
( |
| ) |
|
|
private |
◆ Print()
| void HitIdHelper::Print |
( |
int | id | ) |
|
|
staticinherited |
Definition at line 72 of file HitIdHelper.cxx.
73{
74 for (
unsigned int i=0;
i<8*
sizeof(
int);
i++)
75 {
76 if ((id & (1u<<i))) std::cout<<"1";
77 else std::cout<<"0";
78 }
79 std::cout<<std::endl;
80}
◆ PrintFields()
| void HitIdHelper::PrintFields |
( |
| ) |
|
|
inherited |
Definition at line 62 of file HitIdHelper.cxx.
63{
64 for (
unsigned int i=0;
i<
m_IDs.size();
i++)
65 {
66 std::cout<<
"-- Field "<<
m_IDs[
i].fieldName<<
"\t["<<
m_IDs[
i].vMin
68 <<
"\tfirst Bit "<<
m_IDs[
i].firstBit<<std::endl;
69 }
70}
◆ Retrieve()
| int HitIdHelper::Retrieve |
( |
int | id, |
|
|
int | first, |
|
|
int | field ) |
|
staticprotectedinherited |
Definition at line 105 of file HitIdHelper.cxx.
106{
107 int j=0;
112}
static void SetBit(int &i, int bitpos)
l
Printing final latex table to .tex output file.
◆ SetBit()
| void HitIdHelper::SetBit |
( |
int & | i, |
|
|
int | bitpos ) |
|
staticprotectedinherited |
◆ SetFieldValue()
| void HitIdHelper::SetFieldValue |
( |
const std::string & | name, |
|
|
int | n, |
|
|
HitID & | targetID ) const |
|
inherited |
Definition at line 30 of file HitIdHelper.cxx.
31{
32 for (
unsigned int i=0;
i<
m_IDs.size();
i++)
33 {
34 if (
m_IDs[i].fieldName==name)
35 {
37 std::cout<<
"HitIdHelper: field "<<
name<<
": supplied value "<<
n<<
38 " is not within the allowed range ["<<
m_IDs[
i].vMin<<
","<<
m_IDs[
i].vMax
39 <<"] : the result of this action is unpredictable "<<std::endl;
42 break;
43 }
44 }
45}
static void Store(int &id, int value, int first, int field)
◆ SetStationName()
| void sTgcHitIdHelper::SetStationName |
( |
const std::string & | name, |
|
|
int & | hid ) const |
Definition at line 45 of file sTgcHitIdHelper.cxx.
46{
47 for (
unsigned int i=0;
i<
sizeof(v1);
i++)
49 for (
unsigned int i=0;
i<
sizeof(
v2);
i++)
51 for (
unsigned int i=0;
i<
sizeof(v3);
i++)
53 for (
unsigned int i=0;
i<
sizeof(v4);
i++)
55}
◆ Store()
| void HitIdHelper::Store |
( |
int & | id, |
|
|
int | value, |
|
|
int | first, |
|
|
int | field ) |
|
staticprotectedinherited |
Definition at line 96 of file HitIdHelper.cxx.
97{
103}
static void UnsetBit(int &i, int bitpos)
◆ UnsetBit()
| void HitIdHelper::UnsetBit |
( |
int & | i, |
|
|
int | bitpos ) |
|
staticprotectedinherited |
◆ m_currentStorage
| int HitIdHelper::m_currentStorage |
|
protectedinherited |
◆ m_IDs
The documentation for this class was generated from the following files: