BOSS
7.1.2
BESIII Offline Software System
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
v
w
x
z
Typedefs
c
d
e
g
h
i
l
m
n
o
p
r
s
t
Enumerations
Enumerator
a
b
c
d
e
f
i
k
l
m
n
o
p
r
s
t
u
w
x
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
v
w
Enumerations
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
v
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Related Symbols
:
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
v
w
x
Files
File List
File Members
All
!
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
!
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
!
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
h
i
j
k
l
m
n
p
r
s
t
u
v
w
z
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
k
m
n
o
p
r
s
t
u
w
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
▼
BOSS
Used Packages
Requirements
►
How to use the ERS package
Todo List
►
Namespaces
►
Classes
▼
Files
▼
File List
▼
7.1.2
►
Analysis
►
BesCxxPolicy
►
BesExamples
►
BesPolicy
►
Calibration
►
Control
►
Database
►
DetectorDescription
►
DistBoss
►
DQA
►
Emc
▼
Event
►
AsciiDmp
►
BesDChain
►
DecayChain
►
DstEvent
►
DstMakerAlg
►
DstReformAlg
►
DTagSetAlg
►
eformat
▼
ers
▼
ers-00-00-03
►
ers
▼
src
Assertion.cxx
Context.cxx
Core.cxx
DefaultIssue.cxx
DefaultStream.cxx
EntityNotFoundIssue.cxx
FIFOStream.cxx
FilterStream.cxx
HumanStream.cxx
InvalidReferenceIssue.cxx
►
Issue.cxx
IssueFactory.cxx
IssueFactoryIssue.cxx
LogIssue.cxx
NotImplemented.cxx
ParseIssue.cxx
Precondition.cxx
RangeIssue.cxx
Stream.cxx
StreamFactory.cxx
►
test
►
EventModel
►
EventNavigator
►
EventTag
►
EvTimeEvent
►
EvtRecEvent
►
ExtEvent
►
GetRawETS
►
HltEvent
►
HltMakerAlg
►
IRawFile
►
LTagSetAlg
►
LumiDigi
►
McTruth
►
RawDataCnv
►
RawDataCnvBase
►
RawDataProviderSvc
►
RawEvent
►
RawEventReader
►
RawFile
►
RecMakerAlg
►
ReconEvent
►
RecTrackList
►
RelTable
►
RootCnvSvc
►
RootEventData
►
RootIO
►
RootRawEvtReader
►
RunEventNumberAlg
►
TagFilterSvc
►
TagSetAlg
►
TrigEvent
►
TrigMakerAlg
►
XYZTagSetAlg
►
ZddEvent
►
EventDisplay
►
EventFilter
►
EvtPreSelect
►
External
►
Generator
►
InstallArea
►
LumTauAlg
►
MagneticField
►
Mdc
►
Muc
►
OfflineEvtFilter
►
Reconstruction
►
RootPolicy
►
Simulation
►
Tof
►
Trigger
►
Utilities
►
Validation
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
Precondition.cxx
Go to the documentation of this file.
1
/*
2
* Precondition.cxx
3
* ers
4
*
5
* Created by Matthias Wiesmann on 08.12.04.
6
* Copyright 2004 CERN. All rights reserved.
7
*
8
*/
9
10
#include "
ers/Precondition.h
"
11
#include <iostream>
12
#include <sstream>
13
14
const
char
*
const
ers::Precondition::PRECONDITION_CLASS
=
"ers::Precondition"
;
15
16
namespace
{
17
ers::Issue
*create_issue() {
return
new
ers::Precondition
(); }
18
bool
registered =
ers::IssueFactory::instance
()->
register_issue
(
ers::Precondition::PRECONDITION_CLASS
,create_issue) ;
19
}
// anonymous context
20
21
/** Constructor used by deserialisation
22
*/
23
24
ers::Precondition::Precondition
() :
Assertion
() {}
25
26
/** Constructor used by subclasses
27
* \param c context of the issue
28
* \param s severity_t of the issue
29
* \param c context of the issue
30
*/
31
32
ers::Precondition::Precondition
(
const
Context
&c,
severity_t
s
) :
Assertion
(c,
s
) {}
33
34
/** Main constructor, it should be used for building Precondition Issues
35
* \param context context of the issue
36
* \param s severity_t of the issue
37
* \param condition text of the condition of the precondition
38
* \param msg message for condition
39
* \param constant_expression does compiler think expression is constant
40
*/
41
42
ers::Precondition::Precondition
(
const
Context
&context,
severity_t
s
,
const
char
*condition,
const
std::string &msg ,
bool
constant_expression) :
Assertion
(context,
s
) {
43
this->
setup
(condition,msg,constant_expression);
44
}
// Precondition
42
ers::Precondition::Precondition
(
const
Context
&context,
severity_t
s
,
const
char
*condition,
const
std::string &msg ,
bool
constant_expression) :
Assertion
(context,
s
) {
…
}
45
46
/** \return name key for the class */
47
48
const
char
*
ers::Precondition::get_class_name
()
const
throw () {
return
PRECONDITION_CLASS ;}
49
50
/** Builds the message associated with an assertion
51
* \param condition_text the condition in textual form
52
* \param msg the message associated with the condition
53
* \param constant_expression is the condition constant (as detected by compiler).
54
* \return message describing the failure of the assertion
55
*/
56
57
std::string
ers::Precondition::build_message
(
const
char
* condition_text,
const
std::string &msg,
bool
constant_expression)
throw
() {
58
std::ostringstream m ;
59
m <<
"Precondition '"
<< condition_text <<
"' failed: "
<< msg ;
60
if
(constant_expression) {
61
m <<
" (this condition is constant)"
;
62
}
// constant expression
63
return
m.str();
64
}
// build_message
57
std::string
ers::Precondition::build_message
(
const
char
* condition_text,
const
std::string &msg,
bool
constant_expression)
throw
() {
…
}
s
XmlRpcServer s
Definition
HelloServer.cpp:11
Precondition.h
ers::Assertion
This Issue represents a basic assertion.
Definition
Event/ers/ers-00-00-03/ers/Assertion.h:32
ers::Assertion::setup
void setup(const char *condition, const std::string &message, bool constant_expression)
Definition
Event/ers/ers-00-00-03/src/Assertion.cxx:56
ers::Context
Source context for Issue.
Definition
Context.h:42
ers::IssueFactory::register_issue
bool register_issue(const std::string &name, CreateIssueCallback creator)
register an issue factory
Definition
IssueFactory.cxx:47
ers::IssueFactory::instance
static IssueFactory * instance()
method to access singleton
Definition
IssueFactory.cxx:28
ers::Issue
Root Issue class.
Definition
ers/ers-00-00-03/ers/Issue.h:40
ers::Precondition
Precondition issue.
Definition
Precondition.h:24
ers::Precondition::Precondition
Precondition()
Definition
Precondition.cxx:24
ers::Precondition::build_message
virtual std::string build_message(const char *condition_text, const std::string &message, bool constant_expression=false)
Definition
Precondition.cxx:57
ers::Precondition::get_class_name
virtual const char * get_class_name() const
Definition
Precondition.cxx:48
ers::Precondition::PRECONDITION_CLASS
static const char *const PRECONDITION_CLASS
Definition
Precondition.h:29
ers::severity_t
enum ers::_severity_t severity_t
7.1.2
Event
ers
ers-00-00-03
src
Precondition.cxx
Generated by
1.12.0