Diana Software
QSameChannelNeighbour.cc
Go to the documentation of this file.
2 #include "QTimeNeighbour.hh"
3 #include "QReader.hh"
4 #include "QEvent.hh"
5 #include "QRawEvent.hh"
6 #include <iostream>
7 
9 
11 {
12  QTimeNeighbour::Init(reader);
14 }
15 
17 {
18 
20 
21  if(info.fIsInWindow == false && info.fIsNeighbour == false) return info; //don't bother checking the channel if events aren't in the correct time window
22  else { //if the events might be neighbours, check the channels
23  const QPulseInfo& thisPulseInfo = thisEvent.Get<QPulseInfo>("DAQ","PulseInfo");
24  const QPulseInfo& otherPulseInfo = otherEvent.Get<QPulseInfo>("DAQ","PulseInfo");
25 
26  const int& channel = thisPulseInfo.GetChannelId();
27  const int& otherchannel = otherPulseInfo.GetChannelId();
28 
29 
30  if(channel != otherchannel) { //if channels don't match, set to false
31  info.fIsNeighbour = false;
32  }
33  return info;
34  }
35 }
37 
const int channel
#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: bolometer channel, trigger positions and types.
Definition: QPulseInfo.hh:18
const int & GetChannelId() const
Get ChannelId.
Definition: QPulseInfo.hh:22
FillStrategies fFillStrategy
Base class for diana event readers.
Definition: QReader.hh:50
void Init(const QReader &reader)
Initialization
QReaderNeighbour::NeighbourInfo GetNeighbourInfo(const QEvent &thisEvent, const QEvent &otherEvent)
Get the neighbour info for two events.
void Init(const QReader &reader)
Initialzation.
QReaderNeighbour::NeighbourInfo GetNeighbourInfo(const QEvent &thisEvent, const QEvent &otherEvent)
Get the neighbour info between two events.