Changeset 9874 for trunk/Mars


Ignore:
Timestamp:
08/16/10 14:23:04 (14 years ago)
Author:
tbretz
Message:
MJOptimizeBase now prints a warning if TRandom is used.
Location:
trunk/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/Changelog

    r9872 r9874  
    4848     - improved existing comments
    4949     - added a full class description
     50     - print a warning if TRandom is used a random number generator
    5051
    5152   * mtools/MTFillMatrix.cc:
  • trunk/Mars/mjoptim/MJOptimizeBase.cc

    r9867 r9874  
    9797
    9898#include <TFile.h>
     99#include <TRandom3.h>
    99100
    100101#include "MLog.h"
     
    109110
    110111using namespace std;
     112
     113//------------------------------------------------------------------------
     114//
     115MJOptimizeBase::MJOptimizeBase() : fDebug(-1), fEnableWeights(kFALSE)
     116{
     117    if (gRandom && gRandom->IsA()==TRandom::Class())
     118        *fLog << warn << "WARNING - gRandom is a TRandom instance. It is highly adviced to use another random generator!" << endl;
     119}
    111120
    112121//------------------------------------------------------------------------
  • trunk/Mars/mjoptim/MJOptimizeBase.h

    r9867 r9874  
    2222    TList fTestCuts;        // Cuts executed only in testing
    2323    TList fPreTasks;        // Tasks executed before cut execution
    24     TList fPostTasks;       // Tasks executed after cut execution
     24    TList fPostTasks;       // Tasks executed after pre cut execution
    2525    TList fTestTasks;       // Tasks executed at the end of the testing tasklist
    2626
     
    3030
    3131public:
    32     MJOptimizeBase() : fDebug(-1), fEnableWeights(kFALSE)
    33     {
    34     }
     32    MJOptimizeBase();
    3533
    3634    // MJOptimizeBase
Note: See TracChangeset for help on using the changeset viewer.