Changeset 9141
- Timestamp:
- 10/13/08 15:54:30 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9140 r9141 41 41 42 42 * mreport/MReport.cc: 43 - implemented a new version fix, namely 20080930 43 - implemented a new version fix, namely 200809300 44 44 45 45 * mreport/MReportCC.cc: 46 - implemented interpretation of new format 20080 519046 - implemented interpretation of new format 200809030 47 47 48 48 -
trunk/MagicSoft/Mars/NEWS
r9123 r9141 3 3 == <cvs> == 4 4 5 ;Database 5 ;general 6 7 * All command line options after -- are now interpreted as 8 arguments (usually everything which doesn't start with a minus) 9 rather than options (usually everything which starts with a 10 minus). This allows to use file names starting with a - 11 12 ;Database 6 13 7 14 * Added informations about the DC currents (fMinCurrents, fMedCurrents 8 and fMaxCurrents) 15 and fMaxCurrents). The values are retrieved from the plots showing 16 the average DC currents of all pixels versus time. 9 17 10 18 ;automatic analyis … … 21 29 now steered via database. Consequently the plots are faster and 22 30 reliable up-to-date. 31 32 ;merpp 33 34 * Fixed merpping of raw-files (the runheader tree got the name RunHeader 35 instead of RunHeaders) 36 37 * Now allows to merpp files newer than 2008/09/03. 23 38 24 39 -
trunk/MagicSoft/Mars/callisto.cc
r9024 r9141 153 153 // Evaluate arguments 154 154 // 155 MArgs arg(argc, argv , kTRUE);155 MArgs arg(argc, argv); 156 156 gLog.Setup(arg); 157 157 -
trunk/MagicSoft/Mars/ganymed.cc
r9005 r9141 116 116 // Evaluate arguments 117 117 // 118 MArgs arg(argc, argv , kTRUE);118 MArgs arg(argc, argv); 119 119 gLog.Setup(arg); 120 120 -
trunk/MagicSoft/Mars/mars.cc
r8954 r9141 89 89 // Evaluate arguments 90 90 // 91 MArgs arg(argc, argv , kTRUE);91 MArgs arg(argc, argv); 92 92 gLog.Setup(arg); 93 93 -
trunk/MagicSoft/Mars/mbase/MArgs.cc
r8930 r9141 31 31 // 32 32 // Arguments beginning with a trailing '-' are called 'options'. 33 // 33 34 // Arguments without a trailing '-' are considered 'arguments' 35 // 36 // All arguments appearing after '--' on the commandline are 37 // also cosidered as 'arguments' 34 38 // 35 39 ////////////////////////////////////////////////////////////////////////////// … … 57 61 // fArgv: A TList containing all other command line arguments 58 62 // 59 // If root==kFALSE all root commandline options are deleted from 60 // the list, namely: -b 61 // 62 MArgs::MArgs(int argc, char **argv, Bool_t root) : fArgc(argc) 63 MArgs::MArgs(int argc, char **argv) : fArgc(argc) 63 64 { 64 65 TString cmdline; … … 76 77 fArgv.Add(new MArgsEntry(argv[i])); 77 78 } 78 79 if (root) 80 return; 81 82 HasOnlyAndRemove("-b"); 79 } 80 81 // -------------------------------------------------------------------------- 82 // 83 // Remove all root commandline options from the list, 84 // namely: -b, -n, -q, -l, -?, -h, --help, -config 85 // 86 // Returns the number of found root options (max 8) 87 // 88 Int_t MArgs::RemoveRootArgs() 89 { 90 Int_t n = 0; 91 92 n += HasOnlyAndRemove("-b"); 93 n += HasOnlyAndRemove("-n"); 94 n += HasOnlyAndRemove("-q"); 95 n += HasOnlyAndRemove("-l"); 96 n += HasOnlyAndRemove("-?"); 97 n += HasOnlyAndRemove("-h"); 98 n += HasOnlyAndRemove("--help"); 99 n += HasOnlyAndRemove("-config"); 100 101 return n; 83 102 } 84 103 … … 109 128 TString *s = NULL; 110 129 while ((s=dynamic_cast<TString*>(Next()))) 111 if ( s->BeginsWith("-"))130 if (*s!="--" && s->BeginsWith("-")) 112 131 gLog << *s << endl; 113 132 return; … … 119 138 TString *s = NULL; 120 139 while ((s=dynamic_cast<TString*>(Next()))) 121 if ( !s->BeginsWith("-"))140 if (*s!="--" && !s->BeginsWith("-")) 122 141 gLog << *s << endl; 123 142 return; … … 283 302 Int_t num = 0; 284 303 285 TIter Next(&fArgv); 286 TString *s = NULL; 287 while ((s=dynamic_cast<TString*>(Next()))) 288 { 289 if (s->BeginsWith("-")) 304 Bool_t allarg = kFALSE; 305 306 TIter Next(&fArgv); 307 TString *s = NULL; 308 while ((s=dynamic_cast<TString*>(Next()))) 309 { 310 if (*s=="--") 311 { 312 allarg = kTRUE; 313 continue; 314 } 315 316 if (s->BeginsWith("-") && !allarg) 290 317 continue; 291 318 … … 305 332 Int_t num = 0; 306 333 307 TIter Next(&fArgv); 308 TString *s = NULL; 309 while ((s=dynamic_cast<TString*>(Next()))) 310 if (!s->BeginsWith("-")) 311 num++; 334 Bool_t allarg = kFALSE; 335 336 TIter Next(&fArgv); 337 TString *s = NULL; 338 while ((s=dynamic_cast<TString*>(Next()))) 339 { 340 if (*s=="--") 341 { 342 allarg = kTRUE; 343 continue; 344 } 345 346 if (s->BeginsWith("-") && !allarg) 347 continue; 348 349 num++; 350 } 312 351 313 352 return num; … … 325 364 TString *s = NULL; 326 365 while ((s=dynamic_cast<TString*>(Next()))) 366 { 367 if (*s=="--") 368 return num; 369 327 370 if (s->BeginsWith("-")) 328 371 num++; 372 } 329 373 330 374 return num; … … 337 381 Int_t MArgs::GetNumEntries() const 338 382 { 339 return fArgv. GetSize();383 return fArgv.FindObject("--") ? fArgv.GetSize()-1 : fArgv.GetSize(); 340 384 } 341 385 -
trunk/MagicSoft/Mars/mbase/MArgs.h
r8930 r9141 31 31 32 32 public: 33 MArgs(int argc, char **argv , Bool_t root=kFALSE);33 MArgs(int argc, char **argv); 34 34 35 35 // TObject … … 40 40 41 41 // MArgs 42 Int_t RemoveRootArgs(); 43 42 44 Int_t GetInt(const TString name) const; 43 45 Double_t GetFloat(const TString name) const; -
trunk/MagicSoft/Mars/merpp.cc
r9060 r9141 152 152 return 2; 153 153 } 154 155 arg.RemoveRootArgs(); 154 156 155 157 const Bool_t kDebugMem = arg.HasOnlyAndRemove("--debug-mem"); -
trunk/MagicSoft/Mars/mhist/MHEvent.cc
r8999 r9141 266 266 s += fRawEvtHeader->GetDAQEvtNumber(); 267 267 } 268 268 269 if (fRawEvtHeader && fRawRunHeader) 269 270 s += " of "; 270 271 271 272 if (fRawRunHeader) 272 {273 s += "M";274 273 s += fRawRunHeader->GetStringID(); 275 } 274 276 275 if (fTime) 277 276 { -
trunk/MagicSoft/Mars/mjobs/MJMerpp.cc
r9028 r9141 150 150 read.SetForceMode(fForceProcessing); 151 151 152 write.AddContainer("MRawRunHeader", "RunHeader ");152 write.AddContainer("MRawRunHeader", "RunHeaders"); 153 153 write.AddContainer("MTime", "Events"); 154 154 write.AddContainer("MRawEvtHeader", "Events"); -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc
r9080 r9141 492 492 Bool_t MRawRunHeader::Fixes() 493 493 { 494 if (fFormatVersion>8 )494 if (fFormatVersion>8 && fRunNumber>326152) 495 495 { 496 496 fNumEvents--; 497 497 fNumEventsRead--; 498 *fLog << inf << "Format >V8 : Stored number of events decreased by 1." << endl;498 *fLog << inf << "Format >V8 and No>326152: Stored number of events decreased by 1." << endl; 499 499 } 500 500 -
trunk/MagicSoft/Mars/mreport/MReport.cc
r8955 r9141 167 167 // 200510250 | 53813.5 | | 200603190 168 168 // 200604010 | 53863.5 | | 200605080 169 // 200605190 | 54711.5 | | 200809030 169 170 // 170 171 Int_t MReport::Interprete(TString &str, const MTime &start, const MTime &stop, Int_t ver) … … 200 201 ver=200605080; 201 202 203 if (ver==200605190 && GetMjd()>54711.5) 204 ver=200809030; 205 202 206 // Interprete body (contents) of report 203 207 const Int_t rc = InterpreteBody(str, ver); -
trunk/MagicSoft/Mars/mreport/MReportCC.cc
r8963 r9141 114 114 if (n!=6) 115 115 { 116 cout << n << endl;117 116 *fLog << warn << "WARNING - Wrong number of arguments (should be 6)." << endl; 118 117 return kFALSE; … … 120 119 121 120 str.Remove(0, len); 121 122 if (ver>=200809030) 123 { 124 if (!CheckTag(str, "SCHEDULE ")) 125 return kFALSE; 126 127 str = str.Strip(TString::kBoth); 128 129 // [Sourcename] sourcecategory 130 const Ssiz_t pos1 = str.First(' '); 131 if (pos1<0) 132 { 133 *fLog << warn << "WARNING - Wrong number of arguments (should be 1 or 2)." << endl; 134 return kFALSE; 135 } 136 137 const TString str1 = str(0, pos1); 138 139 str.Remove(0, pos1); 140 str = str.Strip(TString::kBoth); 141 142 if (!str1.IsDigit()) 143 { 144 const Ssiz_t pos2 = str.First(' '); 145 if (pos2<0) 146 { 147 *fLog << warn << "WARNING - Wrong number of arguments (should be 1 or 2)." << endl; 148 return kFALSE; 149 } 150 151 const TString str2 = str(0, pos2); 152 153 str.Remove(0, pos2); 154 155 if (!str2.IsDigit()) 156 { 157 *fLog << warn << "WARNING - Wrong type of second argument." << endl; 158 return kFALSE; 159 } 160 } 161 } 122 162 123 163 return kTRUE; -
trunk/MagicSoft/Mars/readdaq.cc
r8946 r9141 79 79 } 80 80 81 arg.RemoveRootArgs(); 82 81 83 // 82 84 // Set verbosity to highest level. -
trunk/MagicSoft/Mars/readraw.cc
r8088 r9141 88 88 return 2; 89 89 } 90 91 arg.RemoveRootArgs(); 90 92 91 93 // Set usage of decimal values -
trunk/MagicSoft/Mars/showlog.cc
r8011 r9141 80 80 return 2; 81 81 } 82 83 arg.RemoveRootArgs(); 82 84 83 85 const Bool_t kNoColors = arg.HasOnly("--no-colors") || arg.HasOnly("-a"); -
trunk/MagicSoft/Mars/showplot.cc
r9039 r9141 148 148 // Evaluate arguments 149 149 // 150 MArgs arg(argc, argv , kTRUE);150 MArgs arg(argc, argv); 151 151 gLog.Setup(arg); 152 152 -
trunk/MagicSoft/Mars/sinope.cc
r8907 r9141 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: sinope.cc,v 1.1 3 2008-06-02 08:46:36tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: sinope.cc,v 1.14 2008-10-13 14:53:24 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 301 301 // Evaluate arguments 302 302 // 303 MArgs arg(argc, argv , kTRUE);303 MArgs arg(argc, argv); 304 304 gLog.Setup(arg); 305 305 -
trunk/MagicSoft/Mars/sponde.cc
r8989 r9141 94 94 // Evaluate arguments 95 95 // 96 MArgs arg(argc, argv , kTRUE);96 MArgs arg(argc, argv); 97 97 gLog.Setup(arg); 98 98 -
trunk/MagicSoft/Mars/star.cc
r9024 r9141 102 102 // Evaluate arguments 103 103 // 104 MArgs arg(argc, argv , kTRUE);104 MArgs arg(argc, argv); 105 105 gLog.Setup(arg); 106 106
Note:
See TracChangeset
for help on using the changeset viewer.