Changeset 6915 for trunk/MagicSoft
- Timestamp:
- 04/07/05 14:27:22 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 added
- 4 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/AnalysisLinkDef.h
r6895 r6915 20 20 #pragma link C++ class MEventRateCalc+; 21 21 22 #pragma link C++ class MParameterI+;23 #pragma link C++ class MParameterD+;24 #pragma link C++ class MParameterDerr+;25 26 22 #pragma link C++ class MMcTriggerLvl2+; 27 23 #pragma link C++ class MMcTriggerLvl2Calc+; -
trunk/MagicSoft/Mars/manalysis/Makefile
r6895 r6915 35 35 MEventRate.cc \ 36 36 MEventRateCalc.cc \ 37 MParameters.cc \38 37 MMcTriggerLvl2.cc \ 39 38 MMcTriggerLvl2Calc.cc \ -
trunk/MagicSoft/Mars/mbase/BaseLinkDef.h
r6553 r6915 71 71 #pragma link C++ class MArgsEntry+; 72 72 73 #pragma link C++ class MParameterI+; 74 #pragma link C++ class MParameterD+; 75 #pragma link C++ class MParameterDerr+; 76 73 77 // Tool tasks 74 78 #pragma link C++ class MClone+; -
trunk/MagicSoft/Mars/mbase/MParList.cc
r6513 r6915 349 349 350 350 *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; 352 353 return NULL; 353 354 } -
trunk/MagicSoft/Mars/mbase/Makefile
r6553 r6915 49 49 MStatusArray.cc \ 50 50 MStatusDisplay.cc \ 51 MParameters.cc \ 51 52 MArray.cc \ 52 53 MArrayB.cc \ -
trunk/MagicSoft/Mars/mhbase/HBaseLinkDef.h
r2738 r6915 13 13 14 14 #pragma link C++ class MBinning+; 15 #pragma link C++ class MWeight+;16 15 17 16 #endif -
trunk/MagicSoft/Mars/mhbase/MFillH.cc
r6240 r6915 51 51 // 52 52 // To use a weight for each event filled in a histogram call 53 // SetWeight(). You can eithe use the name of a M Weightcontainer stored53 // SetWeight(). You can eithe use the name of a MParameterD container stored 54 54 // in the parameter list or a pointer to it as an argument. 55 55 // … … 92 92 #include "MHArray.h" 93 93 94 #include "M Weight.h"94 #include "MParameters.h" 95 95 96 96 #include "MParList.h" … … 424 424 if (!fWeight && !fWeightName.IsNull()) 425 425 { 426 fWeight = (M Weight*)pList->FindObject(fWeightName, "MWeight");426 fWeight = (MParameterD*)pList->FindObject(fWeightName, "MParameterD"); 427 427 428 428 if (!fWeight) 429 429 { 430 *fLog << err << fWeightName << " [M Weight] not found... aborting." << endl;430 *fLog << err << fWeightName << " [MParameterD] not found... aborting." << endl; 431 431 return kFALSE; 432 432 } … … 547 547 fCanvas->cd(); 548 548 549 const Bool_t rc = fH->Fill(fParContainer, fWeight?fWeight->Get Weight():1);549 const Bool_t rc = fH->Fill(fParContainer, fWeight?fWeight->GetVal():1); 550 550 fH->SetNumExecutions(GetNumExecutions()+1); 551 551 552 552 if (save && fCanvas) 553 553 save->cd(); 554 555 554 return rc; 556 555 } -
trunk/MagicSoft/Mars/mhbase/MFillH.h
r3788 r6915 9 9 class MMap; 10 10 class MData; 11 class M Weight;11 class MParameterD; 12 12 class MParList; 13 13 … … 30 30 TString fNameTab; 31 31 32 M Weight *fWeight;// Pointer to the container storing a weight32 MParameterD *fWeight; // Pointer to the container storing a weight 33 33 TString fWeightName; // Name of a container storing a weight 34 34 … … 62 62 void SetRuleForIdx(MData *rule); 63 63 64 void SetWeight(M Weight *w){ fWeight = w; }64 void SetWeight(MParameterD *w) { fWeight = w; } 65 65 void SetWeight(const char *name) { fWeightName = name; } 66 66 -
trunk/MagicSoft/Mars/mhbase/Makefile
r3927 r6915 23 23 SRCFILES = MFillH.cc \ 24 24 MBinning.cc \ 25 MWeight.cc \26 25 MH.cc \ 27 26 MH3.cc \ -
trunk/MagicSoft/Mars/mjobs/MJStar.cc
r6911 r6915 229 229 230 230 MHVsTime hvs("MEventRate.fRate"); 231 hvs.SetTitle("Rate per 500 events; R [Hz];Counts");231 hvs.SetTitle("Rate per 500 events;;R [Hz]"); 232 232 hvs.SetNumEvents(500); 233 233 -
trunk/MagicSoft/Mars/mmontecarlo/MMcWeightEnergySpecCalc.cc
r4835 r6915 82 82 // 83 83 // Output Container: 84 // MWeight 84 // MWeight [MParameterD] 85 85 // 86 86 ////////////////////////////////////////////////////////////////////////////// … … 94 94 #include "MMcRunHeader.hxx" 95 95 #include "MMcCorsikaRunHeader.h" 96 #include "M Weight.h"96 #include "MParameters.h" 97 97 98 98 #include "TF1.h" … … 232 232 } 233 233 234 fWeight = (M Weight*)pList->FindCreateObj("MWeight");234 fWeight = (MParameterD*)pList->FindCreateObj("MParameterD", "MWeight"); 235 235 if (!fWeight) 236 {237 *fLog << err << dbginf << "MWeight not found... exit." << endl;238 236 return kFALSE; 239 }240 237 241 238 return kTRUE; … … 347 344 348 345 const Double_t C = fCorSpecInt / fNewSpecInt; 349 Double_t weight ;346 Double_t weight = C; 350 347 351 348 352 349 if (fNewSpecIsPowLaw) 353 weight = C *pow(energy,fNewSlope-fCorsikaSlope);350 weight *= pow(energy,fNewSlope-fCorsikaSlope); 354 351 else 355 weight = C *fNewSpectrum->Eval(energy) / pow(energy,fCorsikaSlope);352 weight *= fNewSpectrum->Eval(energy) / pow(energy,fCorsikaSlope); 356 353 357 354 358 fWeight->Set Weight( weight);355 fWeight->SetVal(weight); 359 356 360 357 return kTRUE; -
trunk/MagicSoft/Mars/mmontecarlo/MMcWeightEnergySpecCalc.h
r2474 r6915 9 9 class MParList; 10 10 class MMcEvt; 11 class M Weight;11 class MParameterD; 12 12 class TF1; 13 13 … … 19 19 20 20 const MMcEvt *fMcEvt; 21 M Weight*fWeight;21 MParameterD *fWeight; 22 22 23 23 TF1* fNewSpectrum; // Function with the new spectrum
Note:
See TracChangeset
for help on using the changeset viewer.