Class Reference for E1039 Core & Analysis Software
SQRun_v1.h
Go to the documentation of this file.
1 /*
2  * SQRun_v1.h
3  *
4  * Created on: Oct 29, 2017
5  * Author: yuhw
6  */
7 
8 #ifndef _H_SQRun_v1_H_
9 #define _H_SQRun_v1_H_
10 
11 #include <phool/PHObject.h>
12 
13 #include <map>
14 #include <iostream>
15 #include <limits>
16 #include <climits>
17 
18 #include "SQRun.h"
19 
20 class SQRun_v1: public SQRun {
21 
22 public:
23 
25 
26  virtual ~SQRun_v1();
27 
28  void Reset();
29 
30  virtual void identify(std::ostream& os = std::cout) const;
31 
32  virtual int get_run_id() const {return _run_id;}
33  virtual void set_run_id(const int a) {_run_id = a;}
34 
35  virtual int get_unix_time_begin() const { return _utime_b; }
36  virtual void set_unix_time_begin(const int a) { _utime_b = a; }
37 
38  virtual int get_unix_time_end() const { return _utime_e; }
39  virtual void set_unix_time_end(const int a) { _utime_e = a; }
40 
41  virtual int get_fpga_enabled(const int chan) const { return _fpga_enabled[chan]; }
42  virtual void set_fpga_enabled(const int chan, const int a) { _fpga_enabled[chan] = a; }
43 
44  virtual int get_nim_enabled(const int chan) const { return _nim_enabled[chan]; }
45  virtual void set_nim_enabled(const int chan, const int a) { _nim_enabled[chan] = a; }
46 
47  virtual int get_fpga_prescale(const int chan) const { return _fpga_prescale[chan]; }
48  virtual void set_fpga_prescale(const int chan, const int a) { _fpga_prescale[chan] = a; }
49 
50  virtual int get_nim_prescale(const int chan) const { return _nim_prescale[chan]; }
51  virtual void set_nim_prescale(const int chan, const int a) { _nim_prescale[chan] = a; }
52 
53  virtual std::string get_run_desc() const { return _run_desc; }
54  virtual void set_run_desc(const std::string a) { _run_desc = a; }
55 
56  virtual int get_n_fee_event() const { return _n_fee_event; }
57  virtual void set_n_fee_event(const int a) { _n_fee_event = a; }
58 
59  virtual int get_n_fee_prescale() const { return _n_fee_prescale; }
60  virtual void set_n_fee_prescale(const int a) { _n_fee_prescale = a; }
61 
62  virtual int get_n_run_desc() const { return _n_run_desc; }
63  virtual void set_n_run_desc(const int a) { _n_run_desc = a; }
64 
65  virtual int get_n_spill() const { return _n_spill; }
66  virtual void set_n_spill(const int a) { _n_spill = a; }
67 
68  virtual int get_n_evt_all() const { return _n_evt_all; }
69  virtual void set_n_evt_all(const int a) { _n_evt_all = a; }
70 
71  virtual int get_n_evt_dec() const { return _n_evt_dec; }
72  virtual void set_n_evt_dec(const int a) { _n_evt_dec = a; }
73 
74  virtual int get_n_phys_evt() const { return _n_phys_evt; }
75  virtual void set_n_phys_evt(const int a) { _n_phys_evt = a; }
76 
77  virtual int get_n_phys_evt_bad() const { return _n_phys_evt_bad; }
78  virtual void set_n_phys_evt_bad(const int a) { _n_phys_evt_bad = a; }
79 
80  virtual int get_n_flush_evt() const { return _n_flush_evt; }
81  virtual void set_n_flush_evt(const int a) { _n_flush_evt = a; }
82 
83  virtual int get_n_flush_evt_bad() const { return _n_flush_evt_bad; }
84  virtual void set_n_flush_evt_bad(const int a) { _n_flush_evt_bad = a; }
85 
86  virtual int get_n_hit() const { return _n_hit; }
87  virtual void set_n_hit(const int a) { _n_hit = a; }
88 
89  virtual int get_n_t_hit() const { return _n_t_hit; }
90  virtual void set_n_t_hit(const int a) { _n_t_hit = a; }
91 
92  virtual int get_n_hit_bad() const { return _n_hit_bad; }
93  virtual void set_n_hit_bad(const int a) { _n_hit_bad = a; }
94 
95  virtual int get_n_t_hit_bad() const { return _n_t_hit_bad; }
96  virtual void set_n_t_hit_bad(const int a) { _n_t_hit_bad = a; }
97 
98  virtual int get_n_v1495() const { return _n_v1495; }
99  virtual void set_n_v1495(const int a) { _n_v1495 = a; }
100 
101  virtual int get_n_v1495_d1ad() const { return _n_v1495_d1ad; }
102  virtual void set_n_v1495_d1ad(const int a) { _n_v1495_d1ad = a; }
103 
104  virtual int get_n_v1495_d2ad() const { return _n_v1495_d2ad; }
105  virtual void set_n_v1495_d2ad(const int a) { _n_v1495_d2ad = a; }
106 
107  virtual int get_n_v1495_d3ad() const { return _n_v1495_d3ad; }
108  virtual void set_n_v1495_d3ad(const int a) { _n_v1495_d3ad = a; }
109 
110 protected:
111  int _run_id;
112 
113  int _utime_b; //< Unix time of run beginning
114  int _utime_e; //< Unix time of run end
115 
116  int _fpga_enabled [5];
117  int _nim_enabled [5];
120 
121  std::string _run_desc;
122 
126  int _n_spill;
127  int _n_evt_all; //< N of all real (i.e. triggered) events
128  int _n_evt_dec; //< N of decoded real events
129  int _n_phys_evt; //< N of Coda standard-physics events
131  int _n_flush_evt; //< N of Coda flush events
133  int _n_hit; //< N of Taiwan-TDC hits
134  int _n_t_hit; //< N of v1495-TDC hits
135  int _n_hit_bad; //< N of bad hits
136  int _n_t_hit_bad; //< N of bad t-hits. Not implemented
137  int _n_v1495; //< N of all v1495 events
138  int _n_v1495_d1ad;//< N of d1ad v1495 events
139  int _n_v1495_d2ad;//< N of d2ad v1495 events
140  int _n_v1495_d3ad;//< N of d3ad v1495 events
141 
143 };
144 
145 #endif /* _H_SQRun_v1_H_ */
virtual int get_n_hit_bad() const
Return the number of bad Taiwan-TDC hits.
Definition: SQRun_v1.h:92
virtual int get_unix_time_begin() const
Return the Unix time when this run began.
Definition: SQRun_v1.h:35
virtual void set_n_v1495_d3ad(const int a)
Definition: SQRun_v1.h:108
virtual int get_nim_prescale(const int chan) const
Return the prescale factor of the given channel ('chan') of the NIM trigger in this run.
Definition: SQRun_v1.h:50
virtual int get_n_v1495() const
Return the number of all V1495 events.
Definition: SQRun_v1.h:98
virtual void set_n_t_hit(const int a)
Definition: SQRun_v1.h:90
int _n_hit_bad
Definition: SQRun_v1.h:135
virtual int get_n_v1495_d2ad() const
Return the number of V1495 events having 'd2ad'.
Definition: SQRun_v1.h:104
int _n_run_desc
Definition: SQRun_v1.h:125
virtual void set_unix_time_begin(const int a)
Definition: SQRun_v1.h:36
virtual void set_n_v1495(const int a)
Definition: SQRun_v1.h:99
virtual void set_n_fee_prescale(const int a)
Definition: SQRun_v1.h:60
virtual void set_run_id(const int a)
Definition: SQRun_v1.h:33
virtual int get_n_t_hit_bad() const
Return the number of bad V1495-TDC (i.e. trigger) hits.
Definition: SQRun_v1.h:95
virtual int get_n_run_desc() const
Return the number of run-description events.
Definition: SQRun_v1.h:62
int _n_flush_evt_bad
Definition: SQRun_v1.h:132
virtual void set_n_flush_evt_bad(const int a)
Definition: SQRun_v1.h:84
virtual int get_n_v1495_d3ad() const
Return the number of V1495 events having 'd3ad'.
Definition: SQRun_v1.h:107
virtual void set_n_evt_dec(const int a)
Definition: SQRun_v1.h:72
ClassDef(SQRun_v1, 1)
virtual int get_n_fee_event() const
Return the number of FEE events.
Definition: SQRun_v1.h:56
virtual int get_fpga_prescale(const int chan) const
Return the prescale factor of the given channel ('chan') of the FPGA trigger in this run.
Definition: SQRun_v1.h:47
virtual int get_n_phys_evt() const
Return the number of all PHYSICS events.
Definition: SQRun_v1.h:74
virtual int get_n_evt_all() const
Return the number of all recorded events.
Definition: SQRun_v1.h:68
virtual void set_n_v1495_d2ad(const int a)
Definition: SQRun_v1.h:105
int _nim_prescale[3]
Definition: SQRun_v1.h:119
virtual int get_fpga_enabled(const int chan) const
Return 'true' if the given channel ('chan') of the FPGA trigger was enabled in this run.
Definition: SQRun_v1.h:41
int _n_spill
Definition: SQRun_v1.h:126
virtual int get_n_evt_dec() const
Return the number of decoded events. The online decoding usually skips a part of events in order to f...
Definition: SQRun_v1.h:71
std::string _run_desc
Definition: SQRun_v1.h:121
int _n_t_hit
Definition: SQRun_v1.h:134
virtual int get_run_id() const
Return the run ID.
Definition: SQRun_v1.h:32
virtual void set_nim_enabled(const int chan, const int a)
Definition: SQRun_v1.h:45
virtual int get_n_flush_evt_bad() const
Return the number of bad FLUSH events.
Definition: SQRun_v1.h:83
int _n_v1495_d1ad
Definition: SQRun_v1.h:138
int _n_evt_dec
Definition: SQRun_v1.h:128
virtual void set_n_phys_evt(const int a)
Definition: SQRun_v1.h:75
virtual void set_n_flush_evt(const int a)
Definition: SQRun_v1.h:81
int _n_hit
Definition: SQRun_v1.h:133
int _run_id
Definition: SQRun_v1.h:111
virtual void set_n_v1495_d1ad(const int a)
Definition: SQRun_v1.h:102
int _n_t_hit_bad
Definition: SQRun_v1.h:136
virtual void set_fpga_prescale(const int chan, const int a)
Definition: SQRun_v1.h:48
int _n_v1495
Definition: SQRun_v1.h:137
virtual int get_n_hit() const
Return the number of all Taiwan-TDC hits.
Definition: SQRun_v1.h:86
int _n_phys_evt_bad
Definition: SQRun_v1.h:130
virtual int get_n_spill() const
Return the number of spill events.
Definition: SQRun_v1.h:65
virtual void set_n_t_hit_bad(const int a)
Definition: SQRun_v1.h:96
int _n_fee_prescale
Definition: SQRun_v1.h:124
virtual void set_n_hit_bad(const int a)
Definition: SQRun_v1.h:93
virtual void set_n_evt_all(const int a)
Definition: SQRun_v1.h:69
virtual ~SQRun_v1()
Definition: SQRun_v1.cxx:47
virtual int get_nim_enabled(const int chan) const
Return 'true' if the given channel ('chan') of the NIM trigger was enabled in this run.
Definition: SQRun_v1.h:44
int _fpga_prescale[5]
Definition: SQRun_v1.h:118
int _utime_e
Definition: SQRun_v1.h:114
virtual void set_nim_prescale(const int chan, const int a)
Definition: SQRun_v1.h:51
virtual void set_n_fee_event(const int a)
Definition: SQRun_v1.h:57
virtual int get_n_flush_evt() const
Return the number of all FLUSH events.
Definition: SQRun_v1.h:80
virtual int get_n_v1495_d1ad() const
Return the number of V1495 events having 'd1ad'.
Definition: SQRun_v1.h:101
virtual int get_n_fee_prescale() const
Return the number of FEE-prescale events.
Definition: SQRun_v1.h:59
virtual void identify(std::ostream &os=std::cout) const
Definition: SQRun_v1.cxx:55
int _n_phys_evt
Definition: SQRun_v1.h:129
int _utime_b
Definition: SQRun_v1.h:113
virtual std::string get_run_desc() const
Return the run description of this run.
Definition: SQRun_v1.h:53
virtual int get_unix_time_end() const
Return the Unix time when this run ended.
Definition: SQRun_v1.h:38
virtual void set_unix_time_end(const int a)
Definition: SQRun_v1.h:39
virtual void set_n_hit(const int a)
Definition: SQRun_v1.h:87
int _n_v1495_d3ad
Definition: SQRun_v1.h:140
int _n_flush_evt
Definition: SQRun_v1.h:131
int _n_fee_event
Definition: SQRun_v1.h:123
virtual void set_n_spill(const int a)
Definition: SQRun_v1.h:66
void Reset()
Clear Event.
Definition: SQRun_v1.cxx:51
virtual int get_n_phys_evt_bad() const
Return the number of bad PHYSICS events.
Definition: SQRun_v1.h:77
virtual void set_fpga_enabled(const int chan, const int a)
Definition: SQRun_v1.h:42
virtual void set_n_phys_evt_bad(const int a)
Definition: SQRun_v1.h:78
int _n_evt_all
Definition: SQRun_v1.h:127
virtual void set_n_run_desc(const int a)
Definition: SQRun_v1.h:63
int _fpga_enabled[5]
Definition: SQRun_v1.h:116
int _n_v1495_d2ad
Definition: SQRun_v1.h:139
virtual void set_run_desc(const std::string a)
Definition: SQRun_v1.h:54
int _nim_enabled[5]
Definition: SQRun_v1.h:117
virtual int get_n_t_hit() const
Return the number of all V1495-TDC (i.e. trigger) hits.
Definition: SQRun_v1.h:89
An SQ interface class to hold the run-level info.
Definition: SQRun.h:18