CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
l1gt::Sum Struct Reference

#include <gt_datatypes.h>

Public Member Functions

void clear ()
 
void initFromBits (const ap_uint< BITWIDTH > &src)
 
bool operator== (const Sum &other) const
 
uint64_t pack () const
 
ap_uint< BITWIDTHpack_ap () const
 

Static Public Member Functions

static Sum unpack (const uint64_t &src)
 
static Sum unpack_ap (const ap_uint< BITWIDTH > &src)
 

Public Attributes

pt_t scalar_pt
 
valid_t valid
 
phi_t vector_phi
 
pt_t vector_pt
 

Static Public Attributes

static const int BITWIDTH = 64
 

Detailed Description

Definition at line 140 of file gt_datatypes.h.

Member Function Documentation

◆ clear()

void l1gt::Sum::clear ( void  )
inline

Definition at line 151 of file gt_datatypes.h.

References scalar_pt, valid, vector_phi, and vector_pt.

151  {
152  valid = 0;
153  vector_pt = 0;
154  vector_phi = 0;
155  scalar_pt = 0;
156  }
pt_t vector_pt
Definition: gt_datatypes.h:142
phi_t vector_phi
Definition: gt_datatypes.h:143
pt_t scalar_pt
Definition: gt_datatypes.h:144
valid_t valid
Definition: gt_datatypes.h:141

◆ initFromBits()

void l1gt::Sum::initFromBits ( const ap_uint< BITWIDTH > &  src)
inline

Definition at line 182 of file gt_datatypes.h.

References scalar_pt, TrackRefitter_38T_cff::src, unpack_from_bits(), valid, vector_phi, and vector_pt.

182  {
183  unsigned int start = 0;
188  }
Definition: start.py:1
pt_t vector_pt
Definition: gt_datatypes.h:142
phi_t vector_phi
Definition: gt_datatypes.h:143
void unpack_from_bits(const U &u, unsigned int &start, T &data)
Definition: bit_encoding.h:15
pt_t scalar_pt
Definition: gt_datatypes.h:144
valid_t valid
Definition: gt_datatypes.h:141

◆ operator==()

bool l1gt::Sum::operator== ( const Sum other) const
inline

Definition at line 146 of file gt_datatypes.h.

References trackingPlots::other, scalar_pt, valid, vector_phi, and vector_pt.

146  {
147  return valid == other.valid && vector_pt == other.vector_pt && vector_phi == other.vector_phi &&
148  scalar_pt == other.scalar_pt;
149  }
pt_t vector_pt
Definition: gt_datatypes.h:142
phi_t vector_phi
Definition: gt_datatypes.h:143
pt_t scalar_pt
Definition: gt_datatypes.h:144
valid_t valid
Definition: gt_datatypes.h:141

◆ pack()

uint64_t l1gt::Sum::pack ( ) const
inline

Definition at line 169 of file gt_datatypes.h.

References pack_ap(), and x.

169  {
170  ap_uint<BITWIDTH> x = pack_ap();
171  return (uint64_t)x;
172  }
ap_uint< BITWIDTH > pack_ap() const
Definition: gt_datatypes.h:159
unsigned long long uint64_t
Definition: Time.h:13

◆ pack_ap()

ap_uint<BITWIDTH> l1gt::Sum::pack_ap ( ) const
inline

Definition at line 159 of file gt_datatypes.h.

References pack_into_bits(), runTheMatrix::ret, scalar_pt, valid, vector_phi, and vector_pt.

Referenced by L1CTJetFileWriter::encodeSums(), and pack().

159  {
160  ap_uint<BITWIDTH> ret(0);
161  unsigned int start = 0;
166  return ret;
167  }
Definition: start.py:1
ret
prodAgent to be discontinued
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8
pt_t vector_pt
Definition: gt_datatypes.h:142
phi_t vector_phi
Definition: gt_datatypes.h:143
pt_t scalar_pt
Definition: gt_datatypes.h:144
valid_t valid
Definition: gt_datatypes.h:141

◆ unpack()

static Sum l1gt::Sum::unpack ( const uint64_t &  src)
inlinestatic

Definition at line 180 of file gt_datatypes.h.

References TrackRefitter_38T_cff::src, and unpack_ap().

180 { return unpack_ap(src); }
static Sum unpack_ap(const ap_uint< BITWIDTH > &src)
Definition: gt_datatypes.h:174

◆ unpack_ap()

static Sum l1gt::Sum::unpack_ap ( const ap_uint< BITWIDTH > &  src)
inlinestatic

Definition at line 174 of file gt_datatypes.h.

References runTheMatrix::ret, and TrackRefitter_38T_cff::src.

Referenced by unpack().

174  {
175  Sum ret;
176  ret.initFromBits(src);
177  return ret;
178  }
ret
prodAgent to be discontinued

Member Data Documentation

◆ BITWIDTH

const int l1gt::Sum::BITWIDTH = 64
static

Definition at line 158 of file gt_datatypes.h.

◆ scalar_pt

pt_t l1gt::Sum::scalar_pt

◆ valid

valid_t l1gt::Sum::valid

◆ vector_phi

phi_t l1gt::Sum::vector_phi

◆ vector_pt

pt_t l1gt::Sum::vector_pt