Changeset 1902
- Timestamp:
- 04/03/03 15:37:41 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1893 r1902 6 6 floor() is unkown) 7 7 8 2003/04/02: Thomas Bretz 8 9 10 2003/04/03: Thomas Bretz 11 12 * mbase/MEvtLopp.cc, mbase/MParContainer.[h,cc], 13 mbase/MParList.cc, mbase/MTaskList.cc: 14 - changed the stuff for reading steering card - didn't really 15 work like expected 16 17 * mhist/MHMatrix.cc, mfileio/MRead.cc, manalysis/MImgCleanStd.cc: 18 - adapted ReadEnv 9 19 10 20 * mhist/MHMatrix.[h,cc]: … … 22 32 - added Clear 23 33 - added Delete 34 35 * mbase/MEvtLoop.cc: 36 - added output of the name 37 38 * mbase/MLog.[h,cc]: 39 - don't use any pthread stuff if _REENTRANT is not defined 40 41 * mfileio/MRead.cc, mhist/MHMatrix.cc: 42 - fixed waring for unreachable statement 43 44 * mhist/MHArray.cc: 45 - fixed: redifinition of default argument 46 24 47 25 48 -
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r1895 r1902 701 701 *fLog << warn << "WARNING - Second argument in MEvtLoop::ReadEnv has no meaning... ignored." << endl; 702 702 703 *fLog << "1: " << "'" << prefix << "'" << (int)print << endl;704 705 703 prefix = fName; 706 704 prefix += "."; -
trunk/MagicSoft/Mars/mbase/MParContainer.cc
r1880 r1902 520 520 postfix.Insert(0, "."); 521 521 522 return IsEnvDefined(env, prefix+ fName+postfix, print);522 return IsEnvDefined(env, prefix+postfix, print); 523 523 } 524 524 … … 543 543 Int_t MParContainer::GetEnvValue(const TEnv &env, TString prefix, TString postfix, Int_t dflt) const 544 544 { 545 return ((TEnv&)env).GetValue(prefix+fName+"."+postfix, dflt);545 return GetEnvValue(env, prefix+"."+postfix, dflt); 546 546 } 547 547 548 548 Double_t MParContainer::GetEnvValue(const TEnv &env, TString prefix, TString postfix, Double_t dflt) const 549 549 { 550 return ((TEnv&)env).GetValue(prefix+fName+"."+postfix, dflt);550 return GetEnvValue(env, prefix+"."+postfix, dflt); 551 551 } 552 552 553 553 const char *MParContainer::GetEnvValue(const TEnv &env, TString prefix, TString postfix, const char *dflt) const 554 554 { 555 return ((TEnv&)env).GetValue(prefix+fName+"."+postfix, dflt); 556 } 555 return GetEnvValue(env, prefix+"."+postfix, dflt); 556 } 557 558 Int_t MParContainer::GetEnvValue(const TEnv &env, TString prefix, Int_t dflt) const 559 { 560 return ((TEnv&)env).GetValue(prefix, dflt); 561 } 562 563 Double_t MParContainer::GetEnvValue(const TEnv &env, TString prefix, Double_t dflt) const 564 { 565 return ((TEnv&)env).GetValue(prefix, dflt); 566 } 567 568 const char *MParContainer::GetEnvValue(const TEnv &env, TString prefix, const char *dflt) const 569 { 570 return ((TEnv&)env).GetValue(prefix, dflt); 571 } -
trunk/MagicSoft/Mars/mbase/MParContainer.h
r1892 r1902 113 113 const char *GetEnvValue(const TEnv &env, TString prefix, TString postfix, const char *dflt) const; 114 114 115 Int_t GetEnvValue(const TEnv &env, TString prefix, Int_t dflt) const; 116 Double_t GetEnvValue(const TEnv &env, TString prefix, Double_t dflt) const; 117 const char *GetEnvValue(const TEnv &env, TString prefix, const char *dflt) const; 118 115 119 ClassDef(MParContainer, 0) //The basis for all parameter containers 116 120 }; -
trunk/MagicSoft/Mars/mbase/MParList.cc
r1880 r1902 792 792 Bool_t MParList::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 793 793 { 794 if (print) 795 *fLog << all << "MParList::ReadEnv: " << prefix << " (" << (int)print << ")" << endl; 796 794 797 MParContainer *cont = NULL; 795 798 796 799 TIter Next(fContainer); 797 800 while ((cont=(MParContainer*)Next())) 798 if (cont->ReadEnv(env, print)==kERROR) 801 { 802 if (cont->InheritsFrom("MTaskList")) 803 { 804 if (cont->ReadEnv(env, prefix, print)==kERROR) 805 return kERROR; 806 continue; 807 } 808 809 // Check For: Job4.ContainerName.Varname 810 if (print) 811 *fLog << all << "Testing: " << prefix+cont->GetName() << endl; 812 Bool_t rc = cont->ReadEnv(env, prefix+cont->GetName(), print); 813 if (rc==kERROR) 799 814 return kERROR; 800 801 Next.Reset(); 802 while ((cont=(MParContainer*)Next())) 803 if (cont->ReadEnv(env, prefix, print)==kERROR) 815 if (rc==kTRUE) 816 continue; 817 818 // Check For: Job4.MClassName.Varname 819 if (print) 820 *fLog << all << "Testing: " << prefix+cont->ClassName() << endl; 821 rc = cont->ReadEnv(env, prefix+cont->ClassName(), print); 822 if (rc==kERROR) 804 823 return kERROR; 824 if (rc==kTRUE) 825 continue; 826 827 // Check For: ContainerName.Varname 828 if (print) 829 *fLog << all << "Testing: " << cont->GetName() << endl; 830 rc = cont->ReadEnv(env, cont->GetName(), print); 831 if (rc==kERROR) 832 return kERROR; 833 if (rc==kTRUE) 834 continue; 835 836 // Check For: MClassName.Varname 837 if (print) 838 *fLog << all << "Testing: " << cont->ClassName() << endl; 839 rc = cont->ReadEnv(env, cont->ClassName(), print); 840 if (rc==kERROR) 841 return kERROR; 842 if (rc==kTRUE) 843 continue; 844 } 805 845 806 846 return kTRUE; -
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r1880 r1902 667 667 Bool_t MTaskList::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 668 668 { 669 if (print) 670 *fLog << all << "MTaskList::ReadEnv: " << prefix << " (" << (int)print << ")" << endl; 671 669 672 MParContainer *cont = NULL; 670 673 671 674 TIter Next(fTasks); 672 675 while ((cont=(MParContainer*)Next())) 673 if (cont->ReadEnv(env, print)==kERROR) 676 { 677 if (cont->InheritsFrom("MTaskList")) 678 { 679 if (cont->ReadEnv(env, prefix, print)==kERROR) 680 return kERROR; 681 continue; 682 } 683 684 // Check For: Job4.ContainerName.Varname 685 if (print) 686 *fLog << all << "Testing: " << prefix+cont->GetName() << endl; 687 Bool_t rc = cont->ReadEnv(env, prefix+cont->GetName(), print); 688 if (rc==kERROR) 674 689 return kERROR; 675 676 Next.Reset(); 677 while ((cont=(MParContainer*)Next())) 678 if (cont->ReadEnv(env, prefix, print)==kERROR) 690 if (rc==kTRUE) 691 continue; 692 693 // Check For: Job4.MClassName.Varname 694 if (print) 695 *fLog << all << "Testing: " << prefix+cont->ClassName() << endl; 696 rc = cont->ReadEnv(env, prefix+cont->ClassName(), print); 697 if (rc==kERROR) 679 698 return kERROR; 699 if (rc==kTRUE) 700 continue; 701 702 // Check For: ContainerName.Varname 703 if (print) 704 *fLog << all << "Testing: " << cont->GetName() << endl; 705 rc = cont->ReadEnv(env, cont->GetName(), print); 706 if (rc==kERROR) 707 return kERROR; 708 if (rc==kTRUE) 709 continue; 710 711 // Check For: MClassName.Varname 712 if (print) 713 *fLog << all << "Testing: " << cont->ClassName() << endl; 714 rc = cont->ReadEnv(env, cont->ClassName(), print); 715 if (rc==kERROR) 716 return kERROR; 717 if (rc==kTRUE) 718 continue; 719 } 680 720 681 721 return kTRUE; -
trunk/MagicSoft/Mars/mfileio/MRead.cc
r1896 r1902 56 56 { 57 57 // 58 // Don't allow 'global' setup of files59 //60 if (prefix.IsNull())61 return kFALSE;62 63 //64 58 // Search (beginning with 0) all keys 65 59 // 66 for (int i=0;; i++) 60 int i=0; 61 while (1) 67 62 { 68 63 TString idx = "File"; … … 70 65 71 66 // Output if print set to kTRUE 72 IsEnvDefined(env, prefix, idx, print); 67 if (!IsEnvDefined(env, prefix, idx, print)) 68 break; 73 69 74 70 // Try to get the file name 75 71 TString name = GetEnvValue(env, prefix, idx, ""); 76 72 if (name.IsNull()) 77 break; 73 { 74 *fLog << warn << prefix+"."+idx << " empty." << endl; 75 continue; 76 } 78 77 79 78 if (name.BeginsWith("\"") && name.EndsWith("\"")) … … 83 82 } 84 83 85 if (print)86 *fLog << all << "Add File: " << name << endl; 84 *fLog << inf << "Add File: " << name << endl; 85 87 86 AddFile(name); 87 i++; 88 88 } 89 89 90 return kTRUE;90 return i!=0; 91 91 } -
trunk/MagicSoft/Mars/mhist/MHMatrix.cc
r1895 r1902 1027 1027 } 1028 1028 1029 if (fData)1030 {1031 *fLog << inf << "Removing all existing columns in " << GetDescriptor() << endl;1032 fData->Delete();1033 }1034 else1035 {1036 fData = new MDataArray;1037 SetBit(kIsOwner);1038 }1039 1040 1029 // 1041 1030 // Search (beginning with 0) all keys 1042 1031 // 1043 for (int i=0;; i++) 1032 int i=0; 1033 while (1) 1044 1034 { 1045 1035 TString idx = "Column"; … … 1047 1037 1048 1038 // Output if print set to kTRUE 1049 IsEnvDefined(env, prefix, idx, print); 1039 if (!IsEnvDefined(env, prefix, idx, print)) 1040 break; 1050 1041 1051 1042 // Try to get the file name 1052 1043 TString name = GetEnvValue(env, prefix, idx, ""); 1053 1044 if (name.IsNull()) 1054 break; 1055 1056 if (print) 1057 *fLog << all << "Add Column: " << name << endl; 1045 { 1046 *fLog << warn << prefix+"."+idx << " empty." << endl; 1047 continue; 1048 } 1049 1050 if (i==0) 1051 if (fData) 1052 { 1053 *fLog << inf << "Removing all existing columns in " << GetDescriptor() << endl; 1054 fData->Delete(); 1055 } 1056 else 1057 { 1058 fData = new MDataArray; 1059 SetBit(kIsOwner); 1060 } 1061 1058 1062 fData->AddEntry(name); 1059 } 1060 1061 return kTRUE; 1062 } 1063 i++; 1064 } 1065 1066 return i!=0; 1067 }
Note:
See TracChangeset
for help on using the changeset viewer.