BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
bitmanip Namespace Reference

Functions

template<class _T >
short int word (short i, const _T &v)
 
template<class _T >
void set_word (short i, _T &v, const _T &s)
 

Function Documentation

◆ set_word()

template<class _T >
void bitmanip::set_word ( short  i,
_T v,
const _T s 
)

Definition at line 35 of file bitmanip.h.

36{
37 short shft = i*4;
38 _T mask = 0x000F << shft;
39 v = ((v & ~mask) | ((s << shft) & mask));
40}
#define _T(str)
XmlRpcServer s
Definition: HelloServer.cpp:11
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition: KarLud.h:35

◆ word()

template<class _T >
short int bitmanip::word ( short  i,
const _T v 
)
inline

Definition at line 27 of file bitmanip.h.

28{
29 short shft = i*4;
30 _T mask = 0x000F << shft;
31 return (v & mask) >> shft;
32}