#include <L1PSNumber.h>
|  | 
| static int64_t | decodeFloat (const float psF) | 
|  | Calculates the NMD combination nearest to psF.  More... 
 | 
|  | 
| static int64_t | encodeNMD (const int nn, const unsigned int mm, const unsigned int dd) | 
|  | Returns INT64_T prescale number with the correct sign as it is stored in DB.  More... 
 | 
|  | 
|  | 
| static int64_t | makeLong (unsigned int n, unsigned int m, unsigned int d) | 
|  | Returns the POSITIVE int64_t of 3 ints.  More... 
 | 
|  | 
Definition at line 33 of file L1PSNumber.h.
 
◆ L1PSNumber() [1/5]
      
        
          | TrigConf::L1PSNumber::L1PSNumber | ( |  | ) |  | 
      
 
 
◆ L1PSNumber() [2/5]
      
        
          | TrigConf::L1PSNumber::L1PSNumber | ( | const float | ps | ) |  | 
      
 
 
◆ L1PSNumber() [3/5]
      
        
          | TrigConf::L1PSNumber::L1PSNumber | ( | const int64_t | ps | ) |  | 
      
 
 
◆ L1PSNumber() [4/5]
      
        
          | TrigConf::L1PSNumber::L1PSNumber | ( | const int | ps | ) |  | 
      
 
Simple constructor, sets only int. 
Definition at line 43 of file L1PSNumber.cxx.
   47         } 
else if (ps < 1 && ps>-1) {
 
 
 
 
◆ L1PSNumber() [5/5]
      
        
          | TrigConf::L1PSNumber::L1PSNumber | ( | const int | nn, | 
        
          |  |  | const unsigned int | mm, | 
        
          |  |  | unsigned const int | dd, | 
        
          |  |  | const int | ss = 1 | 
        
          |  | ) |  |  | 
      
 
 
◆ decodeFloat()
  
  | 
        
          | int64_t TrigConf::L1PSNumber::decodeFloat | ( | const float | psF | ) |  |  | static | 
 
Calculates the NMD combination nearest to psF. 
Returns the int64_t representation of NMD. 
Definition at line 167 of file L1PSNumber.cxx.
  169         int tmpN = (
int) psF;
 
  170         float psOne = psF / (
float) tmpN;
 
  186                     tmpPS = (
float) ((tmpM + tmpD + 1.0) / (tmpM + 1.0));
 
  187                     tmpDiff = fabs(tmpPS - psOne);
 
  188                     if (tmpPS * tmpN >= tmpN + 1) {
 
  191                     if (tmpDiff < 
diff) {
 
 
 
 
◆ encodeNMD()
  
  | 
        
          | int64_t TrigConf::L1PSNumber::encodeNMD | ( | const int | nn, |  
          |  |  | const unsigned int | mm, |  
          |  |  | const unsigned int | dd |  
          |  | ) |  |  |  | static | 
 
Returns INT64_T prescale number with the correct sign as it is stored in DB. 
Definition at line 207 of file L1PSNumber.cxx.
  210         unsigned int nTemp = 1;
 
 
 
 
◆ getD()
  
  | 
        
          | unsigned int TrigConf::L1PSNumber::getD | ( |  | ) | const |  | inline | 
 
 
◆ getFloatPrescale()
  
  | 
        
          | float TrigConf::L1PSNumber::getFloatPrescale | ( |  | ) | const |  | inline | 
 
 
◆ getInt32()
  
  | 
        
          | int TrigConf::L1PSNumber::getInt32 | ( |  | ) | const |  | inline | 
 
 
◆ getInt64()
  
  | 
        
          | int64_t TrigConf::L1PSNumber::getInt64 | ( |  | ) | const |  | inline | 
 
 
◆ getM()
  
  | 
        
          | unsigned int TrigConf::L1PSNumber::getM | ( |  | ) | const |  | inline | 
 
 
◆ getN()
  
  | 
        
          | unsigned int TrigConf::L1PSNumber::getN | ( |  | ) | const |  | inline | 
 
 
◆ getSign()
  
  | 
        
          | int TrigConf::L1PSNumber::getSign | ( |  | ) | const |  | inline | 
 
 
◆ makeLong()
  
  | 
        
          | int64_t TrigConf::L1PSNumber::makeLong | ( | unsigned int | nn, |  
          |  |  | unsigned int | mm, |  
          |  |  | unsigned int | dd |  
          |  | ) |  |  |  | staticprivate | 
 
Returns the POSITIVE int64_t of 3 ints. 
Takes care that no number is longer than it should. 
Definition at line 228 of file L1PSNumber.cxx.
  233         ret = (ret | ((dd & 0xF) << 
DSHIFT));
 
  234         ret = (ret | (nn & 
NMASK));
 
 
 
 
◆ setInt64()
  
  | 
        
          | void TrigConf::L1PSNumber::setInt64 | ( | const int64_t | prescaleBitArray | ) |  |  | private | 
 
Sets the N,M,D values from a Int64_t prescale value. 
- Parameters
- 
  
    | prescaleArray | the prescale as a long. |  
 
Decodeonly if ps > 0. Else PS=1.
Definition at line 124 of file L1PSNumber.cxx.
  125         unsigned int nTemp = 1;
 
  126         unsigned int mTemp = 0;
 
  127         unsigned int dTemp = 0;
 
  133         if (prescaleBitArray < 0) {
 
  135             psTemp = (
uint32_t) (-1 * prescaleBitArray);
 
  138             psTemp = (
uint32_t) prescaleBitArray;
 
  143         nTemp = psTemp&
NMASK;
 
 
 
 
◆ validate()
  
  | 
        
          | bool TrigConf::L1PSNumber::validate | ( | const int | nn, |  
          |  |  | const unsigned int | mm, |  
          |  |  | const unsigned int | dd, |  
          |  |  | const int | ss = 1 |  
          |  | ) |  |  |  | private | 
 
Checks whether the m_n,m_m,m_d combination is valid, i.e. 
whether m_n >= 1 && 1 < (m_m+m_d+1)/(m_m+1) < 2. Sets N, M, D & m_psFloat. 
Definition at line 93 of file L1PSNumber.cxx.
   95         if (nn <= -1 || nn >= 1) {
 
 
 
 
◆ write()
      
        
          | std::string TrigConf::L1PSNumber::write | ( |  | ) |  | 
      
 
 
◆ DMASK
  
  | 
        
          | const uint32_t TrigConf::L1PSNumber::DMASK = 0x0F000000 |  | staticprivate | 
 
 
◆ DSHIFT
  
  | 
        
          | const int TrigConf::L1PSNumber::DSHIFT = 24 |  | staticprivate | 
 
 
◆ m_d
  
  | 
        
          | unsigned int TrigConf::L1PSNumber::m_d |  | private | 
 
 
◆ m_m
  
  | 
        
          | unsigned int TrigConf::L1PSNumber::m_m |  | private | 
 
 
◆ m_n
  
  | 
        
          | unsigned int TrigConf::L1PSNumber::m_n |  | private | 
 
 
◆ m_psFloat
  
  | 
        
          | float TrigConf::L1PSNumber::m_psFloat |  | private | 
 
 
◆ m_psLong
  
  | 
        
          | int64_t TrigConf::L1PSNumber::m_psLong |  | private | 
 
 
◆ m_s
  
  | 
        
          | int TrigConf::L1PSNumber::m_s |  | private | 
 
 
◆ MMASK
  
  | 
        
          | const uint32_t TrigConf::L1PSNumber::MMASK = 0xF0000000 |  | staticprivate | 
 
 
◆ MSHIFT
  
  | 
        
          | const int TrigConf::L1PSNumber::MSHIFT = 28 |  | staticprivate | 
 
 
◆ NMASK
  
  | 
        
          | const uint32_t TrigConf::L1PSNumber::NMASK = 0x00FFFFFF |  | staticprivate | 
 
 
◆ s_auxLength
  
  | 
        
          | const int TrigConf::L1PSNumber::s_auxLength = 79 |  | staticprivate | 
 
 
◆ s_psAuxValues
  
  | 
        
          | const unsigned int TrigConf::L1PSNumber::s_psAuxValues |  | staticprivate | 
 
 
The documentation for this class was generated from the following files:
 
bool validate(const int nn, const unsigned int mm, const unsigned int dd, const int ss)
Checks whether the m_n,m_m,m_d combination is valid, i.e.