Changeset 5307 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 10/22/04 15:59:02 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MDirIter.cc
r5299 r5307 202 202 // -------------------------------------------------------------------------- 203 203 // 204 // As the filter string may contain a + character, we have to replace 205 // this filter by a new filter contaning a \+ at all locations where a + 206 // was in the original filter. 207 // 208 // We replace: 209 // . by \\. 210 // + by \\+ 211 // * by [^\\/:]* 212 // ? by . 213 // 214 // And surround the filter by ^ and $. 215 // 216 // For more details you can have a look at the template: 217 // TRegexp::MakeWildcard 218 // 219 const TRegexp MDirIter::MakeRegexp(TString n) const 220 { 221 n.Prepend("^"); 222 n.ReplaceAll(".", "\\."); 223 n.ReplaceAll("+", "\\+"); 224 n.ReplaceAll("*", "[^\\/:]*"); 225 n.ReplaceAll("?", "."); 226 n.Append("$"); 227 228 return TRegexp(n, kFALSE); 229 } 230 231 // -------------------------------------------------------------------------- 232 // 204 233 // Check whether the given name n matches the filter f. 205 234 // Filters are of the form TRegexp(f, kTRUE) … … 207 236 Bool_t MDirIter::MatchFilter(const TString &n, const TString &f) const 208 237 { 209 // As the filter string may contain a + character, we have to replace 210 // this filter by a new filter contaning a \+ at all locations where a + 211 // was in the original filter. 212 TString nf(f); 213 nf.ReplaceAll("+","\\+"); 214 215 return f.IsNull() || !n(TRegexp(nf, kTRUE)).IsNull(); 238 239 return f.IsNull() || !n(MakeRegexp(f)).IsNull(); 216 240 } 217 241 -
trunk/MagicSoft/Mars/mbase/MDirIter.h
r5144 r5307 23 23 TString ConcatFileName(const char *dir, const char *name) const; 24 24 void PrintEntry(const TObject &o) const; 25 const TRegexp MakeRegexp(TString n) const; 25 26 26 27 public: -
trunk/MagicSoft/Mars/mbase/MRunIter.cc
r5141 r5307 53 53 54 54 // R. DeLosReyes and T. Bretz 55 // Changes to read the DAQ numbering format. Changes takes place 55 // Changes to read the DAQ numbering format. Changes takes place 56 56 // between runs 35487 and 00035488 (2004_08_30) 57 const char *fmt = run>35487 ? "*_%08d_*_%s" : "*_%05d_*_%s"; 57 58 58 MDirIter Next; 59 if(run<=35487) 60 Next.AddDirectory(p, Form("*_%05d_*_%s", run,fIsRawFile?"*.raw":"*.root"), -1); 61 else 62 Next.AddDirectory(p, Form("*_%08d_*_%s", run,fIsRawFile?"*.raw":"*.root"), -1); 59 MDirIter Next; 60 Next.AddDirectory(p, Form(fmt, run,fIsRawFile?"*.raw":"*.root"), -1); 63 61 64 62 const TString name(Next()); -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
r4766 r5307 1483 1483 if (TestBit(kExitLoopOnExit) || TestBit(kExitLoopOnClose)) 1484 1484 { 1485 gLog << dbg << "CloseWindow() calling ExitLoop." << endl;1485 //gLog << dbg << "CloseWindow() calling ExitLoop." << endl; 1486 1486 gSystem->ExitLoop(); 1487 1487 } … … 1491 1491 //gLog << dbg << "delete " << fName << ";" << endl; 1492 1492 delete this; 1493 } 1494 fStatus = kFileExit; 1495 //gLog << dbg << fName << ".fStatus=kFileExit;" << endl; 1493 // DO NOT EXECUTE ANY COMMAND AFTER this! 1494 } 1495 else 1496 { 1497 fStatus = kFileExit; 1498 //gLog << dbg << fName << ".fStatus=kFileExit;" << endl; 1499 } 1496 1500 } 1497 1501 -
trunk/MagicSoft/Mars/mbase/MTaskEnv.cc
r4732 r5307 215 215 { 216 216 if (!IsEnvDefined(env, prefix, print)) 217 return kFALSE;217 return fTask ? fTask->ReadEnv(env, prefix, print) : kFALSE; 218 218 219 219 TString task = GetEnvValue(env, prefix, "");
Note:
See TracChangeset
for help on using the changeset viewer.