Changeset 5830 for trunk/MagicSoft
- Timestamp:
- 01/14/05 09:52:47 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r5829 r5830 20 20 21 21 -*-*- END OF LINE -*-*- 22 23 2005/01/14 Daniela Dorner 24 25 * macros/sql/filldotrun.C 26 - added new arehucas-verions and changed code accordingly 27 28 22 29 23 30 2005/01/13 Abelardo Moralejo -
trunk/MagicSoft/Mars/macros/sql/filldotrun.C
r4879 r5830 34 34 // 35 35 // To following Arehucas versions are Currently supported: 36 // 040505-0 37 // 04051 4-038 // 04 0518-036 // 040505-0, 040514-0, 37 // 040518-0, 040727-0, 38 // 041113-0, 041209-0, 041221-0 39 39 // 40 40 // Usage: … … 175 175 176 176 Int_t version = atoi(arehucas.Data()); 177 if (version!=200405050 && version!=200405140 && version!=200405180) 177 if (version!=200405050 && version!=200405140 && version!=200405180 178 && version!=200407270 && version!=200411130 && 179 version!=200412090 && version!=200412210) 178 180 { 179 181 cout << filename << ": File Version unknown - please update the macro!" << endl; … … 216 218 } 217 219 218 // ========== Col 1: Run Type =========220 // ========== Col 2: Run Type ========= 219 221 strng.ReadToDelim(fin, ' '); 220 222 if (strng.Contains("???")) … … 231 233 //cout << runtype << " "; 232 234 233 // ========== Col 2,3: Start Time =========235 // ========== Col 3,4: Start Time ========= 234 236 TString startdate, starttime; 235 237 startdate.ReadToDelim(fin, ' '); … … 237 239 //cout << startdate << " " << starttime << " "; 238 240 239 // ========== Col 4,5: Stop Time =========241 // ========== Col 5,6: Stop Time ========= 240 242 TString stopdate, stoptime; 241 243 stopdate.ReadToDelim(fin, ' '); … … 252 254 stoptime="00:00:00"; 253 255 254 // ========== Col 6: Source Name =========256 // ========== Col 7: Source Name ========= 255 257 strng.ReadToDelim(fin, ' '); 256 258 if (strng.Contains("???")) … … 265 267 //cout << sourcekey << " "; 266 268 267 // ========== Col 7, 8: Local source position =========269 // ========== Col 8,9: Local source position ========= 268 270 strng.ReadToDelim(fin, ' '); 269 271 Float_t zd = atof(strng.Data()); … … 274 276 //cout << zd << " " << az << " "; 275 277 276 // ========== Col 9: Number of Events =========278 // ========== Col 10: Number of Events ========= 277 279 strng.ReadToDelim(fin, ' '); 278 280 Int_t evtno = atoi(strng.Data()); … … 280 282 //cout << evtno << " "; 281 283 282 // ========== Col 1 0: Project Name =========284 // ========== Col 11: Project Name ========= 283 285 strng.ReadToDelim(fin, ' '); 284 286 if (strng.Contains("???")) … … 293 295 //cout << projkey << " "; 294 296 295 // ========== Col 10: Trigger Table Name ========= 297 // ========== Col 12: Trigger Table Name ========= 298 // starting from version 200411130: Col 12,13: Trigger Table Name ========= 296 299 strng.ReadToDelim(fin, ' '); 297 300 if (strng.Contains("???")) 298 301 strng="n/a"; 299 302 300 Int_t triggerkey = QueryNameKEY(serv, dummy, "TriggerTable", strng.Data()); 301 if (triggerkey<0) 302 { 303 strng.ReadLine(fin); 304 continue; 305 } 306 //cout << triggerkey << " "; 307 308 // ========== Col 11-13: TrigRate, L2 UnPresc Rate, L2 Presc Rate ========== 303 if (version >=200411130) 304 { 305 Int_t l1triggerkey = QueryNameKEY(serv, dummy, "L1TriggerTable", strng.Data()); 306 if (l1triggerkey<0) 307 { 308 strng.ReadLine(fin); 309 continue; 310 } 311 312 strng.ReadToDelim(fin, ' '); 313 if (strng.Contains("???")) 314 strng="n/a"; 315 316 Int_t l2triggerkey = QueryNameKEY(serv, dummy, "L2TriggerTable", strng.Data()); 317 if (l2triggerkey<0) 318 { 319 strng.ReadLine(fin); 320 continue; 321 } 322 } 323 else 324 { 325 Int_t c=0; 326 327 if (strng.Contains(":")) 328 c=1; 329 330 if (strng.Contains("L1_") && !(strng.Contains(":"))) 331 c=2; 332 333 if (strng.Contains("n/a")) 334 c=3; 335 336 switch (c) 337 { 338 case 0: 339 { 340 Int_t l2triggerkey = QueryNameKEY(serv, dummy, "L2TriggerTable", strng.Data()); 341 if (l2triggerkey<0) 342 { 343 strng.ReadLine(fin); 344 continue; 345 } 346 347 strng="n/a"; 348 Int_t l1triggerkey = 1; 349 350 break; 351 } 352 case 1: 353 { 354 TString L1TT, L2TT; 355 L2TT=strng(7,12); 356 L1TT=strng(0,6); 357 358 Int_t l1triggerkey = QueryNameKEY(serv, dummy, "L1TriggerTable", L1TT.Data()); 359 if (l1triggerkey<0) 360 { 361 strng.ReadLine(fin); 362 continue; 363 } 364 365 Int_t l2triggerkey = QueryNameKEY(serv, dummy, "L2TriggerTable", L2TT.Data()); 366 if (l2triggerkey<0) 367 { 368 strng.ReadLine(fin); 369 continue; 370 } 371 372 break; 373 } 374 case 2: 375 { 376 Int_t l1triggerkey = QueryNameKEY(serv, dummy, "L1TriggerTable", strng.Data()); 377 if (l1triggerkey<0) 378 { 379 strng.ReadLine(fin); 380 continue; 381 } 382 383 strng="n/a"; 384 Int_t l2triggerkey = 1; 385 386 break; 387 } 388 case 3: 389 { 390 Int_t l1triggerkey = 1; 391 Int_t l2triggerkey = 1; 392 break; 393 } 394 default: 395 { 396 cout << "WARNING: neiter L1 nor L2 Trigger table - please check what is happening." << strng << endl; 397 break; 398 } 399 } 400 } 401 402 // ========== Col 13-15: TrigRate, L2 UnPresc Rate, L2 Presc Rate ========== 309 403 strng.ReadToDelim(fin, ' '); 310 404 Float_t trigrate = atof(strng.Data()); … … 316 410 Float_t l2prrate = atof(strng.Data()); 317 411 318 // ========== Col 1 4,15: DaqRate, Storage Rate ==========412 // ========== Col 16,17: DaqRate, Storage Rate ========== 319 413 strng.ReadToDelim(fin, ' '); 320 414 Float_t daqrate = atof(strng.Data()); … … 323 417 Float_t storerate = atof(strng.Data()); 324 418 325 // ========== Col 1 6: HV table =========419 // ========== Col 18: HV table ========= 326 420 if (version==200405050 || version==200405140) 327 421 strng.ReadToDelim(fin, '\n'); … … 338 432 } 339 433 340 if (version==200405180 )434 if (version==200405180 || version==200407270) 341 435 strng.ReadLine(fin); 436 437 if (version==200411130 || version==200412090 || version==200412210) 438 { 439 // ========== Col 19-35: DC and HV-values, mjd ========= 440 for (int i=0 ; i<17 ; i++) 441 { 442 strng.ReadToDelim(fin, ' '); 443 } 444 445 // ========== Col 36: test-flag ========= 446 strng.ReadToDelim(fin, ' '); 447 if (strng.Contains("???")) 448 strng="n/a"; 449 450 Int_t testflagkey = QueryNameKEY(serv, dummy, "TestFlag", strng.Data()); 451 if (testflagkey<0) 452 { 453 strng.ReadLine(fin); 454 continue; 455 } 456 457 // ========== Col 37: light conditions ========= 458 strng.ReadToDelim(fin, ' '); 459 if (strng.Contains("???")) 460 strng="n/a"; 461 462 Int_t lightcondkey = QueryNameKEY(serv, dummy, "LightConditions", strng.Data()); 463 if (lightcondkey<0) 464 { 465 strng.ReadLine(fin); 466 continue; 467 } 468 469 // ========== Col 38: discriminator threshold table ========= 470 strng.ReadToDelim(fin, ' '); 471 if (strng.Contains("???")) 472 strng="n/a"; 473 474 Int_t dttablekey = QueryNameKEY(serv, dummy, "DiscriminatorThresholdTable", strng.Data()); 475 if (dttablekey<0) 476 { 477 strng.ReadLine(fin); 478 continue; 479 } 480 481 // ========== Col 39: trigger delay table ========= 482 strng.ReadToDelim(fin, ' '); 483 if (strng.Contains("???")) 484 strng="n/a"; 485 486 Int_t triggerdelaytablekey = QueryNameKEY(serv, dummy, "TriggerDelayTable", strng.Data()); 487 if (triggerdelaytablekey<0) 488 { 489 strng.ReadLine(fin); 490 continue; 491 } 492 493 // ========== Col 40,41: RA and Dec sent to drive ========= 494 strng.ReadToDelim(fin, ' '); 495 strng.ReadToDelim(fin, ' '); 496 497 // ========== Col 42: Calibration Script ========= 498 strng.ReadToDelim(fin, ' '); 499 if (strng.Contains("???")) 500 strng="n/a"; 501 502 Int_t calibrationscriptkey = QueryNameKEY(serv, dummy, "CalibrationScript", strng.Data()); 503 if (calibrationscriptkey<0) 504 { 505 strng.ReadLine(fin); 506 continue; 507 } 508 509 } 510 else 511 { 512 Int_t testflagkey, lightcondkey, dttablekey, triggerdelaytablekey, calibrationscriptkey=1; 513 } 514 342 515 343 516 //continue; … … 360 533 query += Form("fRunStart=\"%s %s\", ", startdate.Data(), starttime.Data()); 361 534 query += Form("fRunStop=\"%s %s\", ", stopdate.Data(), stoptime.Data()); 362 query += Form("fTriggerTableKEY=%d, ", triggerkey); 535 query += Form("fL1TriggerTableKEY=%d, ", l1triggerkey); 536 query += Form("fL2TriggerTableKEY=%d, ", l2triggerkey); 537 query += Form("fTestFlagKEY=%d, ", testflagkey); 538 query += Form("fCalibrationScriptKEY=%d, ", calibrationscriptkey); 539 query += Form("fTriggerDelayTableKEY=%d, ", triggerdelaytablekey); 540 query += Form("fDiscrimintorThresholdTableKEY=%d, ", dttablekey); 541 query += Form("fLightConditionsKEY=%d, ", lightcondkey); 363 542 query += Form("fHvSettingsKEY=%d, ", hvkey); 364 543 if (!TMath::IsNaN(zd) && TMath::Finite(zd))
Note:
See TracChangeset
for help on using the changeset viewer.