CMS 3D CMS Logo

TMem.cc
Go to the documentation of this file.
1 /*
2  * \class TMem
3  *
4  * \author: Julie Malcles - CEA/Saclay
5  */
6 
9 
10 #include <TMath.h>
11 #include <iostream>
12 using namespace std;
13 
14 //ClassImp(TMem)
15 
16 // Default Constructor...
17 TMem::TMem() { init(610); }
18 
19 // Constructor...
21 
22 // Destructor
24 
25 void TMem::init(int fedid) {
26  _fedid = fedid;
27  _memFromDcc = ME::memFromDcc(_fedid);
28 }
29 
31  bool isMemOK = false;
32  for (unsigned int imem = 0; imem < _memFromDcc.size(); imem++) {
33  if (mem == _memFromDcc[imem]) {
34  isMemOK = true;
35  imem = _memFromDcc.size();
36  }
37  }
38  return isMemOK;
39 }
40 
41 int TMem::Mem(int lmr, int n) {
42  std::pair<int, int> mempair = ME::memFromLmr(lmr);
43  if (n == 0)
44  return mempair.first;
45  else
46  return mempair.second;
47 }
static std::vector< ME::DCCid > memFromDcc(ME::DCCid idcc)
Definition: ME.cc:561
static std::pair< ME::DCCid, ME::DCCid > memFromLmr(ME::LMRid ilmr)
Definition: ME.cc:538
int init
Definition: HydjetWrapper.h:66
int Mem(int, int)
Definition: TMem.cc:41
uint16_t mem[nChs][nEvts]
bool isMemRelevant(int)
Definition: TMem.cc:30
void init(int)
Definition: TMem.cc:25
TMem()
Definition: TMem.cc:17
~TMem() override
Definition: TMem.cc:23