CMS 3D CMS Logo

PhysicsToBitConverter.h
Go to the documentation of this file.
1 #ifndef _PHYSICSTOBITCONVERTER_h
2 #define _PHYSICSTOBITCONVERTER_h
3 
4 #include <cstdio>
5 #include <string>
6 #include <cstdlib>
7 #include <iostream>
8 #include <fstream>
9 #include <stdexcept>
10 #include <cstdint>
11 #include <iomanip>
12 #include <sstream>
13 #include <vector>
14 #include <array>
15 #include <bitset>
16 #include <cstdint>
17 #include <cmath>
18 #include "rctDataBase.h"
19 
20 namespace l1t {
22  int words32bitLink[2][6]; //[link][word]
23 
24  int bitsLink[2][192];
26 
27  public:
30  void Set32bitWordLinkEven(int index, uint32_t value) { words32bitLink[0][index] = value; };
31  void Set32bitWordLinkOdd(int index, uint32_t value) { words32bitLink[1][index] = value; };
32 
33  int Get32bitWordLinkEven(int index) { return words32bitLink[0][index]; };
34  int Get32bitWordLinkOdd(int index) { return words32bitLink[1][index]; };
35 
36  void Convert();
37  void Extract32bitwords();
38 
39  int GetObject(rctDataBase::rctObjectType t, int firstindex, int secondindex = -1);
40  void SetObject(rctDataBase::rctObjectType t, int value, int firstindex, int secondindex = -1);
41 
42  int ReadBitInInt(int bit, int value);
43  int BuildDecimalValue(int firstbit, int bitlength, int linkid);
44 
45  int GetRCEt(int card, int region) { return GetObject(rctDataBase::RCEt, card, region); }
47  int GetRCTau(int card, int region) { return GetObject(rctDataBase::RCTau, card, region); }
48  int GetRCOf(int card, int region) { return GetObject(rctDataBase::RCOf, card, region); }
52  int GetNEEt(int cand) { return GetObject(rctDataBase::NEEt, cand); }
55  int GetIEEt(int cand) { return GetObject(rctDataBase::IEEt, cand); }
56  int GetRCHad(int card, int region) { return GetObject(rctDataBase::RCHad, card, region); }
57 
58  void SetRCEt(int value, int card, int region) { SetObject(rctDataBase::RCEt, value, card, region); }
60  void SetRCTau(int value, int card, int region) { SetObject(rctDataBase::RCTau, value, card, region); }
61  void SetRCOf(int value, int card, int region) { SetObject(rctDataBase::RCOf, value, card, region); }
69  void SetRCHad(int value, int card, int region) { SetObject(rctDataBase::RCHad, value, card, region); }
70  };
71 } // namespace l1t
72 #endif
l1t::PhysicsToBitConverter::SetHFFg
void SetHFFg(int value, int region)
Definition: PhysicsToBitConverter.h:62
l1t::rctDataBase::IECard
Definition: rctDataBase.h:12
l1t::PhysicsToBitConverter::Set32bitWordLinkEven
void Set32bitWordLinkEven(int index, uint32_t value)
Definition: PhysicsToBitConverter.h:30
l1t::PhysicsToBitConverter::SetIECard
void SetIECard(int value, int cand)
Definition: PhysicsToBitConverter.h:67
l1t::PhysicsToBitConverter::SetRCHad
void SetRCHad(int value, int card, int region)
Definition: PhysicsToBitConverter.h:69
l1t::rctDataBase::NEEt
Definition: rctDataBase.h:12
l1t::PhysicsToBitConverter::SetRCEt
void SetRCEt(int value, int card, int region)
Definition: PhysicsToBitConverter.h:58
l1t::PhysicsToBitConverter::GetNEReg
int GetNEReg(int cand)
Definition: PhysicsToBitConverter.h:50
l1t::rctDataBase::IEEt
Definition: rctDataBase.h:12
l1t::PhysicsToBitConverter::SetIEEt
void SetIEEt(int value, int cand)
Definition: PhysicsToBitConverter.h:68
l1t::PhysicsToBitConverter::GetRCEt
int GetRCEt(int card, int region)
Definition: PhysicsToBitConverter.h:45
dqmiodumpindices.firstindex
firstindex
Definition: dqmiodumpindices.py:25
l1t::PhysicsToBitConverter::GetIEReg
int GetIEReg(int cand)
Definition: PhysicsToBitConverter.h:53
l1t::PhysicsToBitConverter::Extract32bitwords
void Extract32bitwords()
Definition: PhysicsToBitConverter.cc:28
l1t::PhysicsToBitConverter::Set32bitWordLinkOdd
void Set32bitWordLinkOdd(int index, uint32_t value)
Definition: PhysicsToBitConverter.h:31
l1t::PhysicsToBitConverter::ReadBitInInt
int ReadBitInInt(int bit, int value)
Definition: PhysicsToBitConverter.cc:57
rctDataBase.h
l1t::PhysicsToBitConverter
Definition: PhysicsToBitConverter.h:21
l1t::PhysicsToBitConverter::GetRCOf
int GetRCOf(int card, int region)
Definition: PhysicsToBitConverter.h:48
l1t::rctDataBase::HFEt
Definition: rctDataBase.h:12
l1t::PhysicsToBitConverter::GetNECard
int GetNECard(int cand)
Definition: PhysicsToBitConverter.h:51
l1t::PhysicsToBitConverter::GetObject
int GetObject(rctDataBase::rctObjectType t, int firstindex, int secondindex=-1)
Definition: PhysicsToBitConverter.cc:38
l1t::PhysicsToBitConverter::~PhysicsToBitConverter
~PhysicsToBitConverter()
Definition: PhysicsToBitConverter.h:29
l1t::rctDataBase::RCEt
Definition: rctDataBase.h:12
l1t::PhysicsToBitConverter::Get32bitWordLinkEven
int Get32bitWordLinkEven(int index)
Definition: PhysicsToBitConverter.h:33
l1t::PhysicsToBitConverter::GetNEEt
int GetNEEt(int cand)
Definition: PhysicsToBitConverter.h:52
l1t::PhysicsToBitConverter::SetNEReg
void SetNEReg(int value, int cand)
Definition: PhysicsToBitConverter.h:63
l1t::PhysicsToBitConverter::GetHFEt
int GetHFEt(int region)
Definition: PhysicsToBitConverter.h:46
l1t::rctDataBase::IEReg
Definition: rctDataBase.h:12
l1t::PhysicsToBitConverter::SetObject
void SetObject(rctDataBase::rctObjectType t, int value, int firstindex, int secondindex=-1)
Definition: PhysicsToBitConverter.cc:46
l1t::PhysicsToBitConverter::SetNEEt
void SetNEEt(int value, int cand)
Definition: PhysicsToBitConverter.h:65
l1t::PhysicsToBitConverter::databaseobject
rctDataBase databaseobject
Definition: PhysicsToBitConverter.h:25
l1t::PhysicsToBitConverter::SetHFEt
void SetHFEt(int value, int region)
Definition: PhysicsToBitConverter.h:59
l1t::PhysicsToBitConverter::SetRCOf
void SetRCOf(int value, int card, int region)
Definition: PhysicsToBitConverter.h:61
l1t
delete x;
Definition: CaloConfig.h:22
l1t::rctDataBase
Definition: rctDataBase.h:10
cand
Definition: decayParser.h:32
l1t::PhysicsToBitConverter::GetRCTau
int GetRCTau(int card, int region)
Definition: PhysicsToBitConverter.h:47
l1t::rctDataBase::HFFg
Definition: rctDataBase.h:12
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88286
l1t::PhysicsToBitConverter::GetIEEt
int GetIEEt(int cand)
Definition: PhysicsToBitConverter.h:55
l1t::PhysicsToBitConverter::Get32bitWordLinkOdd
int Get32bitWordLinkOdd(int index)
Definition: PhysicsToBitConverter.h:34
l1t::rctDataBase::RCOf
Definition: rctDataBase.h:12
value
Definition: value.py:1
l1t::PhysicsToBitConverter::SetNECard
void SetNECard(int value, int cand)
Definition: PhysicsToBitConverter.h:64
l1t::PhysicsToBitConverter::words32bitLink
int words32bitLink[2][6]
Definition: PhysicsToBitConverter.h:22
l1t::rctDataBase::RCTau
Definition: rctDataBase.h:12
l1t::PhysicsToBitConverter::GetHFFg
int GetHFFg(int region)
Definition: PhysicsToBitConverter.h:49
relativeConstraints.value
value
Definition: relativeConstraints.py:53
l1t::rctDataBase::rctObjectType
rctObjectType
Definition: rctDataBase.h:12
l1t::rctDataBase::NECard
Definition: rctDataBase.h:12
l1t::PhysicsToBitConverter::GetIECard
int GetIECard(int cand)
Definition: PhysicsToBitConverter.h:54
l1t::PhysicsToBitConverter::SetIEReg
void SetIEReg(int value, int cand)
Definition: PhysicsToBitConverter.h:66
l1t::PhysicsToBitConverter::SetRCTau
void SetRCTau(int value, int card, int region)
Definition: PhysicsToBitConverter.h:60
l1t::PhysicsToBitConverter::bitsLink
int bitsLink[2][192]
Definition: PhysicsToBitConverter.h:24
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
l1t::PhysicsToBitConverter::GetRCHad
int GetRCHad(int card, int region)
Definition: PhysicsToBitConverter.h:56
l1t::PhysicsToBitConverter::Convert
void Convert()
Definition: PhysicsToBitConverter.cc:17
l1t::rctDataBase::NEReg
Definition: rctDataBase.h:12
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
l1t::PhysicsToBitConverter::PhysicsToBitConverter
PhysicsToBitConverter()
Definition: PhysicsToBitConverter.cc:4
l1t::rctDataBase::RCHad
Definition: rctDataBase.h:12
l1t::PhysicsToBitConverter::BuildDecimalValue
int BuildDecimalValue(int firstbit, int bitlength, int linkid)
Definition: PhysicsToBitConverter.cc:62