Diana Software
QSideNeighbour.cc
Go to the documentation of this file.
1 #include "QSideNeighbour.hh"
2 #include "QReader.hh"
3 #include "QEvent.hh"
4 #include "QRawEvent.hh"
5 
7 
8 void QSideNeighbour::Init(const QReader& reader)
9 {
10 }
11 
13 {
14  std::cout<<"QSideNeighbours 1"<<std::endl;
15  const QHeader& H1 = thisEvent.Get <QHeader>("DAQ","Header");
16  std::cout<<"QSideNeighbours 2"<<std::endl;
17  const QHeader& H2 = otherEvent.Get<QHeader>("DAQ","Header");
18  std::cout<<"QSideNeighbours 3"<<std::endl;
19 
21  if(H1.GetRun() == H2.GetRun() &&
22  H1.GetEventNumber() == H2.GetEventNumber()) info.fIsInWindow = true;
23  else info.fIsInWindow = false;
24 
25  info.fIsNeighbour = false;
26  if(info.fIsInWindow) {
27  const QPulseInfo& P1 = thisEvent.Get <QPulseInfo>("DAQ","PulseInfo");
28  const QPulseInfo& P2 = otherEvent.Get<QPulseInfo>("DAQ","PulseInfo");
29  // do not allow two sides to be neighbours
30  if(!P1.GetIsSide() || !P2.GetIsSide()) info.fIsNeighbour =true;
31  }
32  return info;
33 
34 }
35 
36 
38 
#define Q_END_NAMESPACE
Definition: QDiana.hh:22
#define Q_BEGIN_NAMESPACE
Definition: QDiana.hh:20
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 GetRun() const
destructor
Definition: QHeader.hh:22
int GetEventNumber() const
get EventNumber
Definition: QHeader.hh:25
Raw event: bolometer channel, trigger positions and types.
Definition: QPulseInfo.hh:18
bool GetIsSide() const
Get IsSide.
Definition: QPulseInfo.hh:56
Base class for diana event readers.
Definition: QReader.hh:50
void Init(const QReader &reader)
Initialization (empty)
NeighbourInfo GetNeighbourInfo(const QEvent &thisEvent, const QEvent &otherEvent)
Get the neighbour info about two events.