LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
DAQHeader.h
Go to the documentation of this file.
1 //
3 // Definition of basic DAQ header information
4 //
5 // brebel@fnal.gov
6 //
7 // -modified DAQHeader class to save all information available in
8 // binary version of DAQ480 software. - Mitch Soderberg 2/19/09
9 //
11 
12 #ifndef DAQHEADER_H
13 #define DAQHEADER_H
14 
15 #include <vector>
16 #include <iosfwd>
17 #include <time.h>
18 #include <stdint.h>
19 
20 namespace raw {
21 
22  class DAQHeader {
23  public:
24  DAQHeader(); // Default constructor
25 
26  private:
27 
28  unsigned int fStatus;
29  int fFixed;
30  unsigned short fFormat;
31  unsigned short fSoftware;
32  unsigned short fRun;
33  unsigned short fSubRun; //-> Added by D. Caratelli (dcaratelli@nevis.columbia.edu) after E. Church got approval @ Dec. 1st LArSoft mtg. This is a fucking nice comment. --kazu
34  unsigned short fEvent;
35  time_t fTime;
36  short fSpare;
37  uint32_t fNchan;
38 
39 
40  public:
41 
42  DAQHeader(unsigned int status); // Ascii DAQ constructor
43  DAQHeader(unsigned int status, // Binary DAQ constructor - SubRun Specified
44  int fixed,
45  unsigned short format,
46  unsigned short software,
47  unsigned short run,
48  unsigned short subrun,
49  unsigned short event,
50  time_t time,
51  short spare,
52  uint32_t nchan);
53  DAQHeader(unsigned int status, // Binary DAQ constructor - SubRun Not Specified
54  int fixed,
55  unsigned short format,
56  unsigned short software,
57  unsigned short run,
58  unsigned short event,
59  time_t time,
60  short spare,
61  uint32_t nchan);
62 
63  // Set Methods
64  void SetStatus(unsigned int i);
65  void SetFixedWord(int i);
66  void SetFileFormat(unsigned short i);
67  void SetSoftwareVersion(unsigned short i);
68  void SetRun(unsigned short i);
69  void SetSubRun(unsigned short i);
70  void SetEvent(unsigned short i);
71  void SetTimeStamp(time_t t);
72  void SetSpareWord(short s);
73  void SetNChannels(uint32_t i);
74 
75  // Get Methods
76  unsigned int GetStatus() const;
77  int GetFixedWord() const;
78  unsigned short GetFileFormat() const;
79  unsigned short GetSoftwareVersion() const;
80  unsigned short GetRun() const;
81  unsigned short GetSubRun() const;
82  unsigned short GetEvent() const;
83  time_t GetTimeStamp() const;
84  short GetSpareWord() const;
85  uint32_t GetNChannels() const;
86 
87  };
88 }
89 
90 
91 inline void raw::DAQHeader::SetStatus(unsigned int i) { fStatus = i; }
92 inline void raw::DAQHeader::SetFixedWord(int i) { fFixed = i; }
93 inline void raw::DAQHeader::SetFileFormat(unsigned short i) { fFormat = i; }
94 inline void raw::DAQHeader::SetSoftwareVersion(unsigned short i) { fSoftware = i; }
95 inline void raw::DAQHeader::SetRun(unsigned short i) { fRun = i; }
96 inline void raw::DAQHeader::SetSubRun(unsigned short i) { fSubRun = i; }
97 inline void raw::DAQHeader::SetEvent(unsigned short i) { fEvent = i; }
98 inline void raw::DAQHeader::SetTimeStamp(time_t t) { fTime = t; }
99 inline void raw::DAQHeader::SetSpareWord(short s) { fSpare = s; }
100 inline void raw::DAQHeader::SetNChannels(uint32_t i) { fNchan = i; }
101 inline unsigned int raw::DAQHeader::GetStatus() const { return fStatus; }
102 inline int raw::DAQHeader::GetFixedWord() const { return fFixed; }
103 inline unsigned short raw::DAQHeader::GetFileFormat() const { return fFormat; }
104 inline unsigned short raw::DAQHeader::GetSoftwareVersion() const { return fSoftware; }
105 inline unsigned short raw::DAQHeader::GetRun() const { return fRun; }
106 inline unsigned short raw::DAQHeader::GetSubRun() const { return fSubRun; }
107 inline unsigned short raw::DAQHeader::GetEvent() const { return fEvent; }
108 inline time_t raw::DAQHeader::GetTimeStamp() const { return fTime; }
109 inline short raw::DAQHeader::GetSpareWord() const { return fSpare; }
110 inline uint32_t raw::DAQHeader::GetNChannels() const { return fNchan; }
111 
112 
113 #endif // DAQHEADER_H
114 
unsigned short fEvent
Definition: DAQHeader.h:34
unsigned int fStatus
Definition: DAQHeader.h:28
Float_t s
Definition: plot.C:23
void SetSpareWord(short s)
Definition: DAQHeader.h:99
void SetRun(unsigned short i)
Definition: DAQHeader.h:95
unsigned short fRun
Definition: DAQHeader.h:32
short fSpare
Definition: DAQHeader.h:36
void SetTimeStamp(time_t t)
Definition: DAQHeader.h:98
Raw data description.
Definition: RawTypes.h:6
unsigned short fSoftware
Definition: DAQHeader.h:31
unsigned short GetSubRun() const
Definition: DAQHeader.h:106
unsigned short GetFileFormat() const
Definition: DAQHeader.h:103
uint32_t fNchan
Definition: DAQHeader.h:37
int GetFixedWord() const
Definition: DAQHeader.h:102
unsigned int GetStatus() const
Definition: DAQHeader.h:101
void SetSubRun(unsigned short i)
Definition: DAQHeader.h:96
unsigned short fFormat
Definition: DAQHeader.h:30
void SetNChannels(uint32_t i)
Definition: DAQHeader.h:100
time_t fTime
Definition: DAQHeader.h:35
void SetFixedWord(int i)
Definition: DAQHeader.h:92
unsigned short GetRun() const
Definition: DAQHeader.h:105
short GetSpareWord() const
Definition: DAQHeader.h:109
unsigned short GetEvent() const
Definition: DAQHeader.h:107
uint32_t GetNChannels() const
Definition: DAQHeader.h:110
void SetSoftwareVersion(unsigned short i)
Definition: DAQHeader.h:94
unsigned short GetSoftwareVersion() const
Definition: DAQHeader.h:104
void SetEvent(unsigned short i)
Definition: DAQHeader.h:97
void SetStatus(unsigned int i)
Definition: DAQHeader.h:91
void SetFileFormat(unsigned short i)
Definition: DAQHeader.h:93
time_t GetTimeStamp() const
Definition: DAQHeader.h:108
unsigned short fSubRun
Definition: DAQHeader.h:33
Event finding and building.