Changeset 8996 for trunk/MagicSoft/Mars/mjobs
- Timestamp:
- 07/05/08 20:01:55 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/mjobs
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/JobsLinkDef.h
r8988 r8996 6 6 7 7 #pragma link C++ class MSequence+; 8 #pragma link C++ class MSequenceSQL+; 8 9 #pragma link C++ class MDataSet+; 9 10 -
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; -
trunk/MagicSoft/Mars/mjobs/MSequence.h
r8989 r8996 14 14 class MSequence : public MParContainer 15 15 { 16 friend class MSequenceSQL; 16 17 public: 17 18 enum LightCondition_t { kNA, kNoMoon, kTwilight, kMoon, kDay }; … … 67 68 void Split(const TEnv &env, const TString &prefix, const char *name, TArrayI &data, TArrayI &sub) const; 68 69 69 LightCondition_t ReadLightCondition(TEnv &env, const char *prefix) const;70 LightCondition_t GetLightCondition(const TString &str) const; 70 71 71 72 // Helper for file setup … … 92 93 public: 93 94 MSequence() : fSequence((UInt_t)-1), fLastRun((UInt_t)-1), 94 fNumEvents((UInt_t)-1), fPeriod((UInt_t)-1), f MonteCarlo(kFALSE)95 fNumEvents((UInt_t)-1), fPeriod((UInt_t)-1), fLightCondition(kNA), fMonteCarlo(kFALSE) 95 96 { 96 97 fName = "MSequence"; … … 98 99 } 99 100 MSequence(const char *fname, const char *path="", UInt_t id=(UInt_t)-1); 101 MSequence(const char *fname, UInt_t seq); 100 102 MSequence(const MSequence &s) : MParContainer(s), 101 103 fFileName(s.fFileName), fDataPath(s.fDataPath), 102 104 fSequence(s.fSequence), fStart(s.fStart), 103 105 fLastRun(s.fLastRun), fNumEvents(s.fNumEvents), fPeriod(s.fPeriod), 104 fNight(s.fNight), fProject(s.fProject), fSource(s.fSource), 106 fNight(s.fNight), fLightCondition(s.fLightCondition), 107 fProject(s.fProject), fSource(s.fSource), 105 108 fTriggerTable(s.fTriggerTable), fHvSettings(s.fHvSettings), 106 fRuns(s.fRuns), fCalRuns(s.fCalRuns), fPedRuns(s.fPedRuns), 107 fDatRuns(s.fDatRuns), fMonteCarlo(s.fMonteCarlo) { } 109 fRuns(s.fRuns), fRunsSub(s.fRunsSub), fCalRuns(s.fCalRuns), 110 fCalRunsSub(s.fCalRunsSub), fPedRuns(s.fPedRuns), 111 fPedRunsSub(s.fPedRunsSub), fDatRuns(s.fDatRuns), 112 fDatRunsSub(s.fDatRunsSub), fExclRuns(s.fExclRuns), 113 fExclRunsSub(s.fExclRunsSub), fMonteCarlo(s.fMonteCarlo) { } 108 114 109 115 // I/O -
trunk/MagicSoft/Mars/mjobs/Makefile
r8988 r8996 24 24 -I../mtools -I../mimage -I../mpointing -I../mastro -I../mfbase \ 25 25 -I../mhvstime -I../mtrigger -I../mmuon -I../mmc -I../mmovie \ 26 -I../mextralgo -I../mhflux 26 -I../mextralgo -I../mhflux -I../msql 27 27 28 28 SRCFILES = MSequence.cc \ 29 MSequenceSQL.cc \ 29 30 MDataSet.cc \ 30 31 MJob.cc \
Note:
See TracChangeset
for help on using the changeset viewer.