- Timestamp:
- 08/01/03 16:28:20 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2297 r2299 20 20 * mranforest/MRanForestFill.[h,cc]: 21 21 - default fNumTrees set to -1 tree (all trees) 22 23 * manalysis/MBlindPixelCalc.[h,cc]: 24 - interpolate Pedestal, too 25 - Only count 'valid' pixels 26 27 * mfileio/MRead.[h,cc]: 28 - enhanced AddFiles 29 30 * mhist/MHCamEvent.[h,cc]: 31 - Added PrintOutlayers 32 33 * mhist/MHCamera.[h,cc]: 34 - added GetNumPixels 35 - added default to GetMean and GetRMS 36 37 * mhist/MHTriggerLvl0.[h,cc]: 38 - added PrintOutlayers 39 40 * merpp.cc: 41 - added more arguments 42 - replace .raw by .root if no root file given 43 - automatic extension adding 44 45 * mbase/MEvtLoop.[h,cc]: 46 - added estimated run time 47 - in Process: Changes type of rc from Bool_t to Int_t 48 49 * mmain/MStatusDisplay.cc: 50 - changed order in Tab-menu 51 52 * mraw/MRawFileRead.cc: 53 - consistency check for 0xc0c1 files 54 55 * mraw/MRawRunHeader.cc: 56 - initialize variables 57 - added 0xc0c1 support 22 58 23 59 -
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r2298 r2299 267 267 } 268 268 269 Bool_t MEvtLoop::ProcessGuiEvents(Int_t num )269 Bool_t MEvtLoop::ProcessGuiEvents(Int_t num, Int_t entries) 270 270 { 271 271 if (!fProgress || gROOT->IsBatch()) … … 320 320 txt += " ("; 321 321 txt += speed; 322 txt += "Evts/s)"; 322 txt += "Evts/s, est: "; 323 txt += (int)((long int)(t0-t2)*entries/(60000.*(num-start))); 324 txt += "m"; 325 //txt += (int)fmod(entries/(1000.*(num-start)/(long int)(t0-t2)), 60); 326 //txt += "s"; 327 txt += ")"; 323 328 } 324 329 fDisplay->SetStatusLine1(txt); … … 416 421 { 417 422 numcnts++; 418 if (!ProcessGuiEvents(++dummy ))423 if (!ProcessGuiEvents(++dummy, entries)) 419 424 break; 420 425 } … … 424 429 { 425 430 numcnts++; 426 if (!ProcessGuiEvents(maxcnt - dummy ))431 if (!ProcessGuiEvents(maxcnt - dummy, entries)) 427 432 break; 428 433 } -
trunk/MagicSoft/Mars/mbase/MEvtLoop.h
r2219 r2299 37 37 void StreamPrimitive(ofstream &out) const; 38 38 39 Bool_t ProcessGuiEvents(Int_t num );39 Bool_t ProcessGuiEvents(Int_t num, Int_t entries); 40 40 41 41 public: -
trunk/MagicSoft/Mars/merpp.cc
r2267 r2299 39 39 { 40 40 gLog << "Sorry the usage is:" << endl; 41 gLog << " merpp [- vn] inputfile outputfile [compression level]" << endl << endl;41 gLog << " merpp [-a0] [-vn] [-cn] inputfile[.raw] [outputfile[.root]]" << endl << endl; 42 42 gLog << " input file: Magic DAQ binary file." << endl; 43 43 gLog << " ouput file: Merpped root file." << endl; 44 gLog << " compr. level: 1..9 [default=1]" << endl; 44 gLog << " -a0: Do not use Ansii codes." << endl; 45 gLog << " -cn: Compression level n=1..9 [default=1]" << endl; 45 46 gLog << " -vn: Verbosity level n [default=2]" << endl << endl; 46 47 } … … 49 50 { 50 51 MArgs arg(argc, argv); 51 arg.Print();52 52 53 53 gLog << "==================================================" << endl ; … … 60 60 61 61 // 62 // Set verbosity to highest level. 63 // 64 gLog.SetDebugLevel(arg.HasOption("-v") ? arg.GetIntAndRemove("-v") : 2); 65 66 if (arg.HasOption("-a") && arg.GetIntAndRemove("-a")==0) 67 gLog.SetNoColors(); 68 69 const int kComprlvl = arg.HasOption("-c") ? arg.GetIntAndRemove("-c") : 1; 70 71 // 62 72 // check for the right usage of the program 63 73 // 64 if (arg.GetNumArguments()< 2 || arg.GetNumArguments()>3)74 if (arg.GetNumArguments()<1 || arg.GetNumArguments()>2) 65 75 { 66 76 Usage(); … … 69 79 70 80 // 71 // Set verbosity to highest level.72 //73 gLog.SetDebugLevel(arg.HasOption("-v") ? arg.GetInt("-v") : 2);74 75 //76 81 // This is to make argv[i] more readable insidethe code 77 82 // 78 const char *kNamein = arg.GetArgumentStr(0); 79 const char *kNameout = arg.GetArgumentStr(1); 80 const int kComprlvl = arg.GetNumArguments()==3 ? arg.GetArgumentInt(2) : 1; 83 TString kNamein = arg.GetArgumentStr(0); 84 TString kNameout = arg.GetArgumentStr(1); 81 85 82 86 // … … 85 89 TROOT merpp("merpp", "Mars - Merging and Preprocessing Program"); 86 90 merpp.SetBatch(); 91 92 if (!kNamein.EndsWith(".raw")) 93 kNamein += ".raw"; 94 95 if (kNameout.IsNull()) 96 kNameout = kNamein(0, kNamein.Last('.')); 97 98 if (!kNameout.EndsWith(".root")) 99 kNameout += ".root"; 87 100 88 101 // … … 117 130 118 131 // 119 // ---- Th ofollowing is only necessary to supress some output ----132 // ---- The following is only necessary to supress some output ---- 120 133 // 121 134 MRawRunHeader runheader; -
trunk/MagicSoft/Mars/mmain/MStatusDisplay.cc
r2296 r2299 194 194 MGPopupMenu *tabmenu = new MGPopupMenu(gClient->GetRoot()); 195 195 // tabmenu->AddEntry("Save &As...", kFileSaveAs); 196 tabmenu->AddEntry("Next [&+]", kTabNext); 197 tabmenu->AddEntry("Previous [&-]", kTabPrevious); 198 tabmenu->AddSeparator(); 196 199 tabmenu->AddEntry("Save As tab-i.&ps", kTabSaveAsPS); 197 200 tabmenu->AddEntry("Save As tab-i.&gif", kTabSaveAsGIF); … … 202 205 tabmenu->AddSeparator(); 203 206 tabmenu->AddEntry("Print with &lpr", kFilePrint); 204 tabmenu->AddSeparator();205 tabmenu->AddEntry("Next [&+]", kTabNext);206 tabmenu->AddEntry("Previous [&-]", kTabPrevious);207 207 tabmenu->Associate(this); 208 208 -
trunk/MagicSoft/Mars/mraw/MRawFileRead.cc
r2207 r2299 223 223 { 224 224 fRawCrateArray->GetEntry(i)->ReadEvt(*fIn); 225 if (!*fIn) 226 return kFALSE; 225 227 226 228 fRawEvtData->ReadEvt(*fIn); 229 if (!*fIn) 230 return kFALSE; 227 231 } 228 232 -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc
r2273 r2299 56 56 57 57 fPixAssignment = new MArrayS(0); 58 59 fFormatVersion=0; 60 fSoftVersion=0; 61 fRunType=0; 62 fRunNumber=0; 63 fProjectName[0]=0; 64 fSourceName[0]=0; 65 fSourceEpochChar[0]=0; 66 fSourceEpochDate=0; 67 fMJD=0; 68 fDateYear=0; 69 fDateMonth=0; 70 fDateDay=0; 71 fNumCrates=0; 72 fNumPixInCrate=0; 73 fNumSamplesLoGain=0; 74 fNumSamplesHiGain=0; 75 fNumEvents=0; 58 76 } 59 77 … … 76 94 // read one RUN HEADER from the input stream 77 95 // 78 fin.read((char*)&fMagicNumber, 96 fin.read((char*)&fMagicNumber, 2); 79 97 80 98 // 81 99 // check whether the the file has the right file type or not 82 100 // 83 if (fMagicNumber != kMagicNumber )101 if (fMagicNumber != kMagicNumber && fMagicNumber != kMagicNumber+1) 84 102 { 85 103 *fLog << err << "Error: Wrong Magic Number: Not a Magic File!" << endl; 86 104 return; 87 105 } 106 107 if (fMagicNumber == kMagicNumber && fMagicNumber != kMagicNumber+1) 108 *fLog << warn << "WARNING - This file maybe broken (0xc0c1) - DAQ didn't close it correctly!" << endl; 88 109 89 110 Byte_t dummy[16];
Note:
See TracChangeset
for help on using the changeset viewer.