Changeset 9039 for trunk/MagicSoft/Mars/mjobs
- Timestamp:
- 07/23/08 14:15:14 (17 years ago)
- Location:
- trunk/MagicSoft/Mars/mjobs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/MagicSoft/Mars/mjobs/MSequence.cc ¶
r9028 r9039 1394 1394 } 1395 1395 1396 if (!fDataPath.IsNull())1397 out << endl << pre << "DataPath: " << fDataPath << endl;1396 // if (!fDataPath.IsNull()) 1397 // out << endl << pre << "DataPath: " << fDataPath << endl; 1398 1398 1399 1399 if (!str.IsNull()) … … 1512 1512 1513 1513 fPeriod = fNight.GetMagicPeriod(); 1514 } 1515 1516 // -------------------------------------------------------------------------- 1517 // 1518 // Read a sequence from gDirectory. If the default is given we try 1519 // to find a sequence with name GetName. If a key with name name 1520 // exists in the file read this key. Otherwise loop over all keys 1521 // and return the first key matching the TPRegex (regular expression) 1522 // matching defined by the argument. 1523 // 1524 Int_t MSequence::Read(const char *name) 1525 { 1526 if (!name || !gFile) 1527 return MParContainer::Read(name); 1528 1529 if (!gDirectory->GetListOfKeys()->FindObject(name)) 1530 return MParContainer::Read(name); 1531 1532 TPRegexp regexp(name); 1533 1534 TIter NextK(gDirectory->GetListOfKeys()); 1535 TObject *key = 0; 1536 while ((key=NextK())) 1537 if (TString(key->GetName())(regexp)==key->GetName()) 1538 return MParContainer::Read(key->GetName()); 1539 1540 *fLog << warn << "WARNING - No key in " << gDirectory->GetName() << " matching " << name << "." << endl; 1541 return 0; 1514 1542 } 1515 1543 -
TabularUnified trunk/MagicSoft/Mars/mjobs/MSequence.h ¶
r9023 r9039 131 131 132 132 public: 133 MSequence() : fTelescope( 0), fSequence((UInt_t)-1), fLastRun((UInt_t)-1),133 MSequence() : fTelescope(1), fSequence((UInt_t)-1), fLastRun((UInt_t)-1), 134 134 fNumEvents((UInt_t)-1), fPeriod((UInt_t)-1), fLightCondition(kNA), fMonteCarlo(kFALSE) 135 135 { … … 158 158 159 159 // I/O 160 Int_t Read(const char *name=0); 160 161 Bool_t ReadDatabase(TString sql, UInt_t seq=0, UShort_t tel=0); 161 162 Bool_t ReadFile(const char *filename, UInt_t id=(UInt_t)-1);
Note:
See TracChangeset
for help on using the changeset viewer.