Changeset 8996 for trunk/MagicSoft/Mars/mjobs/MSequence.cc
- Timestamp:
- 07/05/08 20:01:55 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MSequence.cc
r8989 r8996 171 171 // 172 172 ///////////////////////////////////////////////////////////////////////////// 173 #include "MSequence .h"173 #include "MSequenceSQL.h" 174 174 175 175 #include <stdlib.h> … … 575 575 // -------------------------------------------------------------------------- 576 576 // 577 // Get LightCondition from resource file and convert it to LIghtCondition_t 578 // 579 MSequence::LightCondition_t MSequence::ReadLightCondition(TEnv &env, const char *prefix) const 580 { 581 TString str = GetEnvValue2(env, prefix, "LightConditions", "n/a"); 577 // Get LightCondition from str and convert it to LightCondition_t 578 // 579 MSequence::LightCondition_t MSequence::GetLightCondition(const TString &str) const 580 { 582 581 if (!str.CompareTo("n/a", TString::kIgnoreCase)) 583 582 return kNA; … … 634 633 fPeriod = GetEnvValue2(env, prefix, "Period", -1); 635 634 636 fLightCondition = ReadLightCondition(env, prefix);637 638 635 TString str; 636 str = GetEnvValue2(env, prefix, "LightConditions", "n/a"); 637 fLightCondition = GetLightCondition(str); 638 639 639 str = GetEnvValue2(env, prefix, "Start", ""); 640 640 fStart.SetSqlDateTime(str); 641 641 642 str = GetEnvValue2(env, prefix, "Night", ""); 642 643 str += " 00:00:00"; … … 667 668 env.PrintUntouched(); 668 669 } 670 } 671 672 MSequence::MSequence(const char *fname, UInt_t seq) 673 { 674 *this = MSequenceSQL(fname, seq); 669 675 } 670 676 … … 875 881 return; 876 882 } 877 out << "# Path: " << GetFileName() << endl; 878 out << "# Name: " << GetBaseName() << endl; 883 if (!fFileName.IsNull()) 884 out << "# FileName: " << fFileName << endl; 885 if (!fDataPath.IsNull()) 886 out << "# DataPath: " << fDataPath << endl; 879 887 out << endl; 880 888 if (pre.IsNull()) … … 885 893 out << pre << "Period: " << fPeriod << endl; 886 894 if (fNight!=MTime()) 887 out << pre << "Night: " << fNight << endl;895 out << pre << "Night: " << fNight.GetStringFmt("%Y-%m-%d") << endl; 888 896 out << endl; 889 897 out << pre << "LightCondition: "; … … 894 902 case kTwilight: out << "Twilight" << endl; break; 895 903 case kMoon: out << "Moon" << endl; break; 896 case kDay: out << "Day" << endl; break;904 case kDay: out << "Day" << endl; break; 897 905 } 898 906 899 907 if (fStart!=MTime()) 900 out << pre << "Start: " << fStart << endl;908 out << pre << "Start: " << fStart.GetSqlDateTime() << endl; 901 909 if (fLastRun>=0) 902 910 out << pre << "LastRun: " << fLastRun << endl;
Note:
See TracChangeset
for help on using the changeset viewer.