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 144 of file gt_datatypes.h.

Member Function Documentation

◆ clear()

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

Definition at line 155 of file gt_datatypes.h.

References scalar_pt, valid, vector_phi, and vector_pt.

155  {
156  valid = 0;
157  vector_pt = 0;
158  vector_phi = 0;
159  scalar_pt = 0;
160  }
pt_t vector_pt
Definition: gt_datatypes.h:146
phi_t vector_phi
Definition: gt_datatypes.h:147
pt_t scalar_pt
Definition: gt_datatypes.h:148
valid_t valid
Definition: gt_datatypes.h:145

◆ initFromBits()

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

Definition at line 186 of file gt_datatypes.h.

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

186  {
187  unsigned int start = 0;
192  }
Definition: start.py:1
pt_t vector_pt
Definition: gt_datatypes.h:146
phi_t vector_phi
Definition: gt_datatypes.h:147
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:148
valid_t valid
Definition: gt_datatypes.h:145

◆ operator==()

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

Definition at line 150 of file gt_datatypes.h.

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

150  {
151  return valid == other.valid && vector_pt == other.vector_pt && vector_phi == other.vector_phi &&
152  scalar_pt == other.scalar_pt;
153  }
pt_t vector_pt
Definition: gt_datatypes.h:146
phi_t vector_phi
Definition: gt_datatypes.h:147
pt_t scalar_pt
Definition: gt_datatypes.h:148
valid_t valid
Definition: gt_datatypes.h:145

◆ pack()

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

Definition at line 173 of file gt_datatypes.h.

References pack_ap(), and x.

173  {
174  ap_uint<BITWIDTH> x = pack_ap();
175  return (uint64_t)x;
176  }
ap_uint< BITWIDTH > pack_ap() const
Definition: gt_datatypes.h:163
unsigned long long uint64_t
Definition: Time.h:13

◆ pack_ap()

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

Definition at line 163 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().

163  {
164  ap_uint<BITWIDTH> ret(0);
165  unsigned int start = 0;
170  return ret;
171  }
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:146
phi_t vector_phi
Definition: gt_datatypes.h:147
pt_t scalar_pt
Definition: gt_datatypes.h:148
valid_t valid
Definition: gt_datatypes.h:145

◆ unpack()

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

Definition at line 184 of file gt_datatypes.h.

References TrackRefitter_38T_cff::src, and unpack_ap().

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

◆ unpack_ap()

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

Definition at line 178 of file gt_datatypes.h.

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

Referenced by unpack().

178  {
179  Sum ret;
180  ret.initFromBits(src);
181  return ret;
182  }
ret
prodAgent to be discontinued

Member Data Documentation

◆ BITWIDTH

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

Definition at line 162 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