ThePEG  1.8.0
DebugItem.h
1 // -*- C++ -*-
2 #ifndef ThePEG_DebugItem_H
3 #define ThePEG_DebugItem_H
4 //
5 // This is the declaration of the DebugItem class.
6 //
7 
8 #include "ThePEG/Config/ThePEG.h"
9 
10 namespace ThePEG {
11 
22 class DebugItem {
23 
24 public:
25 
34  DebugItem(string itemname, int level = 100);
36 
37 public:
38 
45  static void setDebugItem(string itemname, long after = 0);
46 
50  static void tic();
51 
55  operator bool () const {
56 #ifndef ThePEG_NO_DEBUG
57  return debug;
58 #else
59  return false;
60 #endif
61  }
62 
63 private:
64 
68  bool debug;
69 
73  static long & ticker();
74 
78  static multimap<string,DebugItem*> & items();
79 
84  static multimap<long,DebugItem*> & itemtics();
85 
90  static map<string,long> & nametics();
91 
92 private:
93 
98  DebugItem & operator=(const DebugItem &);
99 
100 };
101 
102 }
103 
104 #endif /* ThePEG_DebugItem_H */