BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
Status.h
Go to the documentation of this file.
1//Dear emacs, this is -*- c++ -*-
2
3/**
4 * @file eformat/Status.h
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 * @brief A helper class to help the user to interpret the status information
11 * in the first status word and to code it properly.
12 */
13
14#ifndef EFORMAT_STATUS_H
15#define EFORMAT_STATUS_H
16
17#include <stdint.h>
18
19namespace eformat {
20
21 /**
22 * Defines possible generic errors for the status words
23 */
32
33 /**
34 * An alias
35 */
37
38 const uint32_t STATUS_FRONT = 0; ///< status goes in front of data block
39 const uint32_t STATUS_BACK = 1; ///< status goes after data block
40
41 /**
42 * The default status to use
43 */
44 const uint32_t DEFAULT_STATUS = NO_ERROR;
45
46 namespace helper {
47
48 /**
49 * Defines converters between version numbers and its components
50 */
51 class Status {
52
53 public:
54 /**
55 * Constructor. Takes the components to form a status
56 *
57 * @param gen The generic component
58 * @param spec The specific component
59 */
60 Status (eformat::GenericStatus gen, uint16_t spec)
61 : m_gen(gen), m_spec(spec) {}
62
63 /**
64 * Constructor. Takes the status to understand the components from.
65 *
66 * @param s The status number, fully built.
67 * @warning This status value <b>has</b> to conform to the current
68 * version of the library or unpredictable results might occur.
69 */
70 Status (uint32_t v);
71
72 /**
73 * Extracts the generic part of this status word
74 */
75 inline eformat::GenericStatus generic (void) const { return m_gen; }
76
77 /**
78 * Extracts the specific part of this status word
79 */
80 inline uint16_t specific (void) const { return m_spec; }
81
82 /**
83 * Gets the full 32-bit number made by assembling the 2 numbers
84 * above.
85 */
86 uint32_t code (void) const;
87
88 private: //representation
89
90 eformat::GenericStatus m_gen; ///< The generic part
91 uint16_t m_spec; ///< The specific part
92
93 };
94
95 }
96
97}
98
99#endif /* EFORMAT_STATUS_H */
**********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
eformat::GenericStatus generic(void) const
Definition Status.h:75
uint16_t specific(void) const
Definition Status.h:80
uint32_t code(void) const
Definition Status.cxx:21
Status(eformat::GenericStatus gen, uint16_t spec)
Definition Status.h:60
const uint32_t STATUS_FRONT
status goes in front of data block
Definition Status.h:38
const uint32_t STATUS_BACK
status goes after data block
Definition Status.h:39
GenericStatus
Definition Status.h:24
@ DATA_CORRUPTION
Definition Status.h:29
@ BCID_CHECK_FAIL
Definition Status.h:26
@ INTERNAL_OVERFLOW
Definition Status.h:30
@ TIMEOUT
Definition Status.h:28
@ LVL1ID_CHECK_FAIL
Definition Status.h:27
@ NO_ERROR
Definition Status.h:25
const uint32_t DEFAULT_STATUS
Definition Status.h:44