Ignore:
Timestamp:
01/24/05 11:07:29 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MEnergyEstimate.cc

    r5869 r5956  
    134134    return kTRUE;
    135135}
     136
     137// --------------------------------------------------------------------------
     138//
     139// Check for corresponding entries in resource file and setup filters.
     140// Avoid trailing 0's!
     141//
     142// Example:
     143//   test.C:
     144//     MEnergyEstimate est("MyEstimator");
     145//
     146//   test.rc:
     147//     MyEstimator.Rule: {0} + {1}
     148//     MyEstimator.0: log10(MHillas.fSize)
     149//     MyEstimator.1: 5.5
     150//
     151// For more details see MDataChain::ReadEnv
     152//
     153Int_t MEnergyEstimate::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
     154{
     155    MDataChain *f = new MDataChain;
     156    f->SetName(fName);
     157
     158    const Bool_t rc = f->ReadEnv(env, prefix, print);
     159    if (rc!=kTRUE)
     160    {
     161        delete f;
     162        return rc;
     163    }
     164
     165    delete fData;
     166    fData = f;
     167
     168    if (!fData->IsValid())
     169    {
     170        *fLog << err << "MEnergyEst::ReadEnv - ERROR: Inavlid rule from resource file." << endl;
     171        return kERROR;
     172    }
     173
     174    return kTRUE;
     175}
Note: See TracChangeset for help on using the changeset viewer.