Changeset 1902 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 04/03/03 15:37:41 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
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;
Note:
See TracChangeset
for help on using the changeset viewer.