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); }
46  int GetHFEt(int region) { return GetObject(rctDataBase::HFEt, 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); }
49  int GetHFFg(int region) { return GetObject(rctDataBase::HFFg, region); }
50  int GetNEReg(int cand) { return GetObject(rctDataBase::NEReg, cand); }
51  int GetNECard(int cand) { return GetObject(rctDataBase::NECard, cand); }
52  int GetNEEt(int cand) { return GetObject(rctDataBase::NEEt, cand); }
53  int GetIEReg(int cand) { return GetObject(rctDataBase::IEReg, cand); }
54  int GetIECard(int cand) { return GetObject(rctDataBase::IECard, 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); }
59  void SetHFEt(int value, int region) { SetObject(rctDataBase::HFEt, value, 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); }
62  void SetHFFg(int value, int region) { SetObject(rctDataBase::HFFg, value, region); }
63  void SetNEReg(int value, int cand) { SetObject(rctDataBase::NEReg, value, cand); }
64  void SetNECard(int value, int cand) { SetObject(rctDataBase::NECard, value, cand); }
65  void SetNEEt(int value, int cand) { SetObject(rctDataBase::NEEt, value, cand); }
66  void SetIEReg(int value, int cand) { SetObject(rctDataBase::IEReg, value, cand); }
67  void SetIECard(int value, int cand) { SetObject(rctDataBase::IECard, value, cand); }
68  void SetIEEt(int value, int cand) { SetObject(rctDataBase::IEEt, value, cand); }
69  void SetRCHad(int value, int card, int region) { SetObject(rctDataBase::RCHad, value, card, region); }
70  };
71 } // namespace l1t
72 #endif
void SetNEReg(int value, int cand)
void SetNEEt(int value, int cand)
void SetRCOf(int value, int card, int region)
int GetRCTau(int card, int region)
void SetHFEt(int value, int region)
delete x;
Definition: CaloConfig.h:22
void SetIEReg(int value, int cand)
void SetRCTau(int value, int card, int region)
void SetNECard(int value, int cand)
void Set32bitWordLinkEven(int index, uint32_t value)
int GetRCHad(int card, int region)
void SetRCEt(int value, int card, int region)
int BuildDecimalValue(int firstbit, int bitlength, int linkid)
Definition: value.py:1
void SetHFFg(int value, int region)
void SetIECard(int value, int cand)
void SetRCHad(int value, int card, int region)
int GetRCEt(int card, int region)
int ReadBitInInt(int bit, int value)
void SetIEEt(int value, int cand)
void Set32bitWordLinkOdd(int index, uint32_t value)
int GetObject(rctDataBase::rctObjectType t, int firstindex, int secondindex=-1)
int GetRCOf(int card, int region)
void SetObject(rctDataBase::rctObjectType t, int value, int firstindex, int secondindex=-1)