CMS 3D CMS Logo

rctDataBase.h
Go to the documentation of this file.
1 #ifndef _rctDATABASE_h
2 #define _rctDATABASE_h
3 
4 #include <iostream>
5 #include <stdexcept>
6 #include <vector>
7 #include <cstdint>
8 
9 namespace l1t {
10  class rctDataBase {
11  public:
13 
14  private:
15  int RCEt_start[7][2]; //card, region
16  int RCTau_start[7][2]; //card, region
17  int RCOf_start[7][2]; //card, region
18  int HFEt_start[8]; //region
19  int HFFg_start[8]; //region
20  int IEEt_start[4]; //candidate
21  int IEReg_start[4]; //candidate
22  int IECard_start[4]; //candidate
23  int NEEt_start[4]; //candidate
24  int NEReg_start[4]; //candidate
25  int NECard_start[4]; //candidate
26  int RCHad_start[7][2]; //card, region
27 
29 
30  int link[nObjects];
33 
34  public:
35  rctDataBase();
37 
38  int GetLength(rctObjectType t) { return length[t]; }
39 
40  int GetLink(rctObjectType t) { return link[t]; }
41 
42  void GetLinkRCT(int linkMP7, unsigned int &RCTcrate, bool &RCTeven) {
43  int oRSClink = indexfromMP7toRCT[linkMP7];
44  RCTcrate = (int)(oRSClink / 2);
45  if (oRSClink % 2 == 0)
46  RCTeven = true;
47  else
48  RCTeven = false;
49  }
50  void GetLinkMP7(unsigned int RCTcrate, bool RCTeven, int &linkMP7) {
51  linkMP7 = indexfromoRSCtoMP7[RCTcrate * 2 + (1 - (int)RCTeven)];
52  }
53 
54  int GetIndices(rctObjectType t, int firstindex, int secondindex = -1) {
55  switch (t) {
56  case RCEt:
57  return RCEt_start[firstindex][secondindex];
58  case RCTau:
59  return RCTau_start[firstindex][secondindex];
60  case RCOf:
61  return RCOf_start[firstindex][secondindex];
62  case HFEt:
63  return HFEt_start[firstindex];
64  case HFFg:
65  return HFFg_start[firstindex];
66  case IEEt:
67  return IEEt_start[firstindex];
68  case IEReg:
69  return IEReg_start[firstindex];
70  case IECard:
71  return IECard_start[firstindex];
72  case NEEt:
73  return NEEt_start[firstindex];
74  case NEReg:
75  return NEReg_start[firstindex];
76  case NECard:
77  return NECard_start[firstindex];
78  case RCHad:
79  return RCHad_start[firstindex][secondindex];
80  default:
81  return -1;
82  }
83  }
84  };
85 } // namespace l1t
86 #endif
l1t::rctDataBase::IECard
Definition: rctDataBase.h:12
l1t::rctDataBase::nObjects
Definition: rctDataBase.h:12
l1t::rctDataBase::HFFg_start
int HFFg_start[8]
Definition: rctDataBase.h:19
l1t::rctDataBase::NEEt
Definition: rctDataBase.h:12
l1t::rctDataBase::IECard_start
int IECard_start[4]
Definition: rctDataBase.h:22
l1t::rctDataBase::IEEt
Definition: rctDataBase.h:12
l1t::rctDataBase::RCTau_start
int RCTau_start[7][2]
Definition: rctDataBase.h:16
l1t::rctDataBase::~rctDataBase
~rctDataBase()
Definition: rctDataBase.h:36
dqmiodumpindices.firstindex
firstindex
Definition: dqmiodumpindices.py:25
l1t::rctDataBase::IEReg_start
int IEReg_start[4]
Definition: rctDataBase.h:21
l1t::rctDataBase::indexfromMP7toRCT
int indexfromMP7toRCT[36]
Definition: rctDataBase.h:31
l1t::rctDataBase::length
int length[nObjects]
Definition: rctDataBase.h:28
l1t::rctDataBase::RCEt_start
int RCEt_start[7][2]
Definition: rctDataBase.h:15
l1t::rctDataBase::GetLinkRCT
void GetLinkRCT(int linkMP7, unsigned int &RCTcrate, bool &RCTeven)
Definition: rctDataBase.h:42
l1t::rctDataBase::HFEt
Definition: rctDataBase.h:12
l1t::rctDataBase::link
int link[nObjects]
Definition: rctDataBase.h:30
l1t::rctDataBase::indexfromoRSCtoMP7
int indexfromoRSCtoMP7[36]
Definition: rctDataBase.h:32
l1t::rctDataBase::RCEt
Definition: rctDataBase.h:12
l1t::rctDataBase::HFEt_start
int HFEt_start[8]
Definition: rctDataBase.h:18
l1t::rctDataBase::IEReg
Definition: rctDataBase.h:12
l1t
delete x;
Definition: CaloConfig.h:22
l1t::rctDataBase::RCHad_start
int RCHad_start[7][2]
Definition: rctDataBase.h:26
l1t::rctDataBase::rctDataBase
rctDataBase()
Definition: rctDataBase.cc:3
l1t::rctDataBase::GetIndices
int GetIndices(rctObjectType t, int firstindex, int secondindex=-1)
Definition: rctDataBase.h:54
l1t::rctDataBase
Definition: rctDataBase.h:10
l1t::rctDataBase::HFFg
Definition: rctDataBase.h:12
createfilelist.int
int
Definition: createfilelist.py:10
l1t::rctDataBase::RCOf
Definition: rctDataBase.h:12
l1t::rctDataBase::GetLink
int GetLink(rctObjectType t)
Definition: rctDataBase.h:40
l1t::rctDataBase::NEReg_start
int NEReg_start[4]
Definition: rctDataBase.h:24
l1t::rctDataBase::IEEt_start
int IEEt_start[4]
Definition: rctDataBase.h:20
l1t::rctDataBase::NECard_start
int NECard_start[4]
Definition: rctDataBase.h:25
l1t::rctDataBase::RCTau
Definition: rctDataBase.h:12
l1t::rctDataBase::rctObjectType
rctObjectType
Definition: rctDataBase.h:12
l1t::rctDataBase::RCOf_start
int RCOf_start[7][2]
Definition: rctDataBase.h:17
l1t::rctDataBase::NECard
Definition: rctDataBase.h:12
l1t::rctDataBase::GetLength
int GetLength(rctObjectType t)
Definition: rctDataBase.h:38
l1t::rctDataBase::NEReg
Definition: rctDataBase.h:12
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
l1t::rctDataBase::RCHad
Definition: rctDataBase.h:12
l1t::rctDataBase::NEEt_start
int NEEt_start[4]
Definition: rctDataBase.h:23
l1t::rctDataBase::GetLinkMP7
void GetLinkMP7(unsigned int RCTcrate, bool RCTeven, int &linkMP7)
Definition: rctDataBase.h:50