All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DAQHeader.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
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 //
10 ////////////////////////////////////////////////////////////////////////
11 
12 #ifndef DAQHEADER_H
13 #define DAQHEADER_H
14 
15 #include <time.h>
16 #include <stdint.h>
17 
18 namespace raw {
19 
20  class DAQHeader {
21  public:
22  DAQHeader(); // Default constructor
23 
24  private:
25 
26  unsigned int fStatus;
27  int fFixed;
28  unsigned short fFormat;
29  unsigned short fSoftware;
30  unsigned short fRun;
31  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
32  unsigned short fEvent;
33  time_t fTime;
34  short fSpare;
35  uint32_t fNchan;
36 
37 
38  public:
39 
40  DAQHeader(unsigned int status); // Ascii DAQ constructor
41  DAQHeader(unsigned int status, // Binary DAQ constructor - SubRun Specified
42  int fixed,
43  unsigned short format,
44  unsigned short software,
45  unsigned short run,
46  unsigned short subrun,
47  unsigned short event,
48  time_t time,
49  short spare,
50  uint32_t nchan);
51  DAQHeader(unsigned int status, // Binary DAQ constructor - SubRun Not Specified
52  int fixed,
53  unsigned short format,
54  unsigned short software,
55  unsigned short run,
56  unsigned short event,
57  time_t time,
58  short spare,
59  uint32_t nchan);
60 
61  // Set Methods
62  void SetStatus(unsigned int i);
63  void SetFixedWord(int i);
64  void SetFileFormat(unsigned short i);
65  void SetSoftwareVersion(unsigned short i);
66  void SetRun(unsigned short i);
67  void SetSubRun(unsigned short i);
68  void SetEvent(unsigned short i);
69  void SetTimeStamp(time_t t);
70  void SetSpareWord(short s);
71  void SetNChannels(uint32_t i);
72 
73  // Get Methods
74  unsigned int GetStatus() const;
75  int GetFixedWord() const;
76  unsigned short GetFileFormat() const;
77  unsigned short GetSoftwareVersion() const;
78  unsigned short GetRun() const;
79  unsigned short GetSubRun() const;
80  unsigned short GetEvent() const;
81  time_t GetTimeStamp() const;
82  short GetSpareWord() const;
83  uint32_t GetNChannels() const;
84 
85  };
86 }
87 
88 
89 inline void raw::DAQHeader::SetStatus(unsigned int i) { fStatus = i; }
90 inline void raw::DAQHeader::SetFixedWord(int i) { fFixed = i; }
91 inline void raw::DAQHeader::SetFileFormat(unsigned short i) { fFormat = i; }
92 inline void raw::DAQHeader::SetSoftwareVersion(unsigned short i) { fSoftware = i; }
93 inline void raw::DAQHeader::SetRun(unsigned short i) { fRun = i; }
94 inline void raw::DAQHeader::SetSubRun(unsigned short i) { fSubRun = i; }
95 inline void raw::DAQHeader::SetEvent(unsigned short i) { fEvent = i; }
96 inline void raw::DAQHeader::SetTimeStamp(time_t t) { fTime = t; }
97 inline void raw::DAQHeader::SetSpareWord(short s) { fSpare = s; }
98 inline void raw::DAQHeader::SetNChannels(uint32_t i) { fNchan = i; }
99 inline unsigned int raw::DAQHeader::GetStatus() const { return fStatus; }
100 inline int raw::DAQHeader::GetFixedWord() const { return fFixed; }
101 inline unsigned short raw::DAQHeader::GetFileFormat() const { return fFormat; }
102 inline unsigned short raw::DAQHeader::GetSoftwareVersion() const { return fSoftware; }
103 inline unsigned short raw::DAQHeader::GetRun() const { return fRun; }
104 inline unsigned short raw::DAQHeader::GetSubRun() const { return fSubRun; }
105 inline unsigned short raw::DAQHeader::GetEvent() const { return fEvent; }
106 inline time_t raw::DAQHeader::GetTimeStamp() const { return fTime; }
107 inline short raw::DAQHeader::GetSpareWord() const { return fSpare; }
108 inline uint32_t raw::DAQHeader::GetNChannels() const { return fNchan; }
109 
110 
111 #endif // DAQHEADER_H
112 
113 ////////////////////////////////////////////////////////////////////////
unsigned short fEvent
Definition: DAQHeader.h:32
unsigned int fStatus
Definition: DAQHeader.h:26
void SetSpareWord(short s)
Definition: DAQHeader.h:97
void SetRun(unsigned short i)
Definition: DAQHeader.h:93
unsigned short fRun
Definition: DAQHeader.h:30
static std::string format(PyObject *obj, unsigned int pos, unsigned int indent, unsigned int maxlen, unsigned int depth)
Definition: fclmodule.cxx:374
short fSpare
Definition: DAQHeader.h:34
void SetTimeStamp(time_t t)
Definition: DAQHeader.h:96
unsigned short fSoftware
Definition: DAQHeader.h:29
unsigned short GetSubRun() const
Definition: DAQHeader.h:104
unsigned short GetFileFormat() const
Definition: DAQHeader.h:101
uint32_t fNchan
Definition: DAQHeader.h:35
int GetFixedWord() const
Definition: DAQHeader.h:100
unsigned int GetStatus() const
Definition: DAQHeader.h:99
void SetSubRun(unsigned short i)
Definition: DAQHeader.h:94
unsigned short fFormat
Definition: DAQHeader.h:28
void SetNChannels(uint32_t i)
Definition: DAQHeader.h:98
time_t fTime
Definition: DAQHeader.h:33
then echo File list $list not found else cat $list while read file do echo $file sed s
Definition: file_to_url.sh:60
void SetFixedWord(int i)
Definition: DAQHeader.h:90
unsigned short GetRun() const
Definition: DAQHeader.h:103
short GetSpareWord() const
Definition: DAQHeader.h:107
unsigned short GetEvent() const
Definition: DAQHeader.h:105
then echo fcl sbnd_project sbnd_project sbnd_project sbnd_project software
uint32_t GetNChannels() const
Definition: DAQHeader.h:108
void SetSoftwareVersion(unsigned short i)
Definition: DAQHeader.h:92
unsigned short GetSoftwareVersion() const
Definition: DAQHeader.h:102
void SetEvent(unsigned short i)
Definition: DAQHeader.h:95
void SetStatus(unsigned int i)
Definition: DAQHeader.h:89
void SetFileFormat(unsigned short i)
Definition: DAQHeader.h:91
time_t GetTimeStamp() const
Definition: DAQHeader.h:106
unsigned short fSubRun
Definition: DAQHeader.h:31