Changeset 9012 for trunk/MagicSoft
- Timestamp:
- 07/18/08 19:41:12 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9008 r9012 19 19 -*-*- END OF LINE -*-*- 20 20 21 2008/07/18 Thomas Bretz 22 23 * datacenter/macros/buildsequenceentries.C: 24 - Use the GetId also in the constructor of Rule 25 - fixed reading of the sections in the sequences.rc 26 27 * mbase/MTime.cc: 28 - GetStringFmt was taking the daylight saving time into account 29 (hopefully this fix is not too much dependent on the kernel) 30 31 * mjobs/MSequence.cc: 32 - added some preliminary code for comparing two sequences 33 - fixed output in Print (the "s" was missing in LightConditions) 34 - do not write the "Run[0-]*" line for anything else than 35 the "Runs" (needs more fixes) 36 37 38 21 39 2008/07/17 Thomas Bretz 22 40 … … 102 120 - commmented out caco files 103 121 - write telescope run and file-number to the file 122 - some simplification 104 123 105 124 -
trunk/MagicSoft/Mars/mbase/MTime.cc
r8999 r9012 759 759 time.tm_mon = mon-1; 760 760 time.tm_year = y-1900; 761 time.tm_isdst = 0; 762 761 time.tm_isdst = -1; 762 763 // -1: If dst, isdst is set to 1 but hour is not changed 764 // 0: If dst, hour is changed 765 766 // Get old local 763 767 const TString locale = setlocale(LC_TIME, 0); 764 768 769 // Set new local (e.g. Montag instead of Monday) 765 770 setlocale(LC_TIME, loc); 766 771 767 772 // recalculate tm_yday and tm_wday 768 mktime(&time); 773 if (mktime(&time)<0) 774 return ""; 769 775 770 776 char ret[128]; -
trunk/MagicSoft/Mars/mjobs/MSequence.cc
r9003 r9012 705 705 } 706 706 707 static int operator==(const TArrayI &a, const TArrayI &b) 708 { 709 return a.GetSize()==b.GetSize() ? 710 memcmp(a.GetArray(), b.GetArray(), a.GetSize()*sizeof(Int_t))==0 : 711 false; 712 } 713 714 static int IsNull(const TArrayI &a) 715 { 716 if (a.GetSize()==0) 717 return true; 718 719 return a.GetSize()==0 ? true : a==TArrayI(a.GetSize()); 720 } 721 722 static int IsNull(const TArrayI &a, const TArrayI &b) 723 { 724 return IsNull(a) && IsNull(b); 725 } 726 727 Bool_t MSequence::IsSimilar(const MSequence &s) const 728 { 729 return // Mandatory 730 fTelescope==s.fTelescope && fSequence==s.fSequence && 731 fNight==s.fNight 732 && fLightCondition==s.fLightCondition && 733 734 fMonteCarlo==s.fMonteCarlo && 735 736 (fRunsSub ==s.fRunsSub || IsNull(fRunsSub, s.fRunsSub)) && 737 (fCalRunsSub ==s.fCalRunsSub || IsNull(fCalRunsSub, s.fCalRunsSub)) && 738 (fPedRunsSub ==s.fPedRunsSub || IsNull(fPedRunsSub, s.fPedRunsSub)) && 739 (fDatRunsSub ==s.fDatRunsSub || IsNull(fDatRunsSub, s.fDatRunsSub)) && 740 (fExclRunsSub==s.fExclRunsSub || IsNull(fExclRunsSub, s.fExclRunsSub)) 741 ; 742 } 743 744 Bool_t MSequence::IsIdentical(const MSequence &s) const 745 { 746 return IsSimilar(s) && 747 // Unnecessary 748 fStart==s.fStart && fLastRun==s.fLastRun && 749 fNumEvents==s.fNumEvents && fPeriod==s.fPeriod && 750 fProject==s.fProject && fSource==s.fSource && 751 /*fTriggerTable==s.fTriggerTable &&*/ fHvSettings==s.fHvSettings; 752 } 753 754 Bool_t MSequence::operator==(const MSequence &s) const 755 { 756 return IsIdentical(s) && 757 // Obsolete 758 fDataPath==s.fDataPath && fFileName==s.fFileName; 759 } 760 707 761 //--------------------------------------------------------------------------- 708 762 // … … 927 981 out << pre << "Night: " << fNight.GetStringFmt("%Y-%m-%d") << endl; 928 982 out << endl; 929 out << pre << "LightCondition : ";983 out << pre << "LightConditions: "; 930 984 switch (fLightCondition) 931 985 { … … 965 1019 { 966 1020 str += PrintRuns(out, pre, "Runs: ", fRuns, fRunsSub); 967 str +=PrintRuns(out, pre, "CalRuns: ", fCalRuns, fCalRunsSub);968 str +=PrintRuns(out, pre, "PedRuns: ", fPedRuns, fPedRunsSub);969 str +=PrintRuns(out, pre, "DataRuns: ", fDatRuns, fDatRunsSub);970 str +=PrintRuns(out, pre, "Exclude: ", fExclRuns, fExclRunsSub);1021 /*str +=*/ PrintRuns(out, pre, "CalRuns: ", fCalRuns, fCalRunsSub); 1022 /*str +=*/ PrintRuns(out, pre, "PedRuns: ", fPedRuns, fPedRunsSub); 1023 /*str +=*/ PrintRuns(out, pre, "DataRuns: ", fDatRuns, fDatRunsSub); 1024 /*str +=*/ PrintRuns(out, pre, "Exclude: ", fExclRuns, fExclRunsSub); 971 1025 } 972 1026 -
trunk/MagicSoft/Mars/mjobs/MSequence.h
r9003 r9012 22 22 kCalibrated, kImages 23 23 }; 24 24 25 private: 25 26 TString fFileName; // Expanded file name … … 115 116 fExclRunsSub(s.fExclRunsSub), fMonteCarlo(s.fMonteCarlo) { } 116 117 118 Bool_t IsSimilar(const MSequence &s) const; 119 Bool_t IsIdentical(const MSequence &s) const; 120 Bool_t operator==(const MSequence &s) const; 121 117 122 // I/O 118 123 Bool_t WriteFile(const char *filename, const Option_t *o) const;
Note:
See TracChangeset
for help on using the changeset viewer.