BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/TrkReco/include/TrkReco/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 : yoshihito.iwasaki@kek.jp
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
27public:
28 /// Constructor
30
31public:
32 /// Destructor
33 virtual ~TUpdater();
34
35public:
36 /// dumps debug information.
37 void dump( const std::string& message = std::string( "" ),
38 const std::string& prefix = std::string( "" ) ) const;
39
40public:
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
56private:
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 bool TUpdater::initialized( void ) const { return _init; }
75
76inline void TUpdater::initialize( void ) { _init = true; }
77
78inline void TUpdater::clear( void ) { _expN = -1; }
79
80#endif
81
82#undef inline
83
84#endif /* TUpdater_FLAG_ */
A class to handle update timing of static objects of tracking.
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
TUpdater()
Constructor.
virtual bool updated(void) const
returns true if an object is updated.
virtual void clear(void)
clears an object.
virtual void initialize(void)
initializes an object.
virtual bool initialized(void) const
returns true if an object is initialized.
virtual void update(void)
updates an object.
virtual ~TUpdater()
Destructor.
virtual void initialize(void)
initializes an object.
virtual bool initialized(void) const
returns true if an object is initialized.
virtual void clear(void)
clears an object.