BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
Version.cxx
Go to the documentation of this file.
1//Dear emacs, this is -*- c++ -*-
2
3/**
4 * @file Version.cxx
5 * @author <a href="mailto:[email protected]">Andre DOS ANJOS</a>
6 * $Author: zhangy $
7 * $Revision: 1.1.1.1 $
8 * $Date: 2009/06/19 07:35:41 $
9 *
10 * Implements the Version helper class.
11 */
12
13#include "eformat/Version.h"
14#include <sstream>
15
17 : m_minor(0xffff&v), m_major(v>>16)
18{
19}
20
21uint32_t eformat::helper::Version::code (void) const
22{
23 uint32_t retval = m_major;
24 retval <<= 16;
25 retval |= m_minor;
26 return retval;
27}
28
30{
31 std::ostringstream oss;
32 oss << (major2() >> 8) << "." << (major2() & 0xff);
33 return oss.str();
34}
35
37{
38 std::ostringstream oss;
39 oss << (minor2() >> 8) << "." << (minor2() & 0xff);
40 return oss.str();
41}
42
43std::string eformat::helper::Version::human (void) const
44{
45 std::string retval = human_major();
46 retval += "-";
47 retval += human_minor();
48 return retval;
49}
50
**********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
Defines a helper class to encode and decode version numbers.
std::string human_major(void) const
Definition Version.cxx:29
std::string human_minor(void) const
Definition Version.cxx:36
std::string human(void) const
Definition Version.cxx:43
Version(uint16_t minor, uint16_t major=MAJOR_DEFAULT_VERSION)
Definition Version.h:50
uint32_t code(void) const
Definition Version.cxx:21