Changeset 4800
- Timestamp:
- 08/30/04 11:45:51 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4795 r4800 19 19 20 20 -*-*- END OF LINE -*-*- 21 2004/08/30: Thomas Bretz 22 23 * showlog.cc, showplot.cc: 24 - anhanced functionality 25 26 27 21 28 2004/08/29: Markus Gaug 22 29 23 * mbadpixels/MBadPixelsPix.[h,cc] 24 * mbadpixels/MBadPixelsCam.cc 25 * mjobs/MJCalibration.cc 26 - introduced new calibration bits: kHiGainOverFlow 27 and kLoGainOverFlow being filled when the calibration histograms 28 overflow. Will cause an kUnsuitableRun afterwards. 29 - added in datacheck-display of MJCalibration 30 31 * mcalib/MHCalibrationChargeHiGainPix.[h,cc] 32 * mcalib/MHCalibrationChargeLoGainPix.[h,cc] 33 - default lower histogram limit moved to -100.5 34 35 * mcalib/MHCalibrationCam.h 36 * mcalib/MHCalibrationChargeCam.cc 37 - make TArrayI out of fOverFlowHiGain and fOverFlowLoGain 38 39 * mjobs/MJCalibration.[h,cc] 40 - finished datacheck display with the arrival times. 30 * mbadpixels/MBadPixelsPix.[h,cc] 31 * mbadpixels/MBadPixelsCam.cc 32 * mjobs/MJCalibration.cc 33 - introduced new calibration bits: kHiGainOverFlow 34 and kLoGainOverFlow being filled when the calibration histograms 35 overflow. Will cause an kUnsuitableRun afterwards. 36 - added in datacheck-display of MJCalibration 37 38 * mcalib/MHCalibrationChargeHiGainPix.[h,cc] 39 * mcalib/MHCalibrationChargeLoGainPix.[h,cc] 40 - default lower histogram limit moved to -100.5 41 42 * mcalib/MHCalibrationCam.h 43 * mcalib/MHCalibrationChargeCam.cc 44 - make TArrayI out of fOverFlowHiGain and fOverFlowLoGain 45 46 * mjobs/MJCalibration.[h,cc] 47 - finished datacheck display with the arrival times. 48 41 49 42 50 … … 45 53 * mpedestal/MPedestalPix.h 46 54 - correct calculation of error of RMS 55 56 47 57 48 58 2004/08/27: Hendrik Bartko … … 51 61 - check that the pixel has a low gain before calculating the time 52 62 for the low gain in case of a saturated high gain. 63 64 53 65 54 66 2004/08/27: Markus Gaug -
trunk/MagicSoft/Mars/callisto.cc
r4766 r4800 54 54 gLog << " --debug-env Debug setting resources from file" << endl << endl; 55 55 gLog << endl; 56 gLog << " -q Quit when job is finished" << endl; 56 57 gLog << " -f Force overwrite of existing files" << endl; 57 58 gLog << " -ff Force execution if not all files found" << endl; … … 85 86 gLog << " contants. These constants are stored in a so called calibration-file" << endl; 86 87 gLog << " together with some datacheck plots which can be viewed using either" << endl; 87 gLog << " showplot or MStatusDisplay in the interpreter." << endl << endl; 88 gLog << " showplot or MStatusDisplay in the interpreter. A description of a" << endl; 89 gLog << " sequence-file can be found in the class reference of MSequence." << endl << endl; 88 90 gLog << "Example:" << endl; 89 91 gLog << " callisto -f --outc=mycal/ --outy=mysignal/ --log sequence02345.txt" << endl; … … 98 100 // Evaluate arguments 99 101 // 100 MArgs arg(argc, argv );102 MArgs arg(argc, argv, kTRUE); 101 103 102 104 if (arg.HasOnly("-?") || arg.HasOnly("-h") || arg.HasOnly("--help")) … … 115 117 const Bool_t kDebugEnv = arg.HasOnlyAndRemove("--debug-env"); 116 118 119 const Bool_t kQuit = arg.HasOnlyAndRemove("-q"); 120 const Bool_t kBatch = arg.HasOnlyAndRemove("-b"); 117 121 const Bool_t kOverwrite = arg.HasOnlyAndRemove("-f"); 118 122 const Bool_t kForceExec = arg.HasOnlyAndRemove("-ff"); … … 380 384 } 381 385 386 if (kBatch || kQuit) 387 { 388 delete d; 389 return 0; 390 } 391 382 392 // From now on each 'Close' means: Terminate the application 383 393 d->SetBit(MStatusDisplay::kExitLoopOnClose); -
trunk/MagicSoft/Mars/showlog.cc
r4756 r4800 1 1 #include <errno.h> 2 2 #include <fstream> 3 4 #include <TRegexp.h> 3 5 4 6 #include "MArgs.h" … … 16 18 gLog << " or" << endl; 17 19 gLog << " showlog [options] < filename" << endl << endl; 20 gLog.Usage(); 18 21 gLog << " -?, -h, --help This help" << endl << endl; 19 22 gLog << endl; … … 24 27 gLog << " colored output with less use the option -R, eg." << endl; 25 28 gLog << " less -R logfile.log" << endl << endl; 29 } 30 31 void RemoveAnsi(TString &s) 32 { 33 static const TRegexp regexp("[][[][0-9]+[m]"); 34 35 int i=0; 36 37 while (1) 38 { 39 Ssiz_t len = 0; 40 Ssiz_t idx = s.Index(regexp, &len); 41 if (idx<0) 42 break; 43 44 s.Remove(idx, len); 45 } 26 46 } 27 47 … … 37 57 return -1; 38 58 } 59 60 const Bool_t kNoColors = arg.HasOnly("--no-colors") || arg.HasOnly("-a"); 61 62 gLog.Setup(arg); 39 63 40 64 if (arg.GetNumOptions()>0) … … 69 93 break; 70 94 71 s.ReplaceAll("", "\033"); 95 if (kNoColors) 96 RemoveAnsi(s); 97 else 98 s.ReplaceAll("", "\033"); 72 99 gLog << s << endl; 73 100 } -
trunk/MagicSoft/Mars/showplot.cc
r4722 r4800 28 28 gLog << all << endl; 29 29 gLog << "Sorry the usage is:" << endl; 30 gLog << " showplot filename" << endl << endl; 30 gLog << " showplot [options] filename" << endl << endl; 31 gLog << " Arguments:" << endl; 32 gLog << " filename Input file containing an MStatusArray" << endl << endl; 33 gLog << " Root Options:" << endl; 34 gLog << " -b Batch mode (no graphical output to screen)" << endl<<endl; 35 gLog << " Options: "<< endl; 36 gLog.Usage(); 37 gLog << " -q Quit when job is finished" << endl; 38 gLog << endl; 39 gLog << " Output Options: "<< endl; 40 gLog << " --save-as-ps[=filename] Save plots as postscript" << endl; 41 gLog << " --save-as-gif[=filename] Save plots as gif files" << endl; 42 gLog << " --save-as-C[=filename] Save plots as root scripts" << endl; 43 gLog << " --tab=num Save only tab number num" << endl << endl; 31 44 gLog << "Description:" << endl; 32 45 gLog << " Use showplot to display a MStatusArray in an MStatusDisplay." << endl; … … 51 64 } 52 65 66 gLog.Setup(arg); 67 68 const Bool_t kQuit = arg.HasOnlyAndRemove("-q"); 69 const Bool_t kBatch = arg.HasOnlyAndRemove("-b"); 70 71 const Int_t kTab = arg.GetIntAndRemove("--tab=", -1); 72 73 const Bool_t kSaveAsPs = arg.HasOnlyAndRemove("--save-as-ps") || arg.Has("--save-as-ps="); 74 const Bool_t kSaveAsGif = arg.HasOnlyAndRemove("--save-as-gif") || arg.Has("--save-as-gif="); 75 const Bool_t kSaveAsC = arg.HasOnlyAndRemove("--save-as-C") || arg.Has("--save-as-C="); 76 77 TString kNamePs = arg.GetStringAndRemove("--save-as-ps="); 78 TString kNameGif = arg.GetStringAndRemove("--save-as-gif="); 79 TString kNameC = arg.GetStringAndRemove("--save-as-C="); 80 81 53 82 // 54 83 // check for the right usage of the program … … 60 89 } 61 90 62 const TString kInput = arg.GetArgumentStr(0);63 64 91 TApplication app("Callisto", &argc, argv); 65 92 if (gROOT->IsBatch() || !gClient) … … 68 95 return 1; 69 96 } 97 98 // 99 // Process filenames 100 // 101 const TString kInput = arg.GetArgumentStr(0); 102 103 if (kNamePs.IsNull() && kSaveAsPs) 104 kNamePs = kInput; 105 if (kNameGif.IsNull() && kSaveAsGif) 106 kNameGif = kInput; 107 if (kNameC.IsNull() && kSaveAsC) 108 kNameC = kInput; 70 109 71 110 // … … 78 117 d->Open(kInput); 79 118 119 if (kSaveAsPs) 120 d->SaveAsPS(kTab, kNamePs); 121 if (kSaveAsGif) 122 d->SaveAsGIF(kTab, kNameGif); 123 if (kSaveAsC) 124 d->SaveAsC(kTab, kNameC); 125 126 if (kBatch || kQuit) 127 { 128 delete d; 129 return 0; 130 } 131 80 132 // From now on each 'Close' means: Terminate the application 81 133 d->SetBit(MStatusDisplay::kExitLoopOnClose);
Note:
See TracChangeset
for help on using the changeset viewer.