BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/eformat/include/eformat/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:Andre.dos.Anjos@cern.ch">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 ) : m_gen( gen ), m_spec( spec ) {}
61
62 /**
63 * Constructor. Takes the status to understand the components from.
64 *
65 * @param s The status number, fully built.
66 * @warning This status value <b>has</b> to conform to the current
67 * version of the library or unpredictable results might occur.
68 */
69 Status( uint32_t v );
70
71 /**
72 * Extracts the generic part of this status word
73 */
74 inline eformat::GenericStatus generic( void ) const { return m_gen; }
75
76 /**
77 * Extracts the specific part of this status word
78 */
79 inline uint16_t specific( void ) const { return m_spec; }
80
81 /**
82 * Gets the full 32-bit number made by assembling the 2 numbers
83 * above.
84 */
85 uint32_t code( void ) const;
86
87 private: // representation
88 eformat::GenericStatus m_gen; ///< The generic part
89 uint16_t m_spec; ///< The specific part
90 };
91
92 } // namespace helper
93
94} // namespace eformat
95
96#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
uint32_t code(void) const
Definition Status.cxx:19
Status(eformat::GenericStatus gen, uint16_t spec)
const uint32_t STATUS_FRONT
status goes in front of data block
const uint32_t STATUS_BACK
status goes after data block