Changeset 7804 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 07/26/06 11:46:55 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MAGIC.h
r3710 r7804 21 21 #endif 22 22 23 #ifndef R__FOR_EACH 24 #define R__FOR_EACH ForEach 25 #endif 26 27 23 28 // 24 29 // Values for the eventloop control -
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r7130 r7804 736 736 // gui elements to a macro-file. 737 737 // 738 void MEvtLoop::StreamPrimitive(o fstream &out) const738 void MEvtLoop::StreamPrimitive(ostream &out) const 739 739 { 740 740 out << " MEvtLoop " << GetUniqueName(); … … 747 747 // 748 748 // 749 void MEvtLoop::SavePrimitive(o fstream &out, Option_t *opt)749 void MEvtLoop::SavePrimitive(ostream &out, Option_t *opt) 750 750 { 751 751 TString options = opt; … … 767 767 { 768 768 *fLog << err << "MEvtLoop::SavePrimitive - Error: old file not closed." << endl; 769 gListOfPrimitives-> ForEach(TObject, ResetBit)(BIT(15));769 gListOfPrimitives->R__FOR_EACH(TObject, ResetBit)(BIT(15)); 770 770 delete gListOfPrimitives; 771 771 } … … 788 788 return; 789 789 790 gListOfPrimitives-> ForEach(TObject, ResetBit)(BIT(15));790 gListOfPrimitives->R__FOR_EACH(TObject, ResetBit)(BIT(15)); 791 791 delete gListOfPrimitives; 792 792 gListOfPrimitives = 0; 793 } 794 795 void MEvtLoop::SavePrimitive(ofstream &out, Option_t *o) 796 { 797 SavePrimitive(static_cast<ostream&>(out), o); 793 798 } 794 799 … … 1041 1046 } 1042 1047 1043 return ReadEnv(TEnv(config), "", print); 1048 const TEnv env(config); 1049 return ReadEnv(env, "", print); 1044 1050 } 1045 1051 -
trunk/MagicSoft/Mars/mbase/MEvtLoop.h
r7071 r7804 37 37 Bool_t HasDuplicateNames(TObjArray &arr, const TString txt) const; 38 38 39 void StreamPrimitive(o fstream &out) const;39 void StreamPrimitive(ostream &out) const; 40 40 41 41 Bool_t ProcessGuiEvents(Int_t num); … … 78 78 void MakeMacro(const char *filename="evtloop.C"); 79 79 80 void SavePrimitive(ostream &out, Option_t *o=""); 80 81 void SavePrimitive(ofstream &out, Option_t *o=""); 81 82 -
trunk/MagicSoft/Mars/mbase/MLog.cc
r7438 r7804 264 264 SetBit(kIsUnderlined); 265 265 266 fPlugins-> ForEach(MLogPlugin, Underline)();266 fPlugins->R__FOR_EACH(MLogPlugin, Underline)(); 267 267 268 268 if (TestBit(eNoColors)) … … 353 353 fOut->write(fBase, len); 354 354 355 fPlugins-> ForEach(MLogPlugin, SetColor)(fOutputLevel);356 fPlugins-> ForEach(MLogPlugin, WriteBuffer)(fBase, len);355 fPlugins->R__FOR_EACH(MLogPlugin, SetColor)(fOutputLevel); 356 fPlugins->R__FOR_EACH(MLogPlugin, WriteBuffer)(fBase, len); 357 357 358 358 if (fDevice&eGui && fGui) -
trunk/MagicSoft/Mars/mbase/MParContainer.cc
r7179 r7804 682 682 // gui elements to a macro-file. 683 683 // 684 void MParContainer::SavePrimitive(o fstream &out, Option_t *o)684 void MParContainer::SavePrimitive(ostream &out, Option_t *o) 685 685 { 686 686 static UInt_t uid = 0; … … 698 698 } 699 699 700 void MParContainer::SavePrimitive(ofstream &out, Option_t *o) 701 { 702 SavePrimitive(static_cast<ostream&>(out)); 703 } 704 700 705 // -------------------------------------------------------------------------- 701 706 // 702 707 // Creates the string written by SavePrimitive and returns it. 703 708 // 704 void MParContainer::StreamPrimitive(o fstream &out) const709 void MParContainer::StreamPrimitive(ostream &out) const 705 710 { 706 711 out << " // Using MParContainer::StreamPrimitive" << endl; -
trunk/MagicSoft/Mars/mbase/MParContainer.h
r6949 r7804 94 94 virtual void Print(Option_t *option="") const; 95 95 virtual Int_t Sizeof() const; 96 virtual void SavePrimitive(ostream &out, Option_t *o=""); 96 97 virtual void SavePrimitive(ofstream &out, Option_t *o=""); 97 98 … … 108 109 virtual void SetDisplay(MStatusDisplay *d) { fDisplay = d; } 109 110 110 // FIXME: Change to ostream! Seems to be difficult, because 111 // MTaskListStreamPrimitive calls SavePrimitive(ofstream&). 112 // Maybe with a cast? 113 virtual void StreamPrimitive(ofstream &out) const; 111 virtual void StreamPrimitive(ostream &out) const; 114 112 115 113 TMethodCall *GetterMethod(const char *name) const; -
trunk/MagicSoft/Mars/mbase/MParList.cc
r7413 r7804 160 160 void MParList::SetLogStream(MLog *log) 161 161 { 162 fContainer-> ForEach(MParContainer, SetLogStream)(log);162 fContainer->R__FOR_EACH(MParContainer, SetLogStream)(log); 163 163 MParContainer::SetLogStream(log); 164 164 } … … 166 166 void MParList::SetDisplay(MStatusDisplay *d) 167 167 { 168 fContainer-> ForEach(MParContainer, SetDisplay)(d);168 fContainer->R__FOR_EACH(MParContainer, SetDisplay)(d); 169 169 MParContainer::SetDisplay(d); 170 170 } … … 659 659 void MParList::SetReadyToSave(Bool_t flag) 660 660 { 661 fContainer-> ForEach(MParContainer, SetReadyToSave)(flag);661 fContainer->R__FOR_EACH(MParContainer, SetReadyToSave)(flag); 662 662 MParContainer::SetReadyToSave(flag); 663 663 } … … 669 669 void MParList::Reset() 670 670 { 671 fContainer-> ForEach(MParContainer, Reset)();671 fContainer->R__FOR_EACH(MParContainer, Reset)(); 672 672 } 673 673 … … 841 841 } 842 842 843 void MParList::SavePrimitive(o fstream &out, Option_t *o)843 void MParList::SavePrimitive(ostream &out, Option_t *o) 844 844 { 845 845 Bool_t saved = IsSavedAsPrimitive(); … … 867 867 } 868 868 869 void MParList::SavePrimitive(ofstream &out, Option_t *o) 870 { 871 SavePrimitive(static_cast<ostream&>(out), o); 872 } 873 869 874 // -------------------------------------------------------------------------- 870 875 // … … 873 878 // gui elements to a macro-file. 874 879 // 875 void MParList::StreamPrimitive(o fstream &out) const880 void MParList::StreamPrimitive(ostream &out) const 876 881 { 877 882 out << " MParList " << GetUniqueName(); … … 894 899 { 895 900 MParContainer::GetNames(arr); 896 fContainer-> ForEach(MParContainer, GetNames)(arr);901 fContainer->R__FOR_EACH(MParContainer, GetNames)(arr); 897 902 } 898 903 … … 905 910 { 906 911 MParContainer::SetNames(arr); 907 fContainer-> ForEach(MParContainer, SetNames)(arr);912 fContainer->R__FOR_EACH(MParContainer, SetNames)(arr); 908 913 } 909 914 -
trunk/MagicSoft/Mars/mbase/MParList.h
r7413 r7804 35 35 enum { kIsOwner = BIT(14) }; 36 36 37 void StreamPrimitive(o fstream &out) const;37 void StreamPrimitive(ostream &out) const; 38 38 39 39 void Init(const char *name, const char *title); … … 97 97 void SetNames(TObjArray &arr); 98 98 99 void SavePrimitive(ostream &out, Option_t *o=""); 99 100 void SavePrimitive(ofstream &out, Option_t *o=""); 100 101 -
trunk/MagicSoft/Mars/mbase/MString.h
r7179 r7804 13 13 public: 14 14 MString(const char *txt=0) : TString(txt) { } 15 MString(const TString &txt) : TString(txt) { }15 MString(const MString &txt) : TString(txt) { } 16 16 17 17 MString &Print(const char *fmt, va_list &ap); 18 18 MString &Print(const char *fmt, ...); 19 20 #ifndef __CINT__ 19 21 static MString Form(const char *fmt, ...); 22 #endif 20 23 21 24 ClassDef(MString, 1) // Tool to make Form() thread safe against other TStrings -
trunk/MagicSoft/Mars/mbase/MTask.cc
r7601 r7804 455 455 // and afterwards set the filter for this task. 456 456 // 457 void MTask::SavePrimitive(o fstream &out, Option_t *o)457 void MTask::SavePrimitive(ostream &out, Option_t *o) 458 458 { 459 459 MParContainer::SavePrimitive(out); … … 471 471 if (fSerialNumber>0) 472 472 out << " " << GetUniqueName() << ".SetSerialNumber(" << fSerialNumber <<");" << endl; 473 } 474 475 void MTask::SavePrimitive(ofstream &out, Option_t *o) 476 { 477 SavePrimitive(static_cast<ostream&>(out), o); 473 478 } 474 479 -
trunk/MagicSoft/Mars/mbase/MTask.h
r7601 r7804 120 120 virtual Int_t CallPostProcess(); 121 121 122 void SavePrimitive(ostream &out, Option_t *o=""); 122 123 void SavePrimitive(ofstream &out, Option_t *o=""); 123 124 -
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r7688 r7804 144 144 void MTaskList::SetLogStream(MLog *log) 145 145 { 146 fTasks-> ForEach(MTask, SetLogStream)(log);146 fTasks->R__FOR_EACH(MTask, SetLogStream)(log); 147 147 MTask::SetLogStream(log); 148 148 } … … 154 154 void MTaskList::SetDisplay(MStatusDisplay *d) 155 155 { 156 fTasks-> ForEach(MTask, SetDisplay)(d);156 fTasks->R__FOR_EACH(MTask, SetDisplay)(d); 157 157 MTask::SetDisplay(d); 158 158 } … … 160 160 void MTaskList::SetAccelerator(Byte_t acc) 161 161 { 162 fTasks-> ForEach(MTask, SetAccelerator)(acc);162 fTasks->R__FOR_EACH(MTask, SetAccelerator)(acc); 163 163 MTask::SetAccelerator(acc); 164 164 } … … 171 171 void MTaskList::SetSerialNumber(Byte_t num) 172 172 { 173 fTasks-> ForEach(MTask, SetSerialNumber)(num);173 fTasks->R__FOR_EACH(MTask, SetSerialNumber)(num); 174 174 MTask::SetSerialNumber(num); 175 175 } … … 802 802 // create the Iterator for the TaskList 803 803 // 804 fTasks-> ForEach(MTask, PrintStatistics)(lvl+1, title, GetCpuTime());804 fTasks->R__FOR_EACH(MTask, PrintStatistics)(lvl+1, title, GetCpuTime()); 805 805 806 806 if (lvl==0) … … 827 827 // gui elements to a macro-file. 828 828 // 829 void MTaskList::StreamPrimitive(o fstream &out) const829 void MTaskList::StreamPrimitive(ostream &out) const 830 830 { 831 831 out << " MTaskList " << GetUniqueName(); … … 853 853 { 854 854 MParContainer::GetNames(arr); 855 fTasks-> ForEach(MParContainer, GetNames)(arr);855 fTasks->R__FOR_EACH(MParContainer, GetNames)(arr); 856 856 } 857 857 … … 859 859 { 860 860 MParContainer::SetNames(arr); 861 fTasks-> ForEach(MParContainer, SetNames)(arr);861 fTasks->R__FOR_EACH(MParContainer, SetNames)(arr); 862 862 } 863 863 -
trunk/MagicSoft/Mars/mbase/MTaskList.h
r7688 r7804 31 31 32 32 void Remove(MTask *task); 33 void StreamPrimitive(o fstream &out) const;33 void StreamPrimitive(ostream &out) const; 34 34 Bool_t CheckAddToList(MTask *task, const char *tType, const MTask *where=NULL) const; 35 35
Note:
See TracChangeset
for help on using the changeset viewer.