BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
TUpdater.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// $Id: TUpdater.h,v 1.4 2010/03/31 09:58:59 liucy Exp $
3//-----------------------------------------------------------------------------
4// Filename : TUpdater.h
5// Section : Tracking
6// Owner : Yoshi Iwasaki
7// Email : [email protected]
8//-----------------------------------------------------------------------------
9// Description : A class to handle update timing of static objects of tracking.
10// See http://bsunsrv1.kek.jp/~yiwasaki/tracking/
11//-----------------------------------------------------------------------------
12
13#ifndef TUpdater_FLAG_
14#define TUpdater_FLAG_
15
16#ifdef TRKRECO_DEBUG_DETAIL
17#ifndef TRKRECO_DEBUG
18#define TRKRECO_DEBUG
19#endif
20#endif
21
22#include <string>
23
24/// A class to handle update timing of static objects of tracking.
25class TUpdater {
26
27 public:
28 /// Constructor
29 TUpdater();
30
31 public:
32 /// Destructor
33 virtual ~TUpdater();
34
35 public:
36 /// dumps debug information.
37 void dump(const std::string & message = std::string(""),
38 const std::string & prefix = std::string("")) const;
39
40 public:
41 /// returns true if an object is updated.
42 virtual bool updated(void) const;
43
44 /// updates an object.
45 virtual void update(void);
46
47 /// returns true if an object is initialized.
48 virtual bool initialized(void) const;
49
50 /// initializes an object.
51 virtual void initialize(void);
52
53 /// clears an object.
54 virtual void clear(void);
55
56 private:
57 int _expN;
58 int _runN;
59 int _evtN;
60 bool _init;
61};
62
63//-----------------------------------------------------------------------------
64
65#ifdef TRKRECO_NO_INLINE
66#define inline
67#else
68#undef inline
69#define TUpdater_INLINE_DEFINE_HERE
70#endif
71
72#ifdef TUpdater_INLINE_DEFINE_HERE
73
74inline
75bool
77 return _init;
78}
79
80inline
81void
83 _init = true;
84}
85
86inline
87void
89 _expN = -1;
90}
91
92#endif
93
94#undef inline
95
96#endif /* TUpdater_FLAG_ */
A class to handle update timing of static objects of tracking.
Definition TUpdater.h:25
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
Definition TUpdater.cxx:26
TUpdater()
Constructor.
Definition TUpdater.cxx:19
virtual void update(void)
updates an object.
Definition TUpdater.cxx:37
virtual ~TUpdater()
Destructor.
Definition TUpdater.cxx:22
virtual bool initialized(void) const
returns true if an object is initialized.
Definition TUpdater.h:76
virtual void initialize(void)
initializes an object.
Definition TUpdater.h:82
virtual bool updated(void) const
returns true if an object is updated.
Definition TUpdater.cxx:57
virtual void clear(void)
clears an object.
Definition TUpdater.h:88