Changeset 4680 for trunk/MagicSoft/Mars/macros/sql/filldotrun.C
- Timestamp:
- 08/18/04 11:21:29 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/sql/filldotrun.C
r4601 r4680 47 47 // "/data/MAGIC/Period019/ccdata" would do it for one Period 48 48 // "/data/MAGIC/Period019/ccdata/2004_05_17" would do it for a single day 49 // "/data/MAGIC/Period019/ccdata/file.run" would do it for a single file 49 50 // 50 51 // The second argument is the 'dummy-mode'. If it is kTRUE dummy-mode is … … 63 64 // root -q -l -b filldotrun.C+\(\"path\"\,kFALSE\) 2>&1 | tee filldotrun.log 64 65 // 66 // Returns 0 in case of failure and 1 in case of success. 67 // 65 68 ///////////////////////////////////////////////////////////////////////////// 66 69 #include <iostream> … … 152 155 { 153 156 ifstream fin(filename); 157 if (!fin) 158 { 159 cout << "Could not open file " << fname << endl; 160 return -1; 161 } 154 162 155 163 TString strng; … … 160 168 cout << "First Line: " << strng << endl; 161 169 cout << endl; 162 return 0;170 return -1; 163 171 } 164 172 … … 175 183 cout << "Second Line: " << strng << endl; 176 184 cout << endl; 177 return 0;185 return -1; 178 186 } 179 187 … … 387 395 { 388 396 cout << query << " - FAILED!" << endl; 389 continue;397 return -1; 390 398 } 391 399 … … 413 421 cout << endl; 414 422 423 if (path.EndsWith(".run")) 424 { 425 cout << name(TRegexp("CC_.*.run", kFALSE)) << flush; 426 Int_t n = insert(serv, dummy, name); 427 cout << " <" << n << "> " << (dummy?"DUMMY":"") << endl; 428 429 return n<0 ? 0 : 1; 430 } 431 415 432 MDirIter Next(path, "CC_*.run", -1); 416 433 while (1) … … 421 438 422 439 cout << name(TRegexp("CC_.*.run", kFALSE)) << flush; 423 424 440 Int_t n = insert(serv, dummy, name); 425 426 441 cout << " <" << n << "> " << (dummy?"DUMMY":"") << endl; 427 } 442 443 if (n<0) 444 return 0; 445 } 446 447 return 1; 428 448 }
Note:
See TracChangeset
for help on using the changeset viewer.