Belle II Software  release-05-01-25
ERRORNo.cc
1 #include "daq/slc/base/ERRORNo.h"
2 
3 using namespace Belle2;
4 
5 const ERRORNo ERRORNo::UNKNOWN(0, "UNKNOWN");
6 const ERRORNo ERRORNo::NSMONLINE(11, "NSMONLINE");
7 const ERRORNo ERRORNo::NSMSENDREQ(12, "NSMSENDREQ");
8 const ERRORNo ERRORNo::NSMMEMOPEN(13, "SENOPEN");
9 const ERRORNo ERRORNo::NSMINIT(14, "NSMINIT");
10 const ERRORNo ERRORNo::DATABASE(31, "DATABASE");
11 
12 const ERRORNo& ERRORNo::operator=(const std::string& label)
13 {
14  if (label == NSMSENDREQ.getLabel()) {
15  return NSMSENDREQ;
16  } else if (label == NSMONLINE.getLabel()) {
17  return NSMONLINE;
18  } else if (label == NSMMEMOPEN.getLabel()) {
19  return NSMMEMOPEN;
20  } else if (label == NSMINIT.getLabel()) {
21  return NSMINIT;
22  } else if (label == DATABASE.getLabel()) {
23  return DATABASE;
24  } else {
25  return UNKNOWN;
26  }
27 }
28 
29 const ERRORNo& ERRORNo::operator=(int id)
30 {
31  if (id == NSMSENDREQ.getId()) {
32  return NSMSENDREQ;
33  } else if (id == NSMONLINE.getId()) {
34  return NSMONLINE;
35  } else if (id == NSMMEMOPEN.getId()) {
36  return NSMMEMOPEN;
37  } else if (id == NSMINIT.getId()) {
38  return NSMINIT;
39  } else if (id == DATABASE.getId()) {
40  return DATABASE;
41  }
42  return UNKNOWN;
43 }
44 
45 const ERRORNo& ERRORNo::operator=(const char* label)
46 {
47  if (label != NULL) *this = std::string(label);
48  else *this = Enum::UNKNOWN;
49  return *this;
50 }
51 
Belle2::ERRORNo
Definition: ERRORNo.h:12
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19