ATLAS Offline Software
IBlockFillerTool.icc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id$
6 /**
7  * @file D3PDMakerInterfaces/IBlockFillerTool.icc
8  * @author scott snyder <snyder@bnl.gov>
9  * @date Jul, 2009
10  * @brief Abstract interface for tool to fill a block in the D3PD.
11  */
12 
13 
14 namespace D3PD {
15 
16 
17 /**
18  * @brief StatusCode check helper: change @c AGAIN or @c EMPTY to @c SUCCESS.
19  * @param sc The StatusCode to check.
20  *
21  * If @a sc is @c AGAIN or @c EMPTY, then return @c SUCCESS.
22  * Otherwise, return @a sc.
23  */
24 inline
25 StatusCode IBlockFillerTool::againok (StatusCode sc)
26 {
27  if (sc.getCode() == AGAIN || sc.getCode() == EMPTY)
28  sc = StatusCode::SUCCESS;
29  return sc;
30 }
31 
32 
33 /**
34  * @brief StatusCode check helper: change @c AGAIN or @c EMPTY to @c SUCCESS.
35  * @param sc The StatusCode to check.
36  * @param scout[out] Accumulated status code.
37  *
38  * If @a sc is @c AGAIN or @c EMPTY, then return @c SUCCESS.
39  * Otherwise, return @a sc.
40  *
41  * If @a sc is @c AGAIN, then @a scout will be set to @c AGAIN.
42  * Otherwise, if @a sc is not @c EMPTY, then @c scout will be set to @c sc.
43  */
44 inline
45 StatusCode IBlockFillerTool::againok (StatusCode sc, StatusCode& scout)
46 {
47  if (sc.getCode() == AGAIN) {
48  sc = StatusCode::SUCCESS;
49  scout = StatusCode(AGAIN);
50  }
51  if (sc.getCode() == EMPTY)
52  sc = StatusCode::SUCCESS;
53  else
54  scout = sc;
55  return sc;
56 }
57 
58 
59 } // namespace D3PD