Belle II Software  release-05-02-19
Debug.h
1 //-----------------------------------------------------------------------------
2 // $Id$
3 //-----------------------------------------------------------------------------
4 // Filename : Debug.h
5 // Section : TRG
6 // Owner : Yoshihito Iwasaki
7 // Email : yoshihito.iwasaki@kek.jp
8 //-----------------------------------------------------------------------------
9 // Description : Debug utility functions
10 //-----------------------------------------------------------------------------
11 // $Log$
12 //-----------------------------------------------------------------------------
13 
14 #ifndef TRGDebug_FLAG_
15 #define TRGDebug_FLAG_
16 
17 #include <vector>
18 #include <string>
19 
20 namespace Belle2 {
26  class TRGDebug {
28 
29  public:
30 
32  static int level(void);
33 
35  static int level(int newLevel, bool thisStageOnly = false);
36 
38  static void enterStage(const std::string& stageName);
39 
41  static void leaveStage(const std::string& stageName);
42 
44  static std::string tab(void);
45 
47  static std::string tab(int extra);
48 
49  private:
50 
52  static std::vector<std::string> _stages;
53 
55  static int _level;
56  };
57 
58 //-----------------------------------------------------------------------------
59 
61 } // namespace Belle2
62 
63 #endif /* TRGDebug_FLAG_ */
Belle2::TRGDebug::level
static int level(void)
returns the debug level.
Definition: Debug.cc:72
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TRGDebug::_level
static int _level
Debug level. 0:do nothing, 1:show you flow, 2:show you detail, 10:show you very detail.
Definition: Debug.h:55
Belle2::TRGDebug::_stages
static std::vector< std::string > _stages
Storage for stages.
Definition: Debug.h:52
Belle2::TRGDebug::tab
static std::string tab(void)
returns tab spaces.
Definition: Debug.cc:52
Belle2::TRGDebug::leaveStage
static void leaveStage(const std::string &stageName)
Declare that you leave a stage.
Definition: Debug.cc:39
Belle2::TRGDebug::enterStage
static void enterStage(const std::string &stageName)
Declare that you enter new stage.
Definition: Debug.cc:29