CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
trklet::TETableBase Class Reference

#include <TETableBase.h>

Inheritance diagram for trklet::TETableBase:
trklet::VMRouterPhiCorrTable

Public Member Functions

virtual void lookup (int, int)
 
 TETableBase (Settings const &settings)
 
void writeVMTable (std::string name, bool positive=true)
 
virtual ~TETableBase ()=default
 

Protected Attributes

int nbits_
 
Settings const & settings_
 
std::vector< int > table_
 

Detailed Description

Definition at line 16 of file TETableBase.h.

Constructor & Destructor Documentation

◆ TETableBase()

TETableBase::TETableBase ( Settings const &  settings)

Definition at line 6 of file TETableBase.cc.

6 : settings_(settings) {}

◆ ~TETableBase()

virtual trklet::TETableBase::~TETableBase ( )
virtualdefault

Member Function Documentation

◆ lookup()

virtual void trklet::TETableBase::lookup ( int  ,
int   
)
inlinevirtual

Definition at line 22 of file TETableBase.h.

22 {}

◆ writeVMTable()

void TETableBase::writeVMTable ( std::string  name,
bool  positive = true 
)

Definition at line 8 of file TETableBase.cc.

8  {
9  ofstream out;
10  out.open(name.c_str());
11  out << "{" << endl;
12  for (unsigned int i = 0; i < table_.size(); i++) {
13  if (i != 0) {
14  out << "," << endl;
15  }
16 
17  assert(nbits_ > 0);
18 
19  int itable = table_[i];
20  if (positive) {
21  if (table_[i] < 0) {
22  itable = (1 << nbits_) - 1;
23  }
24  }
25 
26  out << itable;
27  }
28  out << endl << "};" << endl;
29  out.close();
30 }

References cms::cuda::assert(), mps_fire::i, Skims_PA_cff::name, nbits_, MillePedeFileConverter_cfg::out, and table_.

Referenced by trklet::VMRouterPhiCorrTable::init().

Member Data Documentation

◆ nbits_

int trklet::TETableBase::nbits_
protected

◆ settings_

Settings const& trklet::TETableBase::settings_
protected

◆ table_

std::vector<int> trklet::TETableBase::table_
protected
mps_fire.i
i
Definition: mps_fire.py:428
cms::cuda::assert
assert(be >=bs)
trklet::TETableBase::table_
std::vector< int > table_
Definition: TETableBase.h:28
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
trklet::TETableBase::nbits_
int nbits_
Definition: TETableBase.h:29
trklet::TETableBase::settings_
Settings const & settings_
Definition: TETableBase.h:27