42 |
*/ |
*/ |
43 |
|
|
44 |
|
|
45 |
|
#include <stdio.h> |
46 |
|
#include <string.h> |
47 |
#include <fstream> |
#include <fstream> |
48 |
#include <sstream> |
#include <sstream> |
49 |
#include <iostream> |
#include <iostream> |
61 |
|
|
62 |
using namespace std; |
using namespace std; |
63 |
|
|
64 |
void PacketScan(TString base, TString outDir, TString format) |
void PacketScan(TString base, TString outDir, TString format){ |
|
{ |
|
65 |
|
|
66 |
TFile *file = new TFile(base.Data()); |
TFile *file = new TFile(base.Data()); |
67 |
|
|
94 |
finalCanv1->SetFillColor(10); |
finalCanv1->SetFillColor(10); |
95 |
TMultiGraph *mg1 = new TMultiGraph(); |
TMultiGraph *mg1 = new TMultiGraph(); |
96 |
mg1->SetTitle(oss.str().c_str()); |
mg1->SetTitle(oss.str().c_str()); |
97 |
TLegend *leg1 = new TLegend(0.82,0.60,0.99,0.99, ""); |
TLegend *leg1b = new TLegend(0.80,0.67,0.99,0.99, ""); |
98 |
|
|
99 |
|
|
100 |
TCanvas *finalCanv2 = new TCanvas("Packet_2", "PacketScan2", 1280, 1024); |
TCanvas *finalCanv2 = new TCanvas("Packet_2", "PacketScan2", 1280, 1024); |
101 |
finalCanv2->SetFillColor(10); |
finalCanv2->SetFillColor(10); |
102 |
TMultiGraph *mg2 = new TMultiGraph(); |
TMultiGraph *mg2 = new TMultiGraph(); |
103 |
mg2->SetTitle(oss.str().c_str()); |
mg2->SetTitle(oss.str().c_str()); |
104 |
TLegend *leg2 = new TLegend(0.82,0.60,0.99,0.99, ""); |
TLegend *leg2 = new TLegend(0.87,0.70,0.99,0.99, ""); |
105 |
|
|
106 |
|
|
107 |
|
|
108 |
TCanvas *finalCanv3 = new TCanvas("Packet_3", "PacketScan3", 1280, 1024); |
TCanvas *finalCanv3 = new TCanvas("Packet_3", "PacketScan3", 1280, 1024); |
109 |
finalCanv3->SetFillColor(10); |
finalCanv3->SetFillColor(10); |
110 |
TMultiGraph *mg3 = new TMultiGraph(); |
TMultiGraph *mg3 = new TMultiGraph(); |
111 |
mg3->SetTitle(oss.str().c_str()); |
mg3->SetTitle(oss.str().c_str()); |
112 |
TLegend *leg3 = new TLegend(0.82,0.60,0.99,0.99, ""); |
TLegend *leg3 = new TLegend(0.87,0.65,0.99,0.99, ""); |
|
|
|
113 |
|
|
114 |
|
TObject *key = new TObject; |
115 |
|
const char *name; |
116 |
|
char *SoftInfo="SoftInfo"; |
117 |
for (Int_t i=0; i<numkey; i++){ |
for (Int_t i=0; i<numkey; i++){ |
118 |
TObject *key = list->At(i); |
key = list->At(i); |
119 |
char *name=(char *)(key->GetName()); |
name=(char *)(key->GetName()); |
120 |
|
if(strcmp(name,SoftInfo)==0)continue; |
121 |
TTree* tr = (TTree*)file->Get(name); |
TTree* tr = (TTree*)file->Get(name); |
122 |
while((tr->IsZombie())){ |
if (tr->IsZombie()) continue; |
|
i++; |
|
|
TObject *key = list->At(i); |
|
|
char *name=(char *)(key->GetName()); |
|
|
TTree* tr = (TTree*)file->Get(name); |
|
|
} |
|
123 |
Long64_t nevents = tr->GetEntries(); |
Long64_t nevents = tr->GetEntries(); |
124 |
const Int_t size = nevents; |
const Int_t size = nevents; |
125 |
tr->SetBranchAddress("Header", &eh); |
tr->SetBranchAddress("Header", &eh); |
135 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
136 |
graph->SetMarkerColor(2); |
graph->SetMarkerColor(2); |
137 |
graph->SetMarkerStyle(21); |
graph->SetMarkerStyle(21); |
138 |
graph->SetMarkerSize(0.7); |
graph->SetMarkerSize(0.6); |
139 |
mg1->Add(graph); |
mg1->Add(graph); |
140 |
if (cont[0]==0) leg1->AddEntry(graph,"Physic End_Run (7=0x07)","p"); |
if (cont[0]==0) leg1b->AddEntry(graph,"PhysEndRun (0x07)","p"); |
141 |
cont[0]++; |
cont[0]++; |
142 |
break; |
break; |
143 |
} |
} |
145 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
146 |
graph->SetMarkerColor(2); |
graph->SetMarkerColor(2); |
147 |
graph->SetMarkerStyle(21); |
graph->SetMarkerStyle(21); |
148 |
graph->SetMarkerSize(0.6); |
graph->SetMarkerSize(0.5); |
149 |
mg1->Add(graph); |
mg1->Add(graph); |
150 |
if (cont[1]==0) leg1->AddEntry(graph,"EVENT PACKET (16=0x10)","p"); |
if (cont[1]==0) leg1b->AddEntry(graph,"Physics (0x10)","p"); |
151 |
cont[1]++; |
cont[1]++; |
152 |
break; |
break; |
153 |
} |
} |
155 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
156 |
graph->SetMarkerColor(4); |
graph->SetMarkerColor(4); |
157 |
graph->SetMarkerStyle(21); |
graph->SetMarkerStyle(21); |
158 |
graph->SetMarkerSize(1); |
graph->SetMarkerSize(0.9); |
159 |
mg1->Add(graph); |
mg1->Add(graph); |
160 |
if (cont[2]==0) leg1->AddEntry(graph,"Run Header (32=0x20)- Run Trailer (33=0x21)","p"); |
if (cont[2]==0) leg1b->AddEntry(graph,"RunHeader/Trailer (0x20/21)","p"); |
161 |
cont[2]++; |
cont[2]++; |
162 |
break; |
break; |
163 |
} |
} |
165 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
166 |
graph->SetMarkerColor(4); |
graph->SetMarkerColor(4); |
167 |
graph->SetMarkerStyle(21); |
graph->SetMarkerStyle(21); |
168 |
graph->SetMarkerSize(1); |
graph->SetMarkerSize(0.9); |
169 |
mg1->Add(graph); |
mg1->Add(graph); |
170 |
if (cont[2]==0) leg1->AddEntry(graph,"Run Header (32=0x20)- Run Trailer (33=0x21)","p"); |
if (cont[2]==0) leg1b->AddEntry(graph,"RunHeader/Trailer (0x20/21)","p"); |
171 |
cont[2]++; |
cont[2]++; |
172 |
break; |
break; |
173 |
} |
} |
176 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
177 |
graph->SetMarkerColor(2); |
graph->SetMarkerColor(2); |
178 |
graph->SetMarkerStyle(23); |
graph->SetMarkerStyle(23); |
179 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(1.2); |
180 |
mg1->Add(graph); |
mg1->Add(graph); |
181 |
if (cont[23]==0) leg1->AddEntry(graph,"Calib Cal_Pulse1 (8=0x08)","p"); |
if (cont[23]==0) leg1b->AddEntry(graph,"CalibCalPulse1 (0x08)","p"); |
182 |
cont[23]++; |
cont[23]++; |
183 |
break; |
break; |
184 |
} |
} |
186 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
187 |
graph->SetMarkerColor(3); |
graph->SetMarkerColor(3); |
188 |
graph->SetMarkerStyle(23); |
graph->SetMarkerStyle(23); |
189 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(1.2); |
190 |
mg1->Add(graph); |
mg1->Add(graph); |
191 |
if (cont[24]==0) leg1->AddEntry(graph,"Calib Cal_Pulse2 (9=0x09)","p"); |
if (cont[24]==0) leg1b->AddEntry(graph,"CalibCalPulse2 (0x09)","p"); |
192 |
cont[24]++; |
cont[24]++; |
193 |
break; |
break; |
194 |
} |
} |
196 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
197 |
graph->SetMarkerColor(4); |
graph->SetMarkerColor(4); |
198 |
graph->SetMarkerStyle(23); |
graph->SetMarkerStyle(23); |
199 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(1.2); |
200 |
mg1->Add(graph); |
mg1->Add(graph); |
201 |
if (cont[25]==0) leg1->AddEntry(graph,"Calib_Trk_Both (17=0x11)","p"); |
if (cont[25]==0) leg1b->AddEntry(graph,"CalibTrkBoth (0x11)","p"); |
202 |
cont[25]++; |
cont[25]++; |
203 |
break; |
break; |
204 |
} |
} |
206 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
207 |
graph->SetMarkerColor(5); |
graph->SetMarkerColor(5); |
208 |
graph->SetMarkerStyle(23); |
graph->SetMarkerStyle(23); |
209 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(1.2); |
210 |
mg1->Add(graph); |
mg1->Add(graph); |
211 |
if (cont[26]==0) leg1->AddEntry(graph,"Calib_Trk_1 (18=0x12)","p"); |
if (cont[26]==0) leg1b->AddEntry(graph,"CalibTrk1 (0x12)","p"); |
212 |
cont[26]++; |
cont[26]++; |
213 |
break; |
break; |
214 |
} |
} |
216 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
217 |
graph->SetMarkerColor(6); |
graph->SetMarkerColor(6); |
218 |
graph->SetMarkerStyle(23); |
graph->SetMarkerStyle(23); |
219 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(1.2); |
220 |
mg1->Add(graph); |
mg1->Add(graph); |
221 |
if (cont[27]==0) leg1->AddEntry(graph,"Calib_Trk_2 (19=0x13)","p"); |
if (cont[27]==0) leg1b->AddEntry(graph,"CalibTrk2 (0x13)","p"); |
222 |
cont[27]++; |
cont[27]++; |
223 |
break; |
break; |
224 |
} |
} |
225 |
case 21:{ |
case 29:{ |
226 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
227 |
graph->SetMarkerColor(30); |
graph->SetMarkerColor(30); |
228 |
graph->SetMarkerStyle(23); |
graph->SetMarkerStyle(23); |
229 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(1.2); |
230 |
mg1->Add(graph); |
mg1->Add(graph); |
231 |
if (cont[28]==0) leg1->AddEntry(graph,"Calib_Trd (21=0x15)","p"); |
if (cont[28]==0) leg1b->AddEntry(graph,"Calib_Cal (0x1d)","p"); |
232 |
cont[28]++; |
cont[28]++; |
233 |
break; |
break; |
234 |
} |
} |
236 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
237 |
graph->SetMarkerColor(9); |
graph->SetMarkerColor(9); |
238 |
graph->SetMarkerStyle(23); |
graph->SetMarkerStyle(23); |
239 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(1.2); |
240 |
mg1->Add(graph); |
mg1->Add(graph); |
241 |
if (cont[29]==0) leg1->AddEntry(graph,"Calib_Tof (22=0x16)","p"); |
if (cont[29]==0) leg1b->AddEntry(graph,"CalibTof (0x16)","p"); |
242 |
cont[29]++; |
cont[29]++; |
243 |
break; |
break; |
244 |
} |
} |
246 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
247 |
graph->SetMarkerColor(7); |
graph->SetMarkerColor(7); |
248 |
graph->SetMarkerStyle(23); |
graph->SetMarkerStyle(23); |
249 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(1.2); |
250 |
mg1->Add(graph); |
mg1->Add(graph); |
251 |
if (cont[30]==0) leg1->AddEntry(graph,"Calib_S4 (23=0x17)","p"); |
if (cont[30]==0) leg1b->AddEntry(graph,"CalibS4 (0x17)","p"); |
252 |
cont[30]++; |
cont[30]++; |
253 |
break; |
break; |
254 |
} |
} |
256 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
257 |
graph->SetMarkerColor(49); |
graph->SetMarkerColor(49); |
258 |
graph->SetMarkerStyle(23); |
graph->SetMarkerStyle(23); |
259 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(1.2); |
260 |
mg1->Add(graph); |
mg1->Add(graph); |
261 |
if (cont[31]==0) leg1->AddEntry(graph,"Calib_Cal_Ped (24=0x18)","p"); |
if (cont[31]==0) leg1b->AddEntry(graph,"CalibCalPed (0x18)","p"); |
262 |
cont[31]++; |
cont[31]++; |
263 |
break; |
break; |
264 |
} |
} |
266 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
267 |
graph->SetMarkerColor(33); |
graph->SetMarkerColor(33); |
268 |
graph->SetMarkerStyle(23); |
graph->SetMarkerStyle(23); |
269 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(1.2); |
270 |
mg1->Add(graph); |
mg1->Add(graph); |
271 |
if (cont[32]==0) leg1->AddEntry(graph,"Calib1_Ac_1 (25=0x19)","p"); |
if (cont[32]==0) leg1b->AddEntry(graph,"Calib1_Ac1 (0x19)","p"); |
272 |
cont[32]++; |
cont[32]++; |
273 |
break; |
break; |
274 |
} |
} |
276 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
277 |
graph->SetMarkerColor(21); |
graph->SetMarkerColor(21); |
278 |
graph->SetMarkerStyle(23); |
graph->SetMarkerStyle(23); |
279 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(1.2); |
280 |
mg1->Add(graph); |
mg1->Add(graph); |
281 |
if (cont[33]==0) leg1->AddEntry(graph,"Calib2_Ac_1 (26=0x1a)","p"); |
if (cont[33]==0) leg1b->AddEntry(graph,"Calib2_Ac1 (0x1a)","p"); |
282 |
cont[33]++; |
cont[33]++; |
283 |
break; |
break; |
284 |
} |
} |
286 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
287 |
graph->SetMarkerColor(16); |
graph->SetMarkerColor(16); |
288 |
graph->SetMarkerStyle(23); |
graph->SetMarkerStyle(23); |
289 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(1.2); |
290 |
mg1->Add(graph); |
mg1->Add(graph); |
291 |
if (cont[34]==0) leg1->AddEntry(graph,"Calib1_Ac_2 (27=0x1b)","p"); |
if (cont[34]==0) leg1b->AddEntry(graph,"Calib1_Ac2 (0x1b)","p"); |
292 |
cont[34]++; |
cont[34]++; |
293 |
break; |
break; |
294 |
} |
} |
296 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
297 |
graph->SetMarkerColor(37); |
graph->SetMarkerColor(37); |
298 |
graph->SetMarkerStyle(23); |
graph->SetMarkerStyle(23); |
299 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(1.2); |
300 |
mg1->Add(graph); |
mg1->Add(graph); |
301 |
if (cont[35]==0) leg1->AddEntry(graph,"Calib2_Ac_2 (28=0x1c)","p"); |
if (cont[35]==0) leg1b->AddEntry(graph,"Calib2_Ac2 (0x1c)","p"); |
302 |
cont[35]++; |
cont[35]++; |
303 |
break; |
break; |
304 |
} |
} |
306 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
307 |
graph->SetMarkerColor(41); |
graph->SetMarkerColor(41); |
308 |
graph->SetMarkerStyle(23); |
graph->SetMarkerStyle(23); |
309 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(1.2); |
310 |
mg1->Add(graph); |
mg1->Add(graph); |
311 |
if (cont[36]==0) leg1->AddEntry(graph,"Calib_Header (34=0x22) - Calib Trailer (35=0x23)","p"); |
if (cont[36]==0) leg1b->AddEntry(graph,"CalibHeader/Trailer (0x22/23)","p"); |
312 |
cont[36]++; |
cont[36]++; |
313 |
break; |
break; |
314 |
} |
} |
316 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
317 |
graph->SetMarkerColor(41); |
graph->SetMarkerColor(41); |
318 |
graph->SetMarkerStyle(23); |
graph->SetMarkerStyle(23); |
319 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(1.2); |
320 |
mg1->Add(graph); |
mg1->Add(graph); |
321 |
if (cont[36]==0) leg1->AddEntry(graph,"Calib_Header (34=0x22) - Calib Trailer (35=0x23)","p"); |
if (cont[36]==0) leg1b->AddEntry(graph,"CalibHeader/Trailer (0x22/23)","p"); |
322 |
cont[36]++; |
cont[36]++; |
323 |
break; |
break; |
324 |
} |
} |
327 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
328 |
graph->SetMarkerColor(20); |
graph->SetMarkerColor(20); |
329 |
graph->SetMarkerStyle(22); |
graph->SetMarkerStyle(22); |
330 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(1.2); |
331 |
mg1->Add(graph); |
mg1->Add(graph); |
332 |
if (cont[4]==0) leg1->AddEntry(graph,"init header (36=0x24)- init trailer (37=0x25)","p"); |
if (cont[4]==0) leg1b->AddEntry(graph,"InitHeader/Trailer (0x24/25)","p"); |
333 |
cont[4]++; |
cont[4]++; |
334 |
break; |
break; |
335 |
} |
} |
337 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
338 |
graph->SetMarkerColor(20); |
graph->SetMarkerColor(20); |
339 |
graph->SetMarkerStyle(22); |
graph->SetMarkerStyle(22); |
340 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(1.2); |
341 |
mg1->Add(graph); |
mg1->Add(graph); |
342 |
if (cont[4]==0) leg1->AddEntry(graph,"init header (36=0x24)- init trailer (37=0x25)","p"); |
if (cont[4]==0) leg1b->AddEntry(graph,"InitHeader/Trailer (0x24/25)","p"); |
343 |
cont[4]++; |
cont[4]++; |
344 |
break; |
break; |
345 |
} |
} |
347 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
348 |
graph->SetMarkerColor(3); |
graph->SetMarkerColor(3); |
349 |
graph->SetMarkerStyle(21); |
graph->SetMarkerStyle(21); |
350 |
graph->SetMarkerSize(1); |
graph->SetMarkerSize(0.9); |
351 |
mg2->Add(graph); |
mg2->Add(graph); |
352 |
if (cont[38]==0) leg2->AddEntry(graph,"Event_Tracker (48=0x30)","p"); |
if (cont[38]==0) leg2->AddEntry(graph,"EventTrk (0x30)","p"); |
353 |
cont[38]++; |
cont[38]++; |
354 |
break; |
break; |
355 |
} |
} |
358 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
359 |
graph->SetMarkerColor(2); |
graph->SetMarkerColor(2); |
360 |
graph->SetMarkerStyle(22); |
graph->SetMarkerStyle(22); |
361 |
graph->SetMarkerSize(1); |
graph->SetMarkerSize(0.9); |
362 |
mg2->Add(graph); |
mg2->Add(graph); |
363 |
if (cont[39]==0) leg2->AddEntry(graph,"Test_trk (64=0x40)","p"); |
if (cont[39]==0) leg2->AddEntry(graph,"Test_trk (0x40)","p"); |
364 |
cont[39]++; |
cont[39]++; |
365 |
break; |
break; |
366 |
} |
} |
368 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
369 |
graph->SetMarkerColor(3); |
graph->SetMarkerColor(3); |
370 |
graph->SetMarkerStyle(22); |
graph->SetMarkerStyle(22); |
371 |
graph->SetMarkerSize(1); |
graph->SetMarkerSize(0.9); |
372 |
mg2->Add(graph); |
mg2->Add(graph); |
373 |
if (cont[40]==0) leg2->AddEntry(graph,"Test_Tof (65=0x41)","p"); |
if (cont[40]==0) leg2->AddEntry(graph,"Test_Tof (0x41)","p"); |
374 |
cont[40]++; |
cont[40]++; |
375 |
break; |
break; |
376 |
} |
} |
379 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
380 |
graph->SetMarkerColor(3); |
graph->SetMarkerColor(3); |
381 |
graph->SetMarkerStyle(21); |
graph->SetMarkerStyle(21); |
382 |
graph->SetMarkerSize(1); |
graph->SetMarkerSize(0.9); |
383 |
mg2->Add(graph); |
mg2->Add(graph); |
384 |
if (cont[41]==0) leg2->AddEntry(graph,"Log Block (80=0x50)","p"); |
if (cont[41]==0) leg2->AddEntry(graph,"Log (0x50)","p"); |
385 |
cont[41]++; |
cont[41]++; |
386 |
break; |
break; |
387 |
} |
} |
390 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
391 |
graph->SetMarkerColor(2); |
graph->SetMarkerColor(2); |
392 |
graph->SetMarkerStyle(23); |
graph->SetMarkerStyle(23); |
393 |
graph->SetMarkerSize(1); |
graph->SetMarkerSize(0.9); |
394 |
mg2->Add(graph); |
mg2->Add(graph); |
395 |
if (cont[42]==0) leg2->AddEntry(graph,"Vardump Block (81=0X51)","p"); |
if (cont[42]==0) leg2->AddEntry(graph,"VarDump (0X51)","p"); |
396 |
cont[42]++; |
cont[42]++; |
397 |
break; |
break; |
398 |
} |
} |
400 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
401 |
graph->SetMarkerColor(3); |
graph->SetMarkerColor(3); |
402 |
graph->SetMarkerStyle(23); |
graph->SetMarkerStyle(23); |
403 |
graph->SetMarkerSize(1); |
graph->SetMarkerSize(0.9); |
404 |
mg2->Add(graph); |
mg2->Add(graph); |
405 |
if (cont[43]==0) leg2->AddEntry(graph,"Arrdump Block (82=0x52)","p"); |
if (cont[43]==0) leg2->AddEntry(graph,"ArrDump (x52)","p"); |
406 |
cont[43]++; |
cont[43]++; |
407 |
break; |
break; |
408 |
} |
} |
410 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
411 |
graph->SetMarkerColor(4); |
graph->SetMarkerColor(4); |
412 |
graph->SetMarkerStyle(23); |
graph->SetMarkerStyle(23); |
413 |
graph->SetMarkerSize(1); |
graph->SetMarkerSize(0.9); |
414 |
mg2->Add(graph); |
mg2->Add(graph); |
415 |
if (cont[44]==0) leg2->AddEntry(graph,"Tabdump Block (83=0x53)","p"); |
if (cont[44]==0) leg2->AddEntry(graph,"TabDump (0x53)","p"); |
416 |
cont[44]++; |
cont[44]++; |
417 |
break; |
break; |
418 |
} |
} |
421 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
422 |
graph->SetMarkerColor(2); |
graph->SetMarkerColor(2); |
423 |
graph->SetMarkerStyle(21); |
graph->SetMarkerStyle(21); |
424 |
graph->SetMarkerSize(1); |
graph->SetMarkerSize(0.9); |
425 |
mg2->Add(graph); |
mg2->Add(graph); |
426 |
if (cont[45]==0) leg2->AddEntry(graph,"Tmtc Block (84=0x54)","p"); |
if (cont[45]==0) leg2->AddEntry(graph,"Tmtc (0x54)","p"); |
427 |
cont[45]++; |
cont[45]++; |
428 |
break; |
break; |
429 |
} |
} |
432 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
433 |
graph->SetMarkerColor(4); |
graph->SetMarkerColor(4); |
434 |
graph->SetMarkerStyle(21); |
graph->SetMarkerStyle(21); |
435 |
graph->SetMarkerSize(1); |
graph->SetMarkerSize(0.9); |
436 |
mg2->Add(graph); |
mg2->Add(graph); |
437 |
if (cont[46]==0) leg2->AddEntry(graph,"Mcmd Block (85=0x55)","p"); |
if (cont[46]==0) leg2->AddEntry(graph,"Mcmd (0x55)","p"); |
438 |
cont[46]++; |
cont[46]++; |
439 |
break; |
break; |
440 |
} |
} |
441 |
|
case 96:{ |
442 |
|
TGraph *graph = new TGraph(1, obt, id); |
443 |
|
graph->SetMarkerColor(20); |
444 |
|
graph->SetMarkerStyle(21); |
445 |
|
graph->SetMarkerSize(0.9); |
446 |
|
mg2->Add(graph); |
447 |
|
if (cont[22]==0) leg2->AddEntry(graph,"ForceFECmd (0x60)","p"); |
448 |
|
cont[22]++; |
449 |
|
break; |
450 |
|
} |
451 |
case 112:{ |
case 112:{ |
452 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
453 |
graph->SetMarkerColor(1); |
graph->SetMarkerColor(1); |
454 |
graph->SetMarkerStyle(22); |
graph->SetMarkerStyle(22); |
455 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(0.9); |
456 |
mg3->Add(graph); |
mg3->Add(graph); |
457 |
if (cont[6]==0) leg3->AddEntry(graph,"ac_1_init (112=0x70)","p"); |
if (cont[6]==0) leg3->AddEntry(graph,"Ac1Init (0x70)","p"); |
458 |
cont[6]++; |
cont[6]++; |
459 |
break; |
break; |
460 |
} |
} |
462 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
463 |
graph->SetMarkerColor(2); |
graph->SetMarkerColor(2); |
464 |
graph->SetMarkerStyle(22); |
graph->SetMarkerStyle(22); |
465 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(0.9); |
466 |
mg3->Add(graph); |
mg3->Add(graph); |
467 |
if (cont[7]==0) leg3->AddEntry(graph,"cal_init (113=0x71)","p"); |
if (cont[7]==0) leg3->AddEntry(graph,"CalInit (0x71)","p"); |
468 |
cont[7]++; |
cont[7]++; |
469 |
break; |
break; |
470 |
} |
} |
472 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
473 |
graph->SetMarkerColor(3); |
graph->SetMarkerColor(3); |
474 |
graph->SetMarkerStyle(22); |
graph->SetMarkerStyle(22); |
475 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(0.9); |
476 |
mg3->Add(graph); |
mg3->Add(graph); |
477 |
if (cont[8]==0) leg3->AddEntry(graph,"trk_init (114=0x72)","p"); |
if (cont[8]==0) leg3->AddEntry(graph,"TrkInit (0x72)","p"); |
478 |
cont[8]++; |
cont[8]++; |
479 |
break; |
break; |
480 |
} |
} |
482 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
483 |
graph->SetMarkerColor(4); |
graph->SetMarkerColor(4); |
484 |
graph->SetMarkerStyle(22); |
graph->SetMarkerStyle(22); |
485 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(0.9); |
486 |
mg3->Add(graph); |
mg3->Add(graph); |
487 |
if (cont[9]==0) leg3->AddEntry(graph,"tof_init (115=0x73)","p"); |
if (cont[9]==0) leg3->AddEntry(graph,"TofInit (0x73)","p"); |
488 |
cont[9]++; |
cont[9]++; |
489 |
break; |
break; |
490 |
} |
} |
492 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
493 |
graph->SetMarkerColor(5); |
graph->SetMarkerColor(5); |
494 |
graph->SetMarkerStyle(22); |
graph->SetMarkerStyle(22); |
495 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(0.9); |
496 |
mg3->Add(graph); |
mg3->Add(graph); |
497 |
if (cont[10]==0) leg3->AddEntry(graph,"trg_init (116=0x74)","p"); |
if (cont[10]==0) leg3->AddEntry(graph,"TrgInit (0x74)","p"); |
498 |
cont[10]++; |
cont[10]++; |
499 |
break; |
break; |
500 |
} |
} |
502 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
503 |
graph->SetMarkerColor(6); |
graph->SetMarkerColor(6); |
504 |
graph->SetMarkerStyle(22); |
graph->SetMarkerStyle(22); |
505 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(0.9); |
506 |
mg3->Add(graph); |
mg3->Add(graph); |
507 |
if (cont[11]==0) leg3->AddEntry(graph,"nd_init (117=0x75)","p"); |
if (cont[11]==0) leg3->AddEntry(graph,"NdInit (0x75)","p"); |
508 |
cont[11]++; |
cont[11]++; |
509 |
break; |
break; |
510 |
} |
} |
512 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
513 |
graph->SetMarkerColor(7); |
graph->SetMarkerColor(7); |
514 |
graph->SetMarkerStyle(22); |
graph->SetMarkerStyle(22); |
515 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(0.9); |
516 |
mg3->Add(graph); |
mg3->Add(graph); |
517 |
if (cont[12]==0) leg3->AddEntry(graph,"s4_init (118=0x76)","p"); |
if (cont[12]==0) leg3->AddEntry(graph,"S4Init (0x76)","p"); |
518 |
cont[12]++; |
cont[12]++; |
519 |
break; |
break; |
520 |
} |
} |
522 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
523 |
graph->SetMarkerColor(32); |
graph->SetMarkerColor(32); |
524 |
graph->SetMarkerStyle(22); |
graph->SetMarkerStyle(22); |
525 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(0.9); |
526 |
mg3->Add(graph); |
mg3->Add(graph); |
527 |
if (cont[13]==0) leg3->AddEntry(graph,"ac_2_init (119=0x77)","p"); |
if (cont[13]==0) leg3->AddEntry(graph,"Ac2Init (0x77)","p"); |
528 |
cont[13]++; |
cont[13]++; |
529 |
break; |
break; |
530 |
} |
} |
533 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
534 |
graph->SetMarkerColor(1); |
graph->SetMarkerColor(1); |
535 |
graph->SetMarkerStyle(21); |
graph->SetMarkerStyle(21); |
536 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(0.7); |
537 |
mg3->Add(graph); |
mg3->Add(graph); |
538 |
if (cont[14]==0) leg3->AddEntry(graph,"cal_alarm (129=0x81)","p"); |
if (cont[14]==0) leg3->AddEntry(graph,"CalAlarm (0x81)","p"); |
539 |
cont[14]++; |
cont[14]++; |
540 |
break; |
break; |
541 |
} |
} |
543 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
544 |
graph->SetMarkerColor(42); |
graph->SetMarkerColor(42); |
545 |
graph->SetMarkerStyle(21); |
graph->SetMarkerStyle(21); |
546 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(0.7); |
547 |
mg3->Add(graph); |
mg3->Add(graph); |
548 |
if (cont[15]==0) leg3->AddEntry(graph,"ac1_alarm (130=0x82)","p"); |
if (cont[15]==0) leg3->AddEntry(graph,"Ac1Alarm (0x82)","p"); |
549 |
cont[15]++; |
cont[15]++; |
550 |
break; |
break; |
551 |
} |
} |
553 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
554 |
graph->SetMarkerColor(3); |
graph->SetMarkerColor(3); |
555 |
graph->SetMarkerStyle(21); |
graph->SetMarkerStyle(21); |
556 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(0.7); |
557 |
mg3->Add(graph); |
mg3->Add(graph); |
558 |
if (cont[16]==0) leg3->AddEntry(graph,"trk_alarm (131=0x83)","p"); |
if (cont[16]==0) leg3->AddEntry(graph,"TrkAlarm (0x83)","p"); |
559 |
cont[16]++; |
cont[16]++; |
560 |
break; |
break; |
561 |
} |
} |
563 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
564 |
graph->SetMarkerColor(4); |
graph->SetMarkerColor(4); |
565 |
graph->SetMarkerStyle(21); |
graph->SetMarkerStyle(21); |
566 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(0.7); |
567 |
mg3->Add(graph); |
mg3->Add(graph); |
568 |
if (cont[17]==0) leg3->AddEntry(graph,"trg_alarm (132=0x84)","p"); |
if (cont[17]==0) leg3->AddEntry(graph,"TrgAlarm (0x84)","p"); |
569 |
cont[17]++; |
cont[17]++; |
570 |
break; |
break; |
571 |
} |
} |
573 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
574 |
graph->SetMarkerColor(5); |
graph->SetMarkerColor(5); |
575 |
graph->SetMarkerStyle(21); |
graph->SetMarkerStyle(21); |
576 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(0.7); |
577 |
mg3->Add(graph); |
mg3->Add(graph); |
578 |
if (cont[18]==0) leg3->AddEntry(graph,"tof_alarm (133=0x85)","p"); |
if (cont[18]==0) leg3->AddEntry(graph,"TofAlarm (0x85)","p"); |
579 |
cont[18]++; |
cont[18]++; |
580 |
break; |
break; |
581 |
} |
} |
583 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
584 |
graph->SetMarkerColor(6); |
graph->SetMarkerColor(6); |
585 |
graph->SetMarkerStyle(21); |
graph->SetMarkerStyle(21); |
586 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(0.7); |
587 |
mg3->Add(graph); |
mg3->Add(graph); |
588 |
if (cont[19]==0) leg3->AddEntry(graph,"s4_alarm (134=0x86)","p"); |
if (cont[19]==0) leg3->AddEntry(graph,"S4Alarm (0x86)","p"); |
589 |
cont[19]++; |
cont[19]++; |
590 |
break; |
break; |
591 |
} |
} |
593 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
594 |
graph->SetMarkerColor(7); |
graph->SetMarkerColor(7); |
595 |
graph->SetMarkerStyle(21); |
graph->SetMarkerStyle(21); |
596 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(0.7); |
597 |
mg3->Add(graph); |
mg3->Add(graph); |
598 |
if (cont[20]==0) leg3->AddEntry(graph,"ac_alarm (136=0x88)","p"); |
if (cont[20]==0) leg3->AddEntry(graph,"Ac2Alarm (0x88)","p"); |
599 |
cont[20]++; |
cont[20]++; |
600 |
break; |
break; |
601 |
} |
} |
602 |
case 137:{ |
/*case 137:{ |
603 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
604 |
graph->SetMarkerColor(32); |
graph->SetMarkerColor(32); |
605 |
graph->SetMarkerStyle(21); |
graph->SetMarkerStyle(21); |
608 |
if (cont[21]==0) leg3->AddEntry(graph,"ac2_alarm (137=0x89)","p"); |
if (cont[21]==0) leg3->AddEntry(graph,"ac2_alarm (137=0x89)","p"); |
609 |
cont[21]++; |
cont[21]++; |
610 |
break; |
break; |
611 |
} |
} |
612 |
case 138:{ |
case 138:{ |
613 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
614 |
graph->SetMarkerColor(20); |
graph->SetMarkerColor(20); |
618 |
if (cont[22]==0) leg3->AddEntry(graph,"s4_adc_ac_2 (138=0x8a)","p"); |
if (cont[22]==0) leg3->AddEntry(graph,"s4_adc_ac_2 (138=0x8a)","p"); |
619 |
cont[22]++; |
cont[22]++; |
620 |
break; |
break; |
621 |
} |
}*/ |
622 |
case 161:{ |
case 161:{ |
623 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
624 |
graph->SetMarkerColor(3); |
graph->SetMarkerColor(2); |
625 |
graph->SetMarkerStyle(5); |
graph->SetMarkerStyle(3); |
626 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(1.1); |
627 |
mg3->Add(graph); |
mg3->Add(graph); |
628 |
if (cont[3]==0) leg3->AddEntry(graph,"TSB_T (161=0xA1)","p"); |
if (cont[3]==0) leg3->AddEntry(graph,"TsbT (0xA1)","p"); |
629 |
cont[3]++; |
cont[3]++; |
630 |
break; |
break; |
631 |
} |
} |
632 |
case 171:{ |
case 171:{ |
633 |
TGraph *graph = new TGraph(1, obt, id); |
TGraph *graph = new TGraph(1, obt, id); |
634 |
graph->SetMarkerColor(6); |
graph->SetMarkerColor(4); |
635 |
graph->SetMarkerStyle(5); |
graph->SetMarkerStyle(3); |
636 |
graph->SetMarkerSize(1.3); |
graph->SetMarkerSize(1.1); |
637 |
mg3->Add(graph); |
mg3->Add(graph); |
638 |
if (cont[5]==0) leg3->AddEntry(graph,"TSB_B (171=0xAB)","p"); |
if (cont[5]==0) leg3->AddEntry(graph,"TsbB (0xAB)","p"); |
639 |
cont[5]++; |
cont[5]++; |
640 |
break; |
break; |
641 |
} |
} |
650 |
|
|
651 |
finalCanv1->cd(); |
finalCanv1->cd(); |
652 |
mg1->SetMinimum(0); |
mg1->SetMinimum(0); |
653 |
mg1->SetMaximum(50); |
mg1->SetMaximum(55); |
654 |
mg1->Draw("AP"); |
mg1->Draw("AP"); |
655 |
leg1->Draw(); |
mg1->GetXaxis()->SetTitle("OBT (ms)"); |
656 |
|
mg1->GetXaxis()->CenterTitle(); |
657 |
|
mg1->GetYaxis()->SetTitle("Packet ID"); |
658 |
|
mg1->GetYaxis()->CenterTitle(); |
659 |
|
leg1b->Draw(); |
660 |
oss1.str(""); |
oss1.str(""); |
661 |
oss1 << outDir.Data() << filename.Data() << "_PacketScan_1." << format.Data(); |
oss1 << outDir.Data() << filename.Data() << "_PacketScan_1." << format.Data(); |
662 |
|
finalCanv1->Update(); |
663 |
finalCanv1->SaveAs(oss1.str().c_str()); |
finalCanv1->SaveAs(oss1.str().c_str()); |
664 |
|
|
665 |
|
|
666 |
finalCanv2->cd(); |
finalCanv2->cd(); |
667 |
mg2->SetMinimum(50); |
mg2->SetMinimum(60); |
668 |
mg2->SetMaximum(110); |
mg2->SetMaximum(100); |
669 |
mg2->Draw("AP"); |
mg2->Draw("AP"); |
670 |
|
mg2->GetXaxis()->SetTitle("OBT (ms)"); |
671 |
|
mg2->GetXaxis()->CenterTitle(); |
672 |
|
mg2->GetYaxis()->SetTitle("Packet ID"); |
673 |
|
mg2->GetYaxis()->CenterTitle(); |
674 |
leg2->Draw(); |
leg2->Draw(); |
675 |
oss2.str(""); |
oss2.str(""); |
676 |
oss2 << outDir.Data() << filename.Data() << "_PacketScan_2." << format.Data(); |
oss2 << outDir.Data() << filename.Data() << "_PacketScan_2." << format.Data(); |
677 |
|
finalCanv2->Update(); |
678 |
finalCanv2->SaveAs(oss2.str().c_str()); |
finalCanv2->SaveAs(oss2.str().c_str()); |
679 |
|
|
680 |
|
|
682 |
mg3->SetMinimum(110); |
mg3->SetMinimum(110); |
683 |
mg3->SetMaximum(180); |
mg3->SetMaximum(180); |
684 |
mg3->Draw("AP"); |
mg3->Draw("AP"); |
685 |
|
mg3->GetXaxis()->SetTitle("OBT (ms)"); |
686 |
|
mg3->GetXaxis()->CenterTitle(); |
687 |
|
mg3->GetYaxis()->SetTitle("Packet ID"); |
688 |
|
mg3->GetYaxis()->CenterTitle(); |
689 |
leg3->Draw(); |
leg3->Draw(); |
690 |
oss3.str(""); |
oss3.str(""); |
691 |
oss3 << outDir.Data() << filename.Data() << "_PacketScan_3." << format.Data(); |
oss3 << outDir.Data() << filename.Data() << "_PacketScan_3." << format.Data(); |
692 |
|
finalCanv3->Update(); |
693 |
finalCanv3->SaveAs(oss3.str().c_str()); |
finalCanv3->SaveAs(oss3.str().c_str()); |
694 |
|
|
695 |
|
|