EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHObject.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHObject.cc
1 #include "PHObject.h"
2 
3 #include "phool.h"
4 
5 #include <TSystem.h>
6 
7 #include <iostream>
8 
9 class TObject;
10 
11 PHObject*
13 {
14  std::cout << PHWHERE << " CloneMe() not implemented by daugther class"
15  << std::endl;
16  return nullptr;
17 }
18 
19 PHObject*
21 {
22  std::cout << PHWHERE << " clone() is obsolete" << std::endl;
23  return nullptr;
24 }
25 
26 void PHObject::identify(std::ostream& os) const
27 {
28  os << "identify yourself: I am a PHObject object" << std::endl;
29 }
30 
32 {
33  // This is bad, previous events are not cleared
34  std::cout << PHWHERE
35  << " Reset() not implemented for " << this->GetName()
36  << " PREVIOUS EVENT IS NOT CLEARED"
37  << std::endl;
38  std::cout << "You most probably miss a library, if so there are one or more messages at startup like:"
39  << std::endl
40  << std::endl;
41  std::cout << "Warning in <TClass::TClass>: no dictionary for class XXX is available"
42  << std::endl
43  << std::endl;
44  std::cout << "load the libraries which contain these classes and try again"
45  << std::endl;
46  gSystem->Exit(1);
47 }
48 
49 int PHObject::isValid() const
50 {
51  // give warning if this method is not implemented
52  std::cout << PHWHERE
53  << " isValid() not implemented by daughter class"
54  << std::endl;
55  return 0;
56 }
57 
58 int PHObject::isValid(const float) const
59 {
60  // give warning if this method is not implemented
61  std::cout << PHWHERE
62  << " isValid(const float f) not implemented by daughter class"
63  << std::endl;
64  return 0;
65 }
66 
67 int PHObject::isValid(const double) const
68 {
69  // give warning if this method is not implemented
70  std::cout << PHWHERE
71  << " isValid(const double) not implemented by daughter class"
72  << std::endl;
73  return 0;
74 }
75 
76 int PHObject::isValid(const int) const
77 {
78  // give warning if this method is not implemented
79  std::cout << PHWHERE
80  << " isValid(const int) not implemented by daughter class"
81  << std::endl;
82  return 0;
83 }
84 
85 int PHObject::isValid(const unsigned int) const
86 {
87  // give warning if this method is not implemented
88  std::cout << PHWHERE
89  << " isValid(const unsigned int) not implemented by daughter class"
90  << std::endl;
91  return 0;
92 }
93 
94 int PHObject::isImplemented(const float) const
95 {
96  // give warning if this method is not implemented
97  std::cout << PHWHERE
98  << " isImplemented(const float f) not implemented by daughter class"
99  << std::endl;
100  return 0;
101 }
102 
103 int PHObject::isImplemented(const double) const
104 {
105  // give warning if this method is not implemented
106  std::cout << PHWHERE
107  << " isImplemented(const double) not implemented by daughter class"
108  << std::endl;
109  return 0;
110 }
111 
112 int PHObject::isImplemented(const int) const
113 {
114  // give warning if this method is not implemented
115  std::cout << PHWHERE
116  << " isImplemented(const int) not implemented by daughter class"
117  << std::endl;
118  return 0;
119 }
120 
121 int PHObject::isImplemented(const unsigned int) const
122 {
123  // give warning if this method is not implemented
124  std::cout << PHWHERE
125  << " isImplemented(const unsigned int) not implemented by daughter class"
126  << std::endl;
127  return 0;
128 }
129 
130 
131 void PHObject::CopyFrom(const PHObject */*obj*/)
132 {
133  std::cout << PHWHERE
134  << " CopyFrom(const PHObject *obj) is not implemented" << std::endl;
135  gSystem->Exit(1);
136 }
137 
138 PHObject *PHObject::Clone(const char */*newname*/) const
139 {
140 std::cout << PHWHERE
141  << "You are overriding the TObject::Clone method which is not supported" << std::endl;
142  gSystem->Exit(1);
143  return nullptr;
144 }
145 
146 void PHObject::Copy (TObject &/*object*/) const
147 {
148 std::cout << PHWHERE
149  << "You are overriding the TObject::Copy method which is not supported" << std::endl;
150  gSystem->Exit(1);
151 }