- Timestamp:
- 04/25/05 15:30:46 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 1 added
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/ganymed.cc
r6949 r6977 66 66 gLog << " --outf=filename Filename for output file (eg. status display)" << endl; 67 67 gLog << " --sum[=filename] Enable writing of summary file (events after cut0)" << endl; 68 gLog << " --res[=filename] Enable writing of result file (surviving events)" << endl; 68 // gLog << " --res[=filename] Enable writing of result file (surviving events)" << endl; 69 gLog << " --skip-res Disable writing of result events" << endl; 69 70 gLog << " --write-only Only write output files. No histograms filled." << endl; 70 71 gLog << " --print-ds Print Dataset information" << endl; … … 130 131 const Bool_t kWriteSummary = arg.HasOnlyAndRemove("--sum"); 131 132 const TString kNameSummary = arg.GetStringAndRemove("--sum="); 132 const Bool_t kWriteResult = arg.HasOnlyAndRemove("--res"); 133 const TString kNameResult = arg.GetStringAndRemove("--res="); 133 const Bool_t kSkipResult = arg.HasOnlyAndRemove("--skip-res"); 134 // const Bool_t kWriteResult = arg.HasOnlyAndRemove("--res"); 135 // const TString kNameResult = arg.GetStringAndRemove("--res="); 134 136 135 137 if (kWobbleModeOn && kWobbleModeOff) … … 237 239 job.SetNameOutFile(kOutfile); 238 240 job.SetNameSummaryFile(kNameSummary); 239 job.SetNameResultFile(kNameResult);241 //job.SetNameResultFile(kNameResult); 240 242 job.EnableWriteOnly(kWriteOnly); 241 243 job.EnableWobbleMode(iswobble); 242 244 job.EnableFullDisplay(kFullDisplay); 243 245 job.EnableMonteCarloMode(kIsMc); 246 job.EnableStorageOfResult(!kSkipResult); 244 247 if (kWriteSummary) // Don't change flag set in SetNameSummaryFile 245 248 job.EnableStorageOfSummary(); 246 if (kWriteResult) // Don't change flag set in SetNameSummaryFile247 job.EnableStorageOfResult();249 //if (kWriteResult) // Don't change flag set in SetNameSummaryFile 250 // job.EnableStorageOfResult(); 248 251 249 252 if (!job.ProcessFile(seq)) -
trunk/MagicSoft/Mars/mhflux/MHAlpha.cc
r6958 r6977 84 84 fPointPos(0), fTimeEffOn(0), fTime(0), 85 85 fSkipHistTime(kFALSE), fSkipHistTheta(kFALSE), fSkipHistEnergy(kFALSE), 86 fNumTimeBins(10), fMatrix(0) 86 fForceUsingSize(kFALSE), fNumTimeBins(10), fMatrix(0) 87 87 88 { 88 89 // … … 95 96 fHAlpha.SetTitle("Alpha"); 96 97 fHAlpha.SetXTitle("\\Theta [deg]"); 97 fHAlpha.SetYTitle("E_{est} [GeV]");98 //fHAlpha.SetYTitle("E_{est} [GeV]"); 98 99 fHAlpha.SetZTitle("|\\alpha| [\\circ]"); 99 100 fHAlpha.SetDirectory(NULL); … … 108 109 109 110 110 //fHEnergy.SetName("Energy");111 fHEnergy.SetName("Excess"); 111 112 //fHEnergy.SetTitle(" N_{exc} vs. E_{est} "); 112 113 //fHEnergy.SetXTitle("E_{est} [GeV]"); … … 256 257 257 258 fHillas = 0; 258 /* 259 if (fSizeMin>=0 || fSizeMax>=0) 260 { 261 fHillas = (MHillas*)pl->FindObject("MHillas"); 262 if (!fHillas) 263 { 264 *fLog << warn << "Size cut set, but MHillas not found... abort." << endl; 265 return kFALSE; 266 } 267 } 268 */ 269 fEnergy = (MParameterD*)pl->FindObject("MEnergyEst", "MParameterD"); 259 fEnergy = fForceUsingSize ? 0 : (MParameterD*)pl->FindObject("MEnergyEst", "MParameterD"); 270 260 if (!fEnergy) 271 { /* 272 if (fEnergyMin>=0 || fEnergyMax>=0) 273 { 274 *fLog << warn << "Energy cut set, but MEnergyEst not found... abort." << endl; 275 return kFALSE; 276 } */ 277 261 { 278 262 *fLog << warn << "MEnergyEst [MParameterD] not found... " << flush; 279 263 … … 285 269 *fLog << "ignored." << endl; 286 270 287 fHEnergy.SetName("ExcessSize");288 271 fHEnergy.SetTitle(" N_{exc} vs. Size "); 289 fHEnergy.SetXTitle("Size [\\gamma]"); 272 fHEnergy.SetXTitle("Size [phe]"); 273 fHAlpha.SetYTitle("Size [phe]"); 290 274 } 291 275 else 292 276 { 293 fHEnergy.SetName("ExcessEnergy");294 277 fHEnergy.SetTitle(" N_{exc} vs. E_{est} "); 295 278 fHEnergy.SetXTitle("E_{est} [GeV]"); 279 fHAlpha.SetYTitle("E_{est} [GeV]"); 296 280 } 297 281 … … 325 309 binse.SetEdges(fOffData ? *fOffData : fHAlpha, 'y'); 326 310 binsa.SetEdges(fOffData ? *fOffData : fHAlpha, 'z'); 327 328 311 if (!fOffData) 329 312 { … … 336 319 binse.SetEdges(1, 10, 100000); 337 320 else 338 binse.SetEdges(*pl, "BinningEnergyEst"); 321 if (fEnergy) 322 binse.SetEdges(*pl, "BinningEnergyEst"); 323 else 324 binse.SetEdges(*pl, "BinningSize"); 339 325 340 326 binsa.SetEdges(*pl, "BinningAlpha"); 327 } 328 else 329 { 330 fHEnergy.SetTitle(fOffData->GetTitle()); 331 fHEnergy.SetXTitle(fOffData->GetYaxis()->GetTitle()); 332 fHAlpha.SetYTitle(fOffData->GetYaxis()->GetTitle()); 341 333 } 342 334 … … 946 938 rc = kTRUE; 947 939 } 940 if (IsEnvDefined(env, prefix, "ForceUsingSize", print)) 941 { 942 fForceUsingSize = GetEnvValue(env, prefix, "ForceUsingSize", fForceUsingSize); 943 rc = kTRUE; 944 } 948 945 return rc; 949 946 } -
trunk/MagicSoft/Mars/mhflux/MHAlpha.h
r6958 r6977 106 106 Bool_t fSkipHistTheta; 107 107 Bool_t fSkipHistEnergy; 108 Bool_t fForceUsingSize; 108 109 109 110 UShort_t fNumTimeBins; // Number of time bins to fill together … … 141 142 void SetOffData(const MHAlpha &h) 142 143 { 143 fOffData = &h.fHAlpha; 144 fOffData = &h.fHAlpha; 145 fForceUsingSize = h.fForceUsingSize; 146 fNumTimeBins = h.fNumTimeBins; 144 147 } 145 148 void SetNumTimeBins(UShort_t n) { fNumTimeBins = n; } … … 161 164 void SkipHistTheta(Bool_t b=kTRUE) { fSkipHistTheta=b; } 162 165 void SkipHistEnergy(Bool_t b=kTRUE) { fSkipHistEnergy=b; } 166 void ForceUsingSize(Bool_t b=kTRUE) { fForceUsingSize=b; } 163 167 164 168 void DrawAll(); //*MENU* -
trunk/MagicSoft/Mars/mhist/MHCamEvent.cc
r6855 r6977 210 210 // Return fSum for "sum" and fRms for "rms" 211 211 // 212 TH1 *MHCamEvent::GetHistByName(const TString name) 212 TH1 *MHCamEvent::GetHistByName(const TString name) const 213 213 { 214 214 return fSum; -
trunk/MagicSoft/Mars/mhist/MHCamEvent.h
r6855 r6977 43 43 void SetType(Int_t type) { fType = type; } 44 44 45 TH1 *GetHistByName(const TString name="") ;45 TH1 *GetHistByName(const TString name="") const; 46 46 47 47 void Paint(Option_t *o=""); -
trunk/MagicSoft/Mars/mhist/MHCamEventRot.h
r5159 r6977 51 51 Bool_t Fill(const MParContainer *par, const Stat_t w=1); 52 52 53 TH1 *GetHistByName(const TString name) { return &fHist; }53 TH1 *GetHistByName(const TString name) const { return const_cast<TH2D*>(&fHist); } 54 54 55 55 void SetNameTime(const char *name) { fNameTime=name; } -
trunk/MagicSoft/Mars/mhist/MHEvent.h
r6855 r6977 43 43 EventType_t fType; 44 44 45 TH1 *GetHistByName(const TString name) { return (TH1*)fHist; }45 TH1 *GetHistByName(const TString name) const { return (TH1*)fHist; } 46 46 47 47 Bool_t SetupFill(const MParList *plist); -
trunk/MagicSoft/Mars/mhist/MHStarMap.h
r3580 r6977 45 45 void SetMm2Deg(Float_t mmdeg); 46 46 47 TH1 *GetHistByName(const TString name) { return (TH1*)fStarMap; }47 TH1 *GetHistByName(const TString name) const { return (TH1*)fStarMap; } 48 48 49 49 TH2F *GetHist() { return fStarMap; } -
trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.cc
r2563 r6977 167 167 } 168 168 169 TH1 *MHTriggerLvl0::GetHistByName(const TString name) 169 TH1 *MHTriggerLvl0::GetHistByName(const TString name) const 170 170 { 171 171 return fSum; -
trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.h
r2550 r6977 32 32 void SetThreshold(Double_t t) { fThreshold = t; } 33 33 34 TH1 *GetHistByName(const TString name="") ;34 TH1 *GetHistByName(const TString name="") const; 35 35 36 36 void Draw(Option_t * =""); -
trunk/MagicSoft/Mars/mhistmc/MHMcTriggerLvl2.cc
r2953 r6977 360 360 // so remember to cast the returned object if you want to work with it. 361 361 // 362 TH1 *MHMcTriggerLvl2::GetHistByName(const TString name) 362 TH1 *MHMcTriggerLvl2::GetHistByName(const TString name) const 363 363 { 364 364 -
trunk/MagicSoft/Mars/mhistmc/MHMcTriggerLvl2.h
r2953 r6977 48 48 Bool_t Fill(const MParContainer *par, const Stat_t w=1); 49 49 50 TH1 *GetHistByName(const TString name) ;50 TH1 *GetHistByName(const TString name) const; 51 51 52 52 TH1F *GetHistLutPseudoSize() const { return fHistLutPseudoSize; } -
trunk/MagicSoft/Mars/mhvstime/MHPixVsTime.cc
r4891 r6977 206 206 // Return histogram of TGraph 207 207 // 208 TH1 *MHPixVsTime::GetHistByName(const TString name) 208 TH1 *MHPixVsTime::GetHistByName(const TString name) const 209 209 { 210 210 return fGraph->GetHistogram(); -
trunk/MagicSoft/Mars/mhvstime/MHPixVsTime.h
r4891 r6977 52 52 void SetTitle(const char *title); 53 53 54 TH1 *GetHistByName(const TString name="") ;54 TH1 *GetHistByName(const TString name="") const; 55 55 TGraph *GetGraph() { return fGraph; } 56 56 -
trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.cc
r4893 r6977 231 231 // Return fHistogram from TGraph 232 232 // 233 TH1 *MHSectorVsTime::GetHistByName(const TString name) 233 TH1 *MHSectorVsTime::GetHistByName(const TString name) const 234 234 { 235 235 return fGraph->GetHistogram(); -
trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.h
r4891 r6977 64 64 void SetAreaIndex(const TArrayI &a) { fAreaIndex=a; } 65 65 66 TH1 *GetHistByName(const TString name="") ;66 TH1 *GetHistByName(const TString name="") const; 67 67 //TGraph *GetGraph() { return fGraph; } 68 68 -
trunk/MagicSoft/Mars/mimage/MHHillas.cc
r6961 r6977 386 386 } 387 387 388 TH1 *MHHillas::GetHistByName(const TString name) 388 TH1 *MHHillas::GetHistByName(const TString name) const 389 389 { 390 390 if (name.Contains("Width", TString::kIgnoreCase)) -
trunk/MagicSoft/Mars/mimage/MHHillas.h
r4700 r6977 43 43 Bool_t Fill(const MParContainer *par, const Stat_t w=1); 44 44 45 TH1 *GetHistByName(const TString name); 45 TH1 *GetHistByName(const TString name) const; 46 TObject *FindObject(const TObject *obj) const { return 0; } 47 TObject *FindObject(const char *name) const 48 { 49 return (TObject*)GetHistByName(name); 50 } 46 51 47 52 TH1F *GetHistLength() { return fLength; } -
trunk/MagicSoft/Mars/mimage/MHHillasExt.cc
r6961 r6977 294 294 } 295 295 296 TH1 *MHHillasExt::GetHistByName(const TString name) 296 TH1 *MHHillasExt::GetHistByName(const TString name) const 297 297 { 298 298 if (name.Contains("Asym", TString::kIgnoreCase)) 299 return &fHAsym;300 if (name.Contains("M3L ong", TString::kIgnoreCase))301 return &fHM3Long;302 if (name.Contains("M3T rans", TString::kIgnoreCase))303 return &fHM3Trans;299 return const_cast<TH1F*>(&fHAsym); 300 if (name.Contains("M3L", TString::kIgnoreCase)) 301 return const_cast<TH1F*>(&fHM3Long); 302 if (name.Contains("M3T", TString::kIgnoreCase)) 303 return const_cast<TH1F*>(&fHM3Trans); 304 304 if (name.Contains("MaxDist", TString::kIgnoreCase)) 305 return &fHMaxDist;305 return const_cast<TH1F*>(&fHMaxDist); 306 306 307 307 return NULL; -
trunk/MagicSoft/Mars/mimage/MHHillasExt.h
r3682 r6977 37 37 Bool_t Fill(const MParContainer *par, const Stat_t w=1); 38 38 39 TH1 *GetHistByName(const TString name); 39 TH1 *GetHistByName(const TString name) const; 40 TObject *FindObject(const TObject *obj) const { return 0; } 41 TObject *FindObject(const char *name) const 42 { 43 return (TObject*)GetHistByName(name); 44 } 40 45 41 46 void Draw(Option_t *opt=NULL); -
trunk/MagicSoft/Mars/mimage/MHHillasSrc.cc
r6961 r6977 293 293 } 294 294 295 TH1 *MHHillasSrc::GetHistByName(const TString name) 295 TH1 *MHHillasSrc::GetHistByName(const TString name) const 296 296 { 297 297 if (name.Contains("Alpha", TString::kIgnoreCase)) -
trunk/MagicSoft/Mars/mimage/MHHillasSrc.h
r4817 r6977 32 32 Bool_t Fill(const MParContainer *par, const Stat_t w=1); 33 33 34 TH1 *GetHistByName(const TString name); 34 TH1 *GetHistByName(const TString name) const; 35 TObject *FindObject(const TObject *obj) const { return 0; } 36 TObject *FindObject(const char *name) const 37 { 38 return (TObject*)GetHistByName(name); 39 } 35 40 36 41 TH1F *GetHistAlpha() { return fAlpha; } -
trunk/MagicSoft/Mars/mimage/MHImagePar.cc
r6961 r6977 297 297 } 298 298 299 TH1 *MHImagePar::GetHistByName(const TString name) 299 TH1 *MHImagePar::GetHistByName(const TString name) const 300 300 { 301 301 if (name.Contains("SatHi", TString::kIgnoreCase)) 302 return &fHistSatHi;302 return const_cast<TH1F*>(&fHistSatHi); 303 303 if (name.Contains("SatLo", TString::kIgnoreCase)) 304 return &fHistSatLo;304 return const_cast<TH1F*>(&fHistSatLo); 305 305 if (name.Contains("Islands", TString::kIgnoreCase)) 306 return &fHistIslands;306 return const_cast<TH1F*>(&fHistIslands); 307 307 308 308 return NULL; -
trunk/MagicSoft/Mars/mimage/MHImagePar.h
r6489 r6977 33 33 Bool_t Fill(const MParContainer *par, const Stat_t w=1); 34 34 35 TH1 *GetHistByName(const TString name); 35 TH1 *GetHistByName(const TString name) const; 36 TObject *FindObject(const TObject *obj) const { return 0; } 37 TObject *FindObject(const char *name) const 38 { 39 return (TObject*)GetHistByName(name); 40 } 36 41 37 42 TH1F &GetHistSatHi() { return fHistSatHi; } -
trunk/MagicSoft/Mars/mimage/MHNewImagePar.cc
r6961 r6977 367 367 } 368 368 369 TH1 *MHNewImagePar::GetHistByName(const TString name) 369 TH1 *MHNewImagePar::GetHistByName(const TString name) const 370 370 { 371 371 if (name.Contains("Leakage1", TString::kIgnoreCase)) 372 return &fHistLeakage1;372 return const_cast<TH1F*>(&fHistLeakage1); 373 373 if (name.Contains("Leakage2", TString::kIgnoreCase)) 374 return &fHistLeakage2; 374 return const_cast<TH1F*>(&fHistLeakage2); 375 if (name.Contains("Conc1", TString::kIgnoreCase)) // must be first! 376 return const_cast<TH1F*>(&fHistConc1); 375 377 if (name.Contains("Conc", TString::kIgnoreCase)) 376 return &fHistConc; 377 if (name.Contains("Conc1", TString::kIgnoreCase)) 378 return &fHistConc1; 378 return const_cast<TH1F*>(&fHistConc); 379 379 if (name.Contains("UsedPix", TString::kIgnoreCase)) 380 return &fHistUsedPix;380 return const_cast<TH1F*>(&fHistUsedPix); 381 381 if (name.Contains("CorePix", TString::kIgnoreCase)) 382 return &fHistCorePix;382 return const_cast<TH1F*>(&fHistCorePix); 383 383 if (name.Contains("UsedArea", TString::kIgnoreCase)) 384 return &fHistUsedArea;384 return const_cast<TH1F*>(&fHistUsedArea); 385 385 if (name.Contains("CoreArea", TString::kIgnoreCase)) 386 return &fHistCoreArea;386 return const_cast<TH1F*>(&fHistCoreArea); 387 387 388 388 return NULL; -
trunk/MagicSoft/Mars/mimage/MHNewImagePar.h
r6869 r6977 35 35 Bool_t Fill(const MParContainer *par, const Stat_t w=1); 36 36 37 TH1 *GetHistByName(const TString name); 37 TH1 *GetHistByName(const TString name) const; 38 TObject *FindObject(const TObject *obj) const { return 0; } 39 TObject *FindObject(const char *name) const 40 { 41 return (TObject*)GetHistByName(name); 42 } 38 43 39 44 TH1F &GetHistLeakage1() { return fHistLeakage1; } -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r6968 r6977 652 652 evt8.EnableSqrtVariance(); 653 653 */ 654 MFillH fill0(&evt0, "MPedestalFundamental", "FillPedFLG");654 MFillH fill0(&evt0, "MPedestalFundamental", "FillPedFLG"); 655 655 MFillH fill1(&evt1, "MPedestalFromExtractorRndm", "FillPedRmsFLG"); 656 MFillH fill2(&evt2, "MExtractedSignalCam", "FillExtracted");656 MFillH fill2(&evt2, "MExtractedSignalCam", "FillExtracted"); 657 657 // MFillH fill3(&evt3, "MPedPhotFundamental", "FillPedPhot"); 658 MFillH fill4(&evt4, "MPedPhotFromExtractorRndm", "FillPedRMS");659 MFillH fill5(&evt5, "MSignalCam", "FillInterpolated");660 MFillH fill6(&evt6, "MBadPixelsCam", "FillUnsuitable");661 MFillH fill7(&evt7, "MSignalCam", "FillTimes");662 MFillH fill8(&evt8, "MCalibConstCam", "FillConv");663 MFillH fill9(&evt9, "MSignalCam", "FillPulse");658 MFillH fill4(&evt4, "MPedPhotFromExtractorRndm", "FillPedRMS"); 659 MFillH fill5(&evt5, "MSignalCam", "FillInterpolated"); 660 MFillH fill6(&evt6, "MBadPixelsCam", "FillUnsuitable"); 661 MFillH fill7(&evt7, "MSignalCam", "FillTimes"); 662 MFillH fill8(&evt8, "MCalibConstCam", "FillConv"); 663 MFillH fill9(&evt9, "MSignalCam", "FillPulse"); 664 664 665 665 MTaskEnv fillflorian("FinalFantasy"); -
trunk/MagicSoft/Mars/sponde.cc
r6960 r6977 52 52 gLog << " Operation Mode:" << endl; 53 53 gLog << " --refill Refill the excess histogram from result file" << endl; 54 gLog << " (usefull to change the binning)" << endl << endl; 54 gLog << " (usefull to change the binning)" << endl; 55 gLog << " --accurate Fill original energy/theta distribution from data" << endl; 56 gLog << " (do not weight the histogram)" << endl; 57 gLog << " --raw-mc Use the mc sample as it is" << endl << endl; 55 58 gLog << " Options:" << endl; 56 59 gLog.Usage(); … … 104 107 gLog.Setup(arg); 105 108 106 const TString kConfig = arg.GetStringAndRemove("--config=", "sponde.rc");107 108 const Bool_t kPrintSeq = arg.HasOnlyAndRemove("--print-ds");109 const Bool_t kPrintFiles = arg.HasOnlyAndRemove("--print-files");110 const Bool_t kDebugMem = arg.HasOnlyAndRemove("--debug-mem");109 const TString kConfig = arg.GetStringAndRemove("--config=", "sponde.rc"); 110 111 const Bool_t kPrintSeq = arg.HasOnlyAndRemove("--print-ds"); 112 const Bool_t kPrintFiles = arg.HasOnlyAndRemove("--print-files"); 113 const Bool_t kDebugMem = arg.HasOnlyAndRemove("--debug-mem"); 111 114 Int_t kDebugEnv = arg.HasOnlyAndRemove("--debug-env") ? 1 : 0; 112 115 kDebugEnv = arg.GetIntAndRemove("--debug-env=", kDebugEnv); 113 116 114 const Bool_t kQuit = arg.HasOnlyAndRemove("-q"); 115 const Bool_t kBatch = arg.HasOnlyAndRemove("-b"); 116 const Bool_t kOverwrite = arg.HasOnlyAndRemove("-f"); 117 118 const Bool_t kRefill = arg.HasOnlyAndRemove("--refill"); 117 const Bool_t kQuit = arg.HasOnlyAndRemove("-q"); 118 const Bool_t kBatch = arg.HasOnlyAndRemove("-b"); 119 const Bool_t kOverwrite = arg.HasOnlyAndRemove("-f"); 120 121 const Bool_t kRefill = arg.HasOnlyAndRemove("--refill"); 122 const Bool_t kSimple = !arg.HasOnlyAndRemove("--accurate"); 123 const Bool_t kRawMc = arg.HasOnlyAndRemove("--raw-mc"); 119 124 120 125 if (arg.GetNumOptions()>0) … … 207 212 job.SetPathOut(kOutfile); 208 213 job.SetPathIn(kInfile); 214 209 215 job.EnableRefilling(kRefill); 216 job.EnableSimpleMode(kSimple); 217 job.EnableRawMc(kRawMc); 210 218 211 219 if (!job.Process(seq))
Note:
See TracChangeset
for help on using the changeset viewer.