- Timestamp:
- 01/27/03 11:43:50 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1729 r1733 1 1 2 2 -*-*- END -*-*- 3 4 2003/01/27: Robert Wagner 5 6 * manalysis/MCT1ReadPreProc.cc 7 - Added call of MTaskList::ReInit after processing of new 8 run header 9 - Filling of MC container complies to Oscar's changes of 10 MMcEvt.[hxx,cxx] dated 2003/01/20 11 - Added filling of run number in MRawRunHeader object while 12 processing a new run header 3 13 4 14 2003/01/23: Robert Wagner -
trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc
r1715 r1733 18 18 ! Author(s): Thomas Bretz 11/2002 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 220 ! Copyright: MAGIC Software Development, 2000-2003 21 21 ! 22 22 ! … … 74 74 #include "MBlindPixels.h" 75 75 76 #include "MRawRunHeader.h" 77 #include "MTaskList.h" 78 76 79 #include "MMcEvt.hxx" 77 80 #include "MMcTrig.hxx" … … 88 91 const char *title) : fIn(NULL), fEntries(0) 89 92 { 90 fName = name ? name : "M Read";91 fTitle = title ? title : " Task to loop over events in CT1 asciifile";93 fName = name ? name : "MCT1ReadPreProc"; 94 fTitle = title ? title : "Reads a CT1 preproc data file"; 92 95 93 96 // … … 168 171 169 172 // int irunnum; // run number (from parameters file) 173 *fLog << inf << "Run number" << outpars.irunnum; 174 175 fRawRunHeader->SetRunNumber(outpars.irunnum); 176 fRawRunHeader->SetReadyToSave(); 177 170 178 // enum onoroff {NEITHER_ON_NOR_OFF, OFF_SOURCE, ON_SOURCE} eruntype; // runtype 171 179 *fLog << "Run: #" << outpars.irunnum << " ("; … … 370 378 371 379 fIsMcFile = outpars.bmontecarlo==TRUE; 380 372 381 } 373 382 … … 376 385 // Read CT1 PreProc File Header: 377 386 // 378 Bool_t MCT1ReadPreProc::ReadRunHeader()387 Int_t MCT1ReadPreProc::ReadRunHeader() 379 388 { 380 389 char cheadertitle[iHEADERTITLELENGTH]; … … 402 411 if (fpreprocversion<0.6) 403 412 { 404 *fLog << err << "Sorry only files from PreProc V0.6 and newer are supported." << endl;413 *fLog << err << "Sorry, only files from PreProc V0.6 and newer are supported." << endl; 405 414 return kFALSE; 406 415 } … … 423 432 424 433 ProcessRunHeader(outpars); 434 435 //rwagner: ReInit whenever new run commences 436 // rc==-1 means: ReInit didn't work out 437 if (!fTaskList->ReInit(fParList)) return -1; 425 438 426 439 return kTRUE; … … 530 543 *fLog << inf << "-----------------------------------------------------------------------" << endl; 531 544 532 if (!ReadRunHeader()) 533 { 534 *fLog << warn << "Unable to read first run header... skipping file." << endl; 535 return kFALSE; 536 } 545 switch (ReadRunHeader()) 546 { 547 case kFALSE: 548 *fLog << warn << "Unable to read first run header... skipping file." << endl; 549 return kFALSE; 550 break; 551 case -1: 552 *fLog << warn << "ReInit of Tasklist didn't succeed." << endl; 553 return kFALSE; 554 break; 555 } 537 556 538 557 return kTRUE; … … 644 663 Bool_t MCT1ReadPreProc::PreProcess(MParList *pList) 645 664 { 665 666 fParList = pList; 667 646 668 // 647 669 // look for the MCerPhotEvt class in the plist … … 699 721 if (!fMcTrig) 700 722 return kFALSE; 723 724 // 725 // look for the raw run header class 726 // 727 fRawRunHeader = (MRawRunHeader*)pList->FindCreateObj("MRawRunHeader"); 728 if (!fRawRunHeader) 729 return kFALSE; 730 731 // 732 // look for the task list 733 // 734 fTaskList = (MTaskList*)pList->FindCreateObj("MTaskList"); 735 if (!fTaskList) 736 return kFALSE; 737 701 738 702 739 fNumFilterEvts = 0; … … 769 806 0, /* fFirTar */ 770 807 0, /* fzFirInt */ 771 0, /* fThet*/ 808 // 0, /* fThet*/ 809 // rwagner: The following should be theta, right? Check with 810 // altitude fill some lines down... 811 0, // altitude (arcseconds) 772 812 0, /* fPhii */ 773 813 0, /* fCorD */ … … 791 831 0, /* uiPco */ 792 832 0, /* uiPelS */ 793 fIsMcFile ? event.fmcsize_phel : 0 /* uiPelC, Simulated SIZE */ 833 fIsMcFile ? event.fmcsize_phel : 0, /* uiPelC, Simulated SIZE */ 834 0, /* elec */ 835 0, /* muon */ 836 0 /* other */ 794 837 ); 795 838 … … 827 870 828 871 // 829 // Try reading the footer. If it isn't succefull...872 // Try reading the footer. If this isn't successful... 830 873 // must be an event 831 874 // … … 861 904 862 905 *fLog << "-----------------------------------------------------------------------" << endl; 863 if (!ReadRunHeader()) 864 return kTRUE; 906 907 switch (ReadRunHeader()) 908 { 909 case kTRUE: 910 return kTRUE; 911 break; 912 case -1: 913 *fLog << warn << "ReInit of Tasklist didn't succeed." << endl; 914 return kFALSE; 915 break; 916 } 865 917 } 866 918 }
Note:
See TracChangeset
for help on using the changeset viewer.