BOSS
7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/MdcRecoUtil/MdcRecoUtil/Code.h
Go to the documentation of this file.
1
//--------------------------------------------------------------------------
2
// File and Version Information:
3
// $Id: Code.h,v 1.2 2009/12/23 02:59:56 zhangy Exp $
4
//
5
// Description:
6
// Class Header for |Code|
7
// Tell about success and failure
8
//
9
// Environment:
10
// Software developed for the BaBar Detector at the SLAC B-Factory.
11
//
12
// Author List:
13
// A. Snyder
14
//
15
// Copyright Information:
16
// Copyright (C) 1996 SLAC
17
//
18
// History:
19
// Migration for BESIII MDC
20
//
21
//------------------------------------------------------------------------
22
23
#ifndef Code_H
24
#define Code_H
25
26
#include <assert.h>
27
#include <stdlib.h>
28
29
//DEL class ostream;
30
31
class
Code
{
32
33
public
:
34
35
//constructors
36
37
//default to success, default success code is 1
38
Code
(
int
s
=1,
int
f
=0):_fail(0),_success(0)
39
{
40
if
(
f
==0) {
setSuccess
(
s
);}
41
else
if
(
s
==0) {
setFail
(
f
);}
42
}
43
44
//copy
45
Code
(
const
Code
&c)
46
:_fail(c.
fail
()),_success(c.
success
())
47
{}
48
49
//access
50
51
inline
int
fail
()
const
{
return
_fail;}
52
inline
int
success
()
const
{
return
_success;}
53
54
//set
55
inline
void
setFail
(
int
i)
56
{assert(i); _fail=i; _success=0;}
57
inline
void
setSuccess
(
int
i)
58
{assert(i); _success=i; _fail=0;}
59
60
61
private
:
62
63
//data
64
65
int
_fail;
// failure code
66
int
_success;
// success code
67
68
};
69
70
#endif
s
XmlRpcServer s
Definition:
HelloServer.cpp:11
Code
Definition:
InstallArea/include/MdcRecoUtil/MdcRecoUtil/Code.h:31
Code::Code
Code(const Code &c)
Definition:
InstallArea/include/MdcRecoUtil/MdcRecoUtil/Code.h:45
Code::setFail
void setFail(int i)
Definition:
InstallArea/include/MdcRecoUtil/MdcRecoUtil/Code.h:55
Code::setSuccess
void setSuccess(int i)
Definition:
InstallArea/include/MdcRecoUtil/MdcRecoUtil/Code.h:57
Code::Code
Code(int s=1, int f=0)
Definition:
InstallArea/include/MdcRecoUtil/MdcRecoUtil/Code.h:38
Code::success
int success() const
Definition:
InstallArea/include/MdcRecoUtil/MdcRecoUtil/Code.h:52
Code::fail
int fail() const
Definition:
InstallArea/include/MdcRecoUtil/MdcRecoUtil/Code.h:51
f
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
source
InstallArea
include
MdcRecoUtil
MdcRecoUtil
Code.h
Generated by
1.9.6