BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
BadVersionIssue.cxx
Go to the documentation of this file.
1//Dear emacs, this is -*- c++ -*-
2
3/**
4 * @file BadVersionIssue.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 bad-version Issue
11 */
12
14
15/**
16 * Strings to identify keys in ERS
17 */
18static const char* CURRENT_VERSION_KEY = "Current version";
19static const char* SUPPORTED_VERSION_KEY = "Supported version";
20
22 ers::severity_t severity,
23 uint16_t current,
24 uint16_t supported)
25 : eformat::Issue(context,severity)
26{
27 set_value(CURRENT_VERSION_KEY, current);
28 set_value(SUPPORTED_VERSION_KEY, supported);
29 finish_setup("Unsupported eformat version detected");
30}
31
33{
34 return get_int_value(CURRENT_VERSION_KEY);
35}
36
38{
39 return get_int_value(SUPPORTED_VERSION_KEY);
40}
41
42
43
Exception thrown when versions do not match.
uint16_t supported() const
BadVersionIssue(const ers::Context &context, ers::severity_t severity, uint16_t current, uint16_t supported)
Source context for Issue.
Definition: Context.h:42
void set_value(const std::string &key, uint8_t value)
Sets a value 8 bit unsigned.
void finish_setup(const std::string &message)
Finishes the setup of the Issue.
enum ers::_severity_t severity_t