Changeset 6915 for trunk/MagicSoft


Ignore:
Timestamp:
04/07/05 14:27:22 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 added
4 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/AnalysisLinkDef.h

    r6895 r6915  
    2020#pragma link C++ class MEventRateCalc+;
    2121
    22 #pragma link C++ class MParameterI+;
    23 #pragma link C++ class MParameterD+;
    24 #pragma link C++ class MParameterDerr+;
    25 
    2622#pragma link C++ class MMcTriggerLvl2+;
    2723#pragma link C++ class MMcTriggerLvl2Calc+;
  • trunk/MagicSoft/Mars/manalysis/Makefile

    r6895 r6915  
    3535           MEventRate.cc \
    3636           MEventRateCalc.cc \
    37            MParameters.cc \
    3837           MMcTriggerLvl2.cc \
    3938           MMcTriggerLvl2Calc.cc \
  • trunk/MagicSoft/Mars/mbase/BaseLinkDef.h

    r6553 r6915  
    7171#pragma link C++ class MArgsEntry+;
    7272
     73#pragma link C++ class MParameterI+;
     74#pragma link C++ class MParameterD+;
     75#pragma link C++ class MParameterDerr+;
     76
    7377// Tool tasks
    7478#pragma link C++ class MClone+;
  • trunk/MagicSoft/Mars/mbase/MParList.cc

    r6513 r6915  
    349349
    350350    *fLog << dbginf << warn << "Found object '" << name << "' doesn't ";
    351     *fLog << "inherit from " << "'" << classname << "'" << endl;
     351    *fLog << "inherit from " << "'" << classname << "' but from '";
     352    *fLog << obj->ClassName() << "'" << endl;
    352353    return NULL;
    353354}
  • trunk/MagicSoft/Mars/mbase/Makefile

    r6553 r6915  
    4949           MStatusArray.cc \
    5050           MStatusDisplay.cc \
     51           MParameters.cc \
    5152           MArray.cc \
    5253           MArrayB.cc \
  • trunk/MagicSoft/Mars/mhbase/HBaseLinkDef.h

    r2738 r6915  
    1313
    1414#pragma link C++ class MBinning+;
    15 #pragma link C++ class MWeight+;
    1615
    1716#endif
  • trunk/MagicSoft/Mars/mhbase/MFillH.cc

    r6240 r6915  
    5151//
    5252// To use a weight for each event filled in a histogram call
    53 // SetWeight(). You can eithe use the name of a MWeight container stored
     53// SetWeight(). You can eithe use the name of a MParameterD container stored
    5454// in the parameter list or a pointer to it as an argument.
    5555//
     
    9292#include "MHArray.h"
    9393
    94 #include "MWeight.h"
     94#include "MParameters.h"
    9595
    9696#include "MParList.h"
     
    424424    if (!fWeight && !fWeightName.IsNull())
    425425    {
    426         fWeight = (MWeight*)pList->FindObject(fWeightName, "MWeight");
     426        fWeight = (MParameterD*)pList->FindObject(fWeightName, "MParameterD");
    427427
    428428        if (!fWeight)
    429429        {
    430             *fLog << err << fWeightName << " [MWeight] not found... aborting." << endl;
     430            *fLog << err << fWeightName << " [MParameterD] not found... aborting." << endl;
    431431            return kFALSE;
    432432        }
     
    547547        fCanvas->cd();
    548548
    549     const Bool_t rc = fH->Fill(fParContainer, fWeight?fWeight->GetWeight():1);
     549    const Bool_t rc = fH->Fill(fParContainer, fWeight?fWeight->GetVal():1);
    550550    fH->SetNumExecutions(GetNumExecutions()+1);
    551551
    552552    if (save && fCanvas)
    553553        save->cd();
    554 
    555554    return rc;
    556555}
  • trunk/MagicSoft/Mars/mhbase/MFillH.h

    r3788 r6915  
    99class MMap;
    1010class MData;
    11 class MWeight;
     11class MParameterD;
    1212class MParList;
    1313
     
    3030    TString fNameTab;
    3131
    32     MWeight *fWeight;             // Pointer to the container storing a weight
     32    MParameterD *fWeight;         // Pointer to the container storing a weight
    3333    TString fWeightName;          // Name of a container storing a weight
    3434
     
    6262    void SetRuleForIdx(MData *rule);
    6363
    64     void SetWeight(MWeight *w)       { fWeight = w; }
     64    void SetWeight(MParameterD *w)   { fWeight = w; }
    6565    void SetWeight(const char *name) { fWeightName = name; }
    6666
  • trunk/MagicSoft/Mars/mhbase/Makefile

    r3927 r6915  
    2323SRCFILES = MFillH.cc \
    2424           MBinning.cc \
    25            MWeight.cc \
    2625           MH.cc \
    2726           MH3.cc \
  • trunk/MagicSoft/Mars/mjobs/MJStar.cc

    r6911 r6915  
    229229
    230230    MHVsTime hvs("MEventRate.fRate");
    231     hvs.SetTitle("Rate per 500 events;R [Hz];Counts");
     231    hvs.SetTitle("Rate per 500 events;;R [Hz]");
    232232    hvs.SetNumEvents(500);
    233233
  • trunk/MagicSoft/Mars/mmontecarlo/MMcWeightEnergySpecCalc.cc

    r4835 r6915  
    8282//                                           
    8383//  Output Container:                       
    84 //   MWeight  
     84//   MWeight [MParameterD]
    8585//
    8686//////////////////////////////////////////////////////////////////////////////
     
    9494#include "MMcRunHeader.hxx"
    9595#include "MMcCorsikaRunHeader.h"
    96 #include "MWeight.h"
     96#include "MParameters.h"
    9797
    9898#include "TF1.h"
     
    232232      }
    233233
    234     fWeight = (MWeight*)pList->FindCreateObj("MWeight");
     234    fWeight = (MParameterD*)pList->FindCreateObj("MParameterD", "MWeight");
    235235    if (!fWeight)
    236       {
    237         *fLog << err << dbginf << "MWeight not found... exit." << endl;
    238236        return kFALSE;
    239       }
    240237   
    241238    return kTRUE;
     
    347344
    348345    const Double_t C = fCorSpecInt / fNewSpecInt;
    349     Double_t weight;
     346    Double_t weight = C;
    350347
    351348
    352349    if (fNewSpecIsPowLaw)   
    353       weight = C * pow(energy,fNewSlope-fCorsikaSlope);
     350        weight *= pow(energy,fNewSlope-fCorsikaSlope);
    354351    else
    355       weight = C * fNewSpectrum->Eval(energy) / pow(energy,fCorsikaSlope);
     352        weight *= fNewSpectrum->Eval(energy) / pow(energy,fCorsikaSlope);
    356353     
    357354
    358     fWeight->SetWeight( weight );
     355    fWeight->SetVal(weight);
    359356
    360357    return kTRUE;
  • trunk/MagicSoft/Mars/mmontecarlo/MMcWeightEnergySpecCalc.h

    r2474 r6915  
    99class MParList;
    1010class MMcEvt;
    11 class MWeight;
     11class MParameterD;
    1212class TF1;
    1313
     
    1919
    2020    const MMcEvt *fMcEvt;
    21     MWeight  *fWeight;
     21    MParameterD  *fWeight;
    2222
    2323    TF1*     fNewSpectrum;     // Function with the new spectrum
Note: See TracChangeset for help on using the changeset viewer.