ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
msg_control.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file msg_control.h
1 #ifndef __MSG_CONTROL_H__
2 #define __MSG_CONTROL_H__
3 
4 #include "msg_profile.h"
5 #include "event_io.h"
6 #include <string.h>
7 
31 {
32  friend class msg_buffer;
33 
34  friend OSTREAM& operator<< (OSTREAM& , msg_control &);
35 
36 protected:
37 
38  int msg_type;
43 
44 
45  int activate();
46  int deactivate();
47 
48 public:
49 
50 
51  msg_control(const int mtype = MSG_TYPE_DEFAULT
52  , const int source = MSG_SOURCE_DEFAULT
53  , const int severity = MSG_SEV_DEFAULT
54  , const char *sourcecomponent = "ONLINE");
55 
56  virtual ~msg_control();
57 
58  virtual void set_severity(const int severity);
59  virtual int get_severity() const { return msg_severity;};
61  // set the message source id
62  virtual void set_source(const int source) {msg_source = source; };
63  virtual int get_source() const { return msg_source; };
64  virtual void set_sourcecomponent(const char * msgsourcecomponent = "ONLINE");
65  virtual const char * get_sourcecomponent(){ return msg_sourcecomponent; };
66 
67  static int xx_active;
68 
69 };
70 
71 #endif /* __MSG_CONTROL_H__ */