ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SyncObject.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SyncObject.cc
1 #include "SyncObject.h"
2 
3 #include <phool/phool.h>
4 
5 #include <iostream>
6 
7 class PHObject;
8 
10 {
11  std::cout << PHWHERE << "ERROR Reset() not implemented by daughter class" << std::endl;
12  return;
13 }
14 
15 void SyncObject::identify(std::ostream& os) const
16 {
17  os << "identify yourself: virtual SyncObject Object" << std::endl;
18  return;
19 }
20 
22 {
23  std::cout << PHWHERE << "isValid not implemented by daughter class" << std::endl;
24  return 0;
25 }
26 
27 PHObject*
29 {
30  std::cout << "SyncObject::CloneMe() not implemented by daughter class" << std::endl;
31  return nullptr;
32 }
33 
36 {
37  if (this != &source)
38  {
39  EventCounter(source.EventCounter());
40  EventNumber(source.EventNumber());
41  RunNumber(source.RunNumber());
42  SegmentNumber(source.SegmentNumber());
43  }
44  return *this;
45 }
46 
47 int SyncObject::Different(const SyncObject* other) const
48 {
49  int iret = 0;
50  if (EventNumber() != other->EventNumber())
51  {
52  iret += 0x1;
53  }
54  if (RunNumber() != other->RunNumber())
55  {
56  iret |= 0x2;
57  }
58  return iret;
59 }