36 for (
auto& mycrate :
mycrates) mycrate=0;
39 mydevice[0] =
"E-arm S1 ADCs on Left PMTs";
43 mydevice[1] =
"E-arm S1 ADCs on Right PMTs";
47 mydevice[2] =
"E-arm S2 ADCs on Left PMTs";
51 mydevice[3] =
"E-arm S2 ADCs on Right PMTs";
56 mydevice[4] =
"E-arm S1 TDCs on Left PMTs";
60 mydevice[5] =
"E-arm S1 TDCs on Right PMTs";
64 mydevice[6] =
"E-arm S2 TDCs on Left PMTs";
68 mydevice[7] =
"E-arm S2 TDCs on Right PMTs";
74 mydevice[8] =
"H-arm S1 ADCs on Left PMTs";
78 mydevice[9] =
"H-arm S1 ADCs on Right PMTs";
82 mydevice[10] =
"H-arm S2 ADCs on Left PMTs";
86 mydevice[11] =
"H-arm S2 ADCs on Right PMTs";
91 mydevice[12] =
"H-arm S1 TDCs on Left PMTs";
95 mydevice[13] =
"H-arm S1 TDCs on Right PMTs";
99 mydevice[14] =
"H-arm S2 TDCs on Left PMTs";
103 mydevice[15] =
"H-arm S2 TDCs on Right PMTs";
109 for (
int i=0; i<16; i++) {
115 if (((i+1)%4) == 0)
chanhi[i+16]=79;
119 for (
int i=0; i<16; i++) {
125 if (((i+1)%4) == 0)
chanhi[i+33]=79;
135 cout <<
"\n\n------------------------------------------------"<<endl;
136 cout <<
"Event type " << dec << evdata->
GetEvType() << endl;
137 cout <<
"Event length " << evdata->
GetEvLength() << endl;
138 cout <<
"Event number " << evdata->
GetEvNum() << endl;
139 cout <<
"Run number " << evdata->
GetRunNum() << endl;
142 if (evdata->
IsEpicsEvent()) cout <<
"Epics data" << endl;
144 cout <<
"Prescale data: \n Trig Prescale factor" << endl;
145 for (
int trig = 1; trig<=8; trig++) {
146 cout << dec <<
" " << trig <<
" ";
151 cout <<
"Scaler data. (it will remain static until";
152 cout <<
" next scaler event): "<<endl;
154 cout <<
"Scaler handling not (yet) implemented in this example class" << endl;
156 for (
unsigned sca = 0; sca < 3; sca++) {
157 for (
unsigned cha = 0; cha < 16; cha++) {
158 cout <<
"Scaler " << dec << sca <<
" channel " << cha;
159 cout <<
" data = (decimal) " << evdata->
GetScaler(
"left",sca,cha);
160 cout <<
" data = (hex) "<<hex<<evdata->
GetScaler(
"left",sca,cha)<<endl;
169 cout <<
"EPICS data handling not (yet) implemented in this example class" << endl;
171 cout <<
"BPM 3A, X IPM1H03A.XPOS = ";
173 cout <<
"BPM 3A, Y IPM1H03A.YPOS = ";
175 cout <<
"BPM 3B, X IPM1H03B.XPOS = ";
177 cout <<
"BPM 3B, Y IPM1H03B.YPOS = ";
179 cout <<
"Avg of 2 BCM, hac_bcm_average = ";
181 cout <<
"Energy halla_MeV = ";
190 cout <<
"-------- Test of RICH raw data ---------"<<endl;
191 for (
unsigned slot = 1; slot <= 16; slot++) {
192 cout <<
"Slot "<<slot<<endl;
195 for (
unsigned hit = 0; hit < evdata->
GetNumHits(crate,slot,
chan); hit++) {
196 cout <<
" ADC data = "<<evdata->
GetData(crate,slot,
chan,hit)<<endl;
202 unsigned long sum = 0;
203 for (
unsigned j = 0; j <
MAX; j++) {
208 bool firstone =
true;
216 for (
unsigned list = 0; list < evdata->
GetNumChan(crate,slot); list++) {
220 for (
unsigned hit = 0; hit < evdata->
GetNumHits(crate,slot,
chan); hit++) {
224 cout <<
"\n Data in " <<
mydevice[j]<<
" / ";
225 cout <<
"crate "<<dec<<crate<<
" / slot "<<slot<<endl;
228 cout <<
"channel " << dec <<
chan <<
" hit # " << hit;
229 cout <<
" data (decimal) = " <<
data;
230 cout <<
" data (hex) = " << hex <<
data << endl;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Bool_t IsEpicsEvent() const
Bool_t IsPhysicsTrigger() const
virtual UInt_t GetScaler(UInt_t, UInt_t, UInt_t) const
Bool_t IsPrescaleEvent() const
UInt_t GetNumHits(UInt_t crate, UInt_t slot, UInt_t chan) const
virtual UInt_t GetPrescaleFactor(UInt_t) const
UInt_t GetNextChan(UInt_t crate, UInt_t slot, UInt_t index) const
UInt_t GetNumChan(UInt_t crate, UInt_t slot) const
UInt_t GetEvLength() const
Bool_t IsScalerEvent() const
UInt_t GetData(UInt_t crate, UInt_t slot, UInt_t chan, UInt_t hit) const
virtual double GetEpicsData(const char *tag, UInt_t event=0) const
static const unsigned MAX
void process_event(THaEvData *evdata)