Diana Software
QAllSideNeighbour.cc
Go to the documentation of this file.
1 #include "QAllSideNeighbour.hh"
2 #include "QReader.hh"
3 #include "QEvent.hh"
4 #include "QRawEvent.hh"
5 
6 
8 
9 void QAllSideNeighbour::Init(const QReader& reader){}
10 
12 {
13  const QHeader& H1 = thisEvent.Get <QHeader>("DAQ","Header");
14  const QHeader& H2 = otherEvent.Get<QHeader>("DAQ","Header");
15 
17  if(H1.GetEventNumber() == H2.GetEventNumber()) info.fIsInWindow = true;
18  else info.fIsInWindow = false;
19 
20  info.fIsNeighbour = false;
21  if(info.fIsInWindow) {
22  info.fIsNeighbour = true;
23  }
24  return info;
25 }
26 
27 
29 
#define Q_END_NAMESPACE
Definition: QDiana.hh:22
#define Q_BEGIN_NAMESPACE
Definition: QDiana.hh:20
void Init(const QReader &reader)
Initialization (empty)
NeighbourInfo GetNeighbourInfo(const QEvent &thisEvent, const QEvent &otherEvent)
Get the neighbour info of two events.
diana event
Definition: QEvent.hh:46
void Get(const char *owner, ReadHandle< Q > &handle) const
Get a QObject Handle in read mode.
Definition: QEvent.hh:74
Raw event: basic information like run number and time.
Definition: QHeader.hh:16
int GetEventNumber() const
get EventNumber
Definition: QHeader.hh:25
Base class for diana event readers.
Definition: QReader.hh:50