Changeset 4452 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 08/04/04 11:19:34 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MArgs.cc
r2728 r4452 18 18 ! Author(s): Thomas Bretz, 7/2003 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2003 20 ! Copyright: MAGIC Software Development, 2003-2004 21 21 ! 22 22 ! -
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r4368 r4452 952 952 } 953 953 954 fLog->ReadEnv(env, prefix, print); 955 954 956 return kTRUE; 955 957 } … … 1003 1005 } 1004 1006 1007 fLog->WriteEnv(env, prefix, print); 1008 1005 1009 return kTRUE; 1006 1010 } -
trunk/MagicSoft/Mars/mbase/MLog.cc
r4253 r4452 108 108 109 109 #include "MLogPlugin.h" 110 #include "MParContainer.h" 111 #include "MArgs.h" 110 112 111 113 ClassImp(MLog); … … 509 511 // -------------------------------------------------------------------------- 510 512 // 513 // Setup MLog and global debug output from command line arguments. 514 // 515 // gLog << " -v# Verbosity level # [default=2]" << endl; 516 // gLog << " -a, --no-colors Do not use Ansii color codes" << endl; 517 // gLog << " --debug[=n] Enable root debugging (Default: gDebug=1)" << endl; 518 // 519 void MLog::Setup(MArgs &arg) 520 { 521 if (arg.HasOnlyAndRemove("--no-colors") || arg.HasOnlyAndRemove("-a")) 522 SetNoColors(); 523 524 SetDebugLevel(arg.HasOption("-v") ? arg.GetIntAndRemove("-v") : 2); 525 526 gDebug = arg.HasOption("--debug=") ? arg.GetIntAndRemove("--debug=") : 0; 527 if (gDebug==0 && arg.HasOnlyAndRemove("--debug")) 528 gDebug=1; 529 } 530 531 // -------------------------------------------------------------------------- 532 // 533 // Read the setup from a TEnv: 534 // MLog.VerbosityLevel: 0, 1, 2, 3, 4 535 // MLog.DebugLevel: 0, 1, 2, 3, 4 536 // MLog.NoColors 537 // 538 // Depending on your setup it might be correct to use something like: 539 // Job1.MLog.VerbosityLevel: 1 540 // Job1.DebugLevel: 2 541 // Job1.MLog.NoColors 542 // 543 void MLog::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 544 { 545 if (!prefix.IsNull()) 546 prefix += "."; 547 prefix += "MLog"; 548 549 MParContainer mlog("MLog"); 550 551 if (mlog.IsEnvDefined(env, prefix, "VerbosityLevel", print)) 552 SetDebugLevel(mlog.GetEnvValue(env, prefix, "VerbosityLevel", 2)); 553 554 if (mlog.IsEnvDefined(env, prefix, "DebugLevel", print)) 555 gDebug = mlog.GetEnvValue(env, prefix, "DebugLevel", 0); 556 557 if (mlog.IsEnvDefined(env, prefix, "NoColors", print)) 558 if (mlog.GetEnvValue(env, prefix, "NoColors", 1)>0) 559 SetNoColors(); 560 } 561 562 // -------------------------------------------------------------------------- 563 // 564 // Read the setup from a TEnv: 565 // MLog.VerbosityLevel: 0, 1, 2, 3, 4 566 // MLog.DebugLevel: 0, 1, 2, 3, 4 567 // MLog.NoColors 568 // 569 // Depending on your setup it might be correct to use something like: 570 // Job1.MLog.VerbosityLevel: 1 571 // Job1.DebugLevel: 2 572 // Job1.MLog.NoColors 573 // 574 void MLog::WriteEnv(TEnv &env, TString prefix, Bool_t print) const 575 { 576 if (!prefix.IsNull()) 577 prefix += "."; 578 prefix += "MLog"; 579 580 cout << "MLog::WriteEnv: not yet implemented!" << endl; 581 } 582 583 // -------------------------------------------------------------------------- 584 // 511 585 // Create a new instance of an file output stream 512 586 // an set the corresponding flag -
trunk/MagicSoft/Mars/mbase/MLog.h
r4253 r4452 13 13 #define bsz 160 // two standard lines 14 14 15 class MArgs; 16 17 class TEnv; 15 18 class TMutex; 16 19 class TGTextView; … … 181 184 void SetNoColors(Bool_t flag=kTRUE) { flag ? SetBit(eNoColors) : ResetBit(eNoColors); } 182 185 186 void Setup(MArgs &arg); 187 188 void ReadEnv(const TEnv &env, TString prefix="", Bool_t print=kFALSE); 189 void WriteEnv(TEnv &env, TString prefix="", Bool_t print=kFALSE) const; 190 183 191 void Separator(TString str="", int outlvl=0) 184 192 { -
trunk/MagicSoft/Mars/mbase/MTaskInteractive.cc
r2206 r4452 34 34 // This is a simple way to develop new code in a macro without need 35 35 // to compile it. 36 // 37 // Example: 38 // Int_t Process() 39 // { 40 // gLog << "Processing..." << endl; 41 // return kTRUE; 42 // } 43 // 44 // void main() 45 // { 46 // MTaskInteractive task; 47 // task.SetProcess(Process); 48 // MTaskList list; 49 // list.AddToList(&task); 50 // } 51 // 36 52 // 37 53 // Input Containers: -
trunk/MagicSoft/Mars/mbase/MTaskInteractive.h
r2206 r4452 1 1 #ifndef MARS_MTaskInteractive 2 2 #define MARS_MTaskInteractive 3 4 /////////////////////////////////////////////////////////////////////////////5 // //6 // MTaskInteractive //7 // //8 // Does nothing than return kCONTINUE in the Process-fucntion //9 // (use with filters) //10 // //11 /////////////////////////////////////////////////////////////////////////////12 3 13 4 #ifndef MARS_MTask -
trunk/MagicSoft/Mars/mbase/MTime.cc
r4358 r4452 157 157 // strange offsets. You can get rid of this by calling: 158 158 // TAxis::SetTimeFormat("[your-format] %F1995-01-01 00:00:00"); 159 // 160 // Be carefull: It seems that root takes sommer and winter time into account! 161 // In some circumstances you may need 162 // TAxis::SetTimeFormat("[your-format] %F1995-01-00 23:00:00"); 159 163 // 160 164 Double_t MTime::GetAxisTime() const
Note:
See TracChangeset
for help on using the changeset viewer.