DAQHit.h
Go to the documentation of this file.
1 #ifndef DAQHIT_H
2 #define DAQHIT_H
3 
4 #include <vector>
5 #include <memory>
6 
7 //#ifndef __GCCXML__
8 //#include "boost/shared_ptr.hpp"
9 //#endif
10 
11 #include "DAQDataFormats/RawEvent.h"
12 #include "DAQDataFormats/RawDataBlock.h"
13 #include "DAQDataFormats/RawMicroBlock.h"
14 #include "DAQDataFormats/RawMilliSlice.h"
15 
16 #include "NovaDAQConventions/DAQConventions.h"
17 #include "DAQChannelMap/DAQChannelMap.h"
18 
20 
21 /********************************************************************
22  * The DAQHit class represents a single unpacked hit in the nova *
23  * detector. The DAQ Hit has one actual memeber which is a pointer *
24  * to the actual data structure that we are going to use for the *
25  * detector readout. This allows us to transparently change the *
26  * the underlying representation of the data without having to *
27  * mess with the class itself, and to perform shallow copies of the *
28  * hits when this is required. *
29  * anorman@fnal.gov *
30  ********************************************************************/
31 
32 namespace novaddt {
33  class DAQHitRdr;
34  class DAQHitWtr;
35  class DAQHit;
36 }
37 
39 public:
40  DAQHit();
41 
42 #ifndef __GCCXML__
43 
46 
47  // Constructor for testing
49  // Constructor for RawDigit2DAQHit
50  DAQHit(int detID,
51  //novadaq::cnv::DetID detID,
52  daqchannelmap::dchan channel,
53  novaddt::ADC adc,
54  novaddt::TDC tdc
55  );
56 
57  daqchannelmap::dchan const& Chan() const {return _theChannel;}
58 
59  void reset();
60 
61  void print() const;
62 
63 #endif
64  ~DAQHit();
65 
66  // NOTE: If the methods below are hidden from ROOT using
67  // #ifndef __GCCXML__ then CompareDAQHit fails when trying
68  // to make the dictionary.
69 
70  novaddt::Plane const& Plane() const { return _thePlane; }
71  novaddt::Cell const& Cell() const { return _theCell; }
72  novaddt::View const& View() const { return _theView; }
73  novaddt::ADC const& ADC() const { return _theADC; }
74  novaddt::TDC const& TDC() const { return _theTDC; }
75  int const& DetID() const { return _theDetID; }
76 
77  novaddt::DCM getDCM() const;
78  bool FEBOverflowError() const { return _FEBOverflowError; }
79 
80  // Accessors for the elements based on type (i.e. conversion operators)
81  operator novaddt::Plane() const { return Plane(); }
82  operator novaddt::Cell() const { return Cell(); }
83  operator novaddt::View() const { return View(); }
84  operator novaddt::ADC() const { return ADC(); }
85  operator novaddt::TDC() const { return TDC(); }
86  operator novaddt::DCM() const { return getDCM(); }
87 
88  bool operator==(const DAQHit& rhs) const
89  { return this->Plane() == rhs.Plane() && this->Cell() == rhs.Cell() && this->TDC() == rhs.TDC();}
90 
91 private:
93 
94  int _theDetID;
101 
103 };
104 
105 
106 #endif
novaddt::Plane _thePlane
Definition: DAQHit.h:96
novaddt::ADC ADC_Extraction(daqdataformats::RawNanoSlice *theNano) const
Definition: DAQHit.cxx:96
operator novaddt::View() const
Definition: DAQHit.h:83
bool _FEBOverflowError
Definition: DAQHit.h:102
novaddt::Plane const & Plane() const
Definition: DAQHit.h:70
novaddt::TDC const & TDC() const
Definition: DAQHit.h:74
void reset()
Definition: DAQHit.cxx:157
int _theDetID
Definition: DAQHit.h:94
operator novaddt::ADC() const
Definition: DAQHit.h:84
bool FEBOverflowError() const
Definition: DAQHit.h:78
daqchannelmap::dchan const & Chan() const
Definition: DAQHit.h:57
novaddt::Cell _theCell
Definition: DAQHit.h:97
operator novaddt::Plane() const
Definition: DAQHit.h:81
novaddt::ADC const & ADC() const
Definition: DAQHit.h:73
novaddt::View const & View() const
Definition: DAQHit.h:72
novaddt::TDC _theTDC
Definition: DAQHit.h:100
operator novaddt::TDC() const
Definition: DAQHit.h:85
novaddt::View _theView
Definition: DAQHit.h:98
novaddt::DCM getDCM() const
Definition: DAQHit.cxx:134
novaddt::ADC _theADC
Definition: DAQHit.h:99
int const & DetID() const
Definition: DAQHit.h:75
novaddt::Cell const & Cell() const
Definition: DAQHit.h:71
void print() const
Definition: DAQHit.cxx:148
uint32_t dchan
< DAQ Channel Map Package
operator novaddt::Cell() const
Definition: DAQHit.h:82
bool operator==(const DAQHit &rhs) const
Definition: DAQHit.h:88
daqchannelmap::dchan _theChannel
Definition: DAQHit.h:95