Changeset 1880 for trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
- Timestamp:
- 03/31/03 10:37:56 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r1850 r1880 103 103 // default constructor - emty 104 104 // 105 MEvtLoop::MEvtLoop( ) : fParList(NULL), fProgress(NULL)106 { 107 fName = "Evtloop";105 MEvtLoop::MEvtLoop(const char *name) : fParList(NULL), fProgress(NULL) 106 { 107 fName = name; 108 108 } 109 109 … … 444 444 // gui elements to a macro-file. 445 445 // 446 447 446 void MEvtLoop::StreamPrimitive(ofstream &out) const 448 447 { 449 out << " MEvtLoop " << GetUniqueName() << ";" << endl; 450 } 451 448 out << " MEvtLoop " << GetUniqueName(); 449 if (fName!="Evtloop") 450 out << "(\"" << fName << "\")"; 451 out << ";" << endl; 452 } 453 454 // -------------------------------------------------------------------------- 455 // 456 // 452 457 void MEvtLoop::SavePrimitive(ofstream &out, Option_t *opt) 453 458 { … … 666 671 return n; 667 672 } 673 674 // -------------------------------------------------------------------------- 675 // 676 // Read the contents/setup of a parameter container/task from a TEnv 677 // instance (steering card/setup file). 678 // The key to search for in the file should be of the syntax: 679 // prefix.vname 680 // While vname is a name which is specific for a single setup date 681 // (variable) of this container and prefix is something like: 682 // evtloopname.name 683 // While name is the name of the containers/tasks in the parlist/tasklist 684 // 685 // eg. Job4.MImgCleanStd.CleaningLevel1: 3.0 686 // Job4.MImgCleanStd.CleaningLevel2: 2.5 687 // 688 // If this cannot be found the next step is to search for 689 // MImgCleanStd.CleaningLevel1: 3.0 690 // And if this doesn't exist, too, we should search for: 691 // CleaningLevel1: 3.0 692 // 693 // Warning: The programmer is responsible for the names to be unique in 694 // all Mars classes. 695 // 696 Bool_t MEvtLoop::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 697 { 698 if (!prefix.IsNull()) 699 *fLog << warn << "WARNING - Second argument in MEvtLoop::ReadEnv has no meaning... ignored." << endl; 700 701 *fLog << "1: " << "'" << prefix << "'" << (int)print << endl; 702 703 prefix = fName; 704 prefix += "."; 705 706 *fLog << inf << "Reading resources for " << prefix /*TEnv::fRcName << " from " << env.GetRcName()*/ << endl; 707 708 if (fParList->ReadEnv(env, prefix, print)==kERROR) 709 { 710 *fLog << err << "ERROR - Reading Environment file." << endl; 711 return kFALSE; 712 } 713 714 return kTRUE; 715 } 716 717 // -------------------------------------------------------------------------- 718 // 719 // Write the contents/setup of a parameter container/task to a TEnv 720 // instance (steering card/setup file). 721 // The key to search for in the file should be of the syntax: 722 // prefix.vname 723 // While vname is a name which is specific for a single setup date 724 // (variable) of this container and prefix is something like: 725 // evtloopname.name 726 // While name is the name of the containers/tasks in the parlist/tasklist 727 // 728 // eg. Job4.MImgCleanStd.CleaningLevel1: 3.0 729 // Job4.MImgCleanStd.CleaningLevel2: 2.5 730 // 731 // If this cannot be found the next step is to search for 732 // MImgCleanStd.CleaningLevel1: 3.0 733 // And if this doesn't exist, too, we should search for: 734 // CleaningLevel1: 3.0 735 // 736 // Warning: The programmer is responsible for the names to be unique in 737 // all Mars classes. 738 // 739 Bool_t MEvtLoop::WriteEnv(TEnv &env, TString prefix, Bool_t print) const 740 { 741 if (!prefix.IsNull()) 742 *fLog << warn << "WARNING - Second argument in MEvtLoop::WriteEnv has no meaning... ignored." << endl; 743 744 prefix = fName; 745 prefix += "."; 746 747 *fLog << inf << "Writing resources: " << prefix /*TEnv::fRcName << " to " << env.GetRcName()*/ << endl; 748 749 if (fParList->WriteEnv(env, prefix, print)!=kTRUE) 750 { 751 *fLog << err << "ERROR - Writing Environment file." << endl; 752 return kFALSE; 753 } 754 755 return kTRUE; 756 }
Note:
See TracChangeset
for help on using the changeset viewer.