AuxDetDigit.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Definition of basic digits for auxiliary detectors
4 //
5 // brebel@fnal.gov
6 //
7 ////////////////////////////////////////////////////////////////////////
8 
9 #ifndef RAWDATA_AUXDETDIGIT_H
10 #define RAWDATA_AUXDETDIGIT_H
11 
12 #include <vector>
13 #include <iosfwd>
14 #include <string>
15 
16 ///Raw data description
17 namespace raw {
18 
19  class AuxDetDigit {
20 
21  public:
22  AuxDetDigit(); // Default constructor
23 
24  private:
25 
26  std::vector<short> fADC; ///< vector of adc counts
27  unsigned short fChannel; ///< channel in the readout
28  std::string fAuxDetName; ///< name of the detector
29  unsigned long long fTimeStamp; ///< timestamp, upper 32 bits
30  ///< for the seconds since 1970
31  ///< lower 32 for nanoseconds
32 
33 
34 static_assert(sizeof(unsigned long long)==8,"unsigned long long is not 8 bytes");
35 
36  public:
37 
38  AuxDetDigit(unsigned short channel,
39  std::vector<short> adclist,
40  std::string name="UknownAuxDet",
41  unsigned long long timeStamp=UINT64_MAX);
42 
43 
44  // Get Methods
45  size_t NADC() const;
46  short ADC(size_t i) const;
47  unsigned short Channel() const;
48  std::string const& AuxDetName() const;
49  unsigned long long TimeStamp() const;
50 
51  };
52 }
53 
54 
55 inline size_t raw::AuxDetDigit::NADC() const { return fADC.size(); }
56 inline unsigned short raw::AuxDetDigit::Channel() const { return fChannel; }
57 inline std::string const& raw::AuxDetDigit::AuxDetName() const { return fAuxDetName; }
58 inline unsigned long long raw::AuxDetDigit::TimeStamp() const { return fTimeStamp; }
59 
60 
61 #endif // RAWDATA_AUXDETDIGIT_H
62 
63 ////////////////////////////////////////////////////////////////////////
static QCString name
Definition: declinfo.cpp:673
unsigned short Channel() const
Definition: AuxDetDigit.h:56
unsigned long long TimeStamp() const
Definition: AuxDetDigit.h:58
unsigned short fChannel
channel in the readout
Definition: AuxDetDigit.h:27
std::string string
Definition: nybbler.cc:12
size_t NADC() const
Definition: AuxDetDigit.h:55
Raw data description.
uint8_t channel
Definition: CRTFragment.hh:201
std::string const & AuxDetName() const
Definition: AuxDetDigit.h:57
unsigned long long fTimeStamp
Definition: AuxDetDigit.h:29
std::vector< short > fADC
vector of adc counts
Definition: AuxDetDigit.h:26
std::string fAuxDetName
name of the detector
Definition: AuxDetDigit.h:28
short ADC(size_t i) const
Definition: AuxDetDigit.cxx:39