- Timestamp:
- 02/12/09 20:07:51 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9327 r9328 22 22 * datacenter/macros/fillsources.C: 23 23 - updated 24 25 * mfileio/MWriteRootFile.[h,cc]: 26 - added some comments 27 - renamed GetNewFileName to SubstituteName 28 - made SubstituteName static 29 30 * mhist/MHCamera.cc: 31 - fixed the number in the legend (was wrong since last update) 32 33 * mjobs/MDataSet.cc: 34 - replaced From by MString::Format 35 36 * mjobs/MJSimulation.cc: 37 - a lot of things were renamed 38 - the refelctor can now be set from the setup file 39 - changed the binning for the event width 40 - removed plot "CamShadow" 41 - changed rules for file names 42 43 * ceres.rc: 44 - updated according to the changes in MJSimulation 45 46 * mjobs/MSequence.cc: 47 - replaced use of Form by MString::Format 48 - allow non-setting of fNight 49 - don't print period if -1 50 51 * mmain/MEventDisplay.cc: 52 - decode trigger pattern for display 53 54 * mmain/Makefile: 55 - included mtrigger 56 57 * msim/MHPhotonEvent.cc: 58 - search Reflector instead of MReflector 59 60 * msim/MSimAbsorption.cc: 61 - added some info output 62 63 * msimcamera/MSimAPD.[h,cc]: 64 - added an option to set the geom cam name. Can be used to skip 65 this task 66 67 * msimcamera/MSimCamera.[h,cc]: 68 - allow to set BaselineGain from resource file 69 70 * msimreflector/MSimReflector.cc: 71 - removed CamShadow container 72 - search Reflector instead of MReflector 73 24 74 25 75 -
trunk/MagicSoft/Mars/Makefile
r9275 r9328 55 55 mpedestal \ 56 56 mfileio \ 57 mreflector \58 57 mgeom \ 59 58 melectronics \ -
trunk/MagicSoft/Mars/NEWS
r9325 r9328 7 7 * fixed a few small bugs which could cause the display to crash in ganymed 8 8 and sponde 9 10 * in sequence file the date can now be omittet. In this case the 11 leading date with the underscore is missing in the expected filename 9 12 10 13 ;database -
trunk/MagicSoft/Mars/ceres.rc
r9321 r9328 73 73 # Setup the reflector and camera geometry 74 74 # ------------------------------------------------------------------------- 75 #MReflector.FileName: mreflector/reflector-magic.def 76 MReflector.FileName: mreflector/reflector-dwarf.def 75 Reflector.Constructor: MReflector 76 #Reflector.FileName: mreflector/reflector-magic.def 77 Reflector.FileName: mreflector/reflector-dwarf.def 77 78 78 79 # --- DWARF --- 79 #Geom APDs.Constructor: MGeomCamDwarf(419., 15, 17);80 #MGeomCam.Constructor: MGeomCamDwarf(419., 30, 17);80 #GeomCones.Constructor: MGeomCamDwarf(419., 15, 17); 81 #MGeomCam.Constructor: MGeomCamDwarf(419., 30, 17); 81 82 82 83 # distance from mirror to camera [cm] … … 85 86 #paraboloid_focal 488.87 86 87 87 Geom APDs.Constructor: MGeomCamDwarf(209.5, 7.5, 4.8887);88 MGeomCam.Constructor: MGeomCamDwarf(209.5, 15, 4.8887);88 GeomCones.Constructor: MGeomCamDwarf(209.5, 7.5, 4.8887); 89 MGeomCam.Constructor: MGeomCamDwarf(209.5, 15, 4.8887); 89 90 90 91 MSimBundlePhotons.FileName: mreflector/dwarf-apdmap.txt … … 93 94 94 95 # --- MAGIC --- 95 #Geom APDs.Class: MGeomCamMagic96 #MGeomCam.Class: MGeomCamMagic97 96 #GeomCones.Class: MGeomCamMagic 97 #MGeomCam.Class: MGeomCamMagic 98 #MSimAPD.NameGeomCam: 98 99 99 100 # ------------------------------------------------------------------------- 100 101 # Setup the absorption, conversion efficiency and angular acceptance 101 102 # ------------------------------------------------------------------------- 102 AbsorptionMirrors.FileName:mreflector/pde-mirror.txt103 AbsorptionAPDs.FileName: mreflector/pde-apd.txt104 AbsorptionCones.FileName:mreflector/dwarf-cones.txt103 MirrorReflectivity.FileName: mreflector/pde-mirror.txt 104 PhotonDetectionEfficiency.FileName: mreflector/pde-apd.txt 105 ConesAngularAcceptance.FileName: mreflector/dwarf-cones.txt 105 106 106 107 … … 134 135 135 136 # Magic like 3NN trigger (inner 396 pixel) 136 #MSimTrigger.FileNameCoincidenceMap: 3NN-lut-uniq.txt 137 #MSimTrigger.DiscriminatorThreshold: 4.5 137 MSimTrigger.FileNameCoincidenceMap: 3NN-lut-uniq.txt 138 MSimTrigger.DiscriminatorThreshold: 6.0 139 MSimTrigger.DigitalSignalLength: 8 140 MSimTrigger.CoincidenceTime: 0.5 141 142 # Magic like 4NN trigger (inner 396 pixel) 143 #MSimTrigger.FileNameCoincidenceMap: 4NN-lut-uniq.txt 144 #MSimTrigger.DiscriminatorThreshold: 5.0 138 145 #MSimTrigger.DigitalSignalLength: 8 139 146 #MSimTrigger.CoincidenceTime: 0.5 140 141 # Magic like 4NN trigger (inner 396 pixel)142 MSimTrigger.FileNameCoincidenceMap: 4NN-lut-uniq.txt143 MSimTrigger.DiscriminatorThreshold: 5.0144 MSimTrigger.DigitalSignalLength: 8145 MSimTrigger.CoincidenceTime: 0.5146 147 147 148 IntendedPulsePos.Val: 40 … … 167 168 MRawRunHeader.FadcResolution: 12 168 169 170 #MSimReadout.fConversionFactor: 1 -
trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc
r9318 r9328 192 192 // 193 193 // comp: Compression Level (see TFile, TBranch) 194 // rule: Rule to create output file name (see GetNewFileName())194 // rule: Rule to create output file name (see SubstituteName()) 195 195 // overwrite: Allow newly created file to overwrite old files ("RECREATE") 196 196 // ftitle: File title stored in the file (see TFile) … … 849 849 // "s/source/destination/" 850 850 // 851 // For more details on regular expression see a proper documentation. 851 // For more details on regular expression see a proper documentation, 852 // for example, "man 7 regex" if installed, or TPRegexp. 852 853 // 853 854 // Here is an example: … … 862 863 // your set in your program it must look \\/. 863 864 // 864 TString MWriteRootFile::GetNewFileName(const char *inname) const 865 // Note, that this function has been made static to allow your to 866 // test your split rules, i.e. regular expressions. 867 // 868 TString MWriteRootFile::SubstituteName(const char *regexp, TString fname) 865 869 { 866 870 // Remove the path from the filename 867 TString fname(inname);868 871 if (fname.Last('/')>=0) 869 872 fname.Remove(0, fname.Last('/')+1); … … 873 876 874 877 // Do splitting 875 TObjArray *subStrL = TPRegexp(sed).MatchS( fSplitRule);878 TObjArray *subStrL = TPRegexp(sed).MatchS(regexp); 876 879 if (subStrL->GetEntries()!=6) 877 880 { 878 *fLog << err << "ERROR - GetNewFileName: Evaluating split rule " << fSplitRule<< " failed." << endl;881 gLog << err << "ERROR - SubstituteName: Evaluating regexp " << regexp << " failed." << endl; 879 882 subStrL->Print(); 880 883 delete subStrL; … … 1045 1048 1046 1049 const TString oldname = read->GetFullFileName(); 1047 const TString newname = GetNewFileName(oldname);1050 const TString newname = SubstituteName(fSplitRule, oldname); 1048 1051 if (!ChangeFile(newname)) 1049 1052 return kFALSE; -
trunk/MagicSoft/Mars/mfileio/MWriteRootFile.h
r8933 r9328 94 94 // File handling 95 95 void Close(); 96 TString GetNewFileName(const char *inname) const;97 96 Bool_t ChangeFile(const char *fname); 98 97 TFile *OpenFile(const char *name, Option_t *option, const char *title, Int_t comp); … … 145 144 void RecursiveRemove(TObject *obj); 146 145 146 static TString SubstituteName(const char *regexp, TString fname); 147 147 148 ClassDef(MWriteRootFile, 1) // Task to write data into a root file 148 149 }; -
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r9317 r9328 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.11 6 2009-02-11 12:25:42tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.117 2009-02-12 20:05:06 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 1889 1889 newtxt2.PaintText(-range*.95, -range*.95, text); 1890 1890 1891 text = MString::Format("%.2f\\circ", range* .3*fGeomCam->GetConvMm2Deg());1891 text = MString::Format("%.2f\\circ", range*(0.99-0.60)*fGeomCam->GetConvMm2Deg()); 1892 1892 text = text.Strip(TString::kLeading); 1893 1893 -
trunk/MagicSoft/Mars/mjobs/MDataSet.cc
r9212 r9328 217 217 #include "MEnv.h" 218 218 #include "MAstro.h" 219 #include "MString.h" 219 220 #include "MDirIter.h" 220 221 #include "MSequence.h" … … 297 298 // Set default sequence file and dir name 298 299 if (name.IsNull()) 299 name = Form("%s%04d/sequence%08d.txt", sequences.Data(), num[i]/10000, num[i]);300 name = MString::Format("%s%04d/sequence%08d.txt", sequences.Data(), num[i]/10000, num[i]); 300 301 if (dir.IsNull()) 301 dir = Form("%s%04d/%08d", data.Data(), num[i]/10000, num[i]);302 dir = MString::Format("%s%04d/%08d", data.Data(), num[i]/10000, num[i]); 302 303 303 304 // Check if sequence information is contained in Dataset file … … 385 386 386 387 // Determin the prefix to access this resource 387 const TString prefix = num==(UInt_t)-1 ? "" : Form("%d", num);388 const TString prefix = num==(UInt_t)-1 ? "" : MString::Format("%d", num); 388 389 389 390 // Open and read the file … … 494 495 const Bool_t useds = seq.GetFileName()==fFileName; 495 496 496 out << "Sequence" << Form("%08d", seq.GetSequence()) << ".File: " << (useds?"-":seq.GetFileName()) << endl;497 out << "Sequence" << Form("%08d", seq.GetSequence()) << ".Dir: " << seq.GetDataPath() << endl;497 out << "Sequence" << MString::Format("%08d", seq.GetSequence()) << ".File: " << (useds?"-":seq.GetFileName()) << endl; 498 out << "Sequence" << MString::Format("%08d", seq.GetSequence()) << ".Dir: " << seq.GetDataPath() << endl; 498 499 if (!useds && seq.GetNumExclRuns()>0) 499 out << "Sequence" << Form("%08d", seq.GetSequence()) << ".Exclude: " << seq.GetExcludedRuns() << endl;500 out << "Sequence" << MString::Format("%08d", seq.GetSequence()) << ".Exclude: " << seq.GetExcludedRuns() << endl; 500 501 501 502 if (useds) -
trunk/MagicSoft/Mars/mjobs/MJSimulation.cc
r9319 r9328 152 152 153 153 cont.Add(plist.FindObject("MPulseShape")); 154 cont.Add(plist.FindObject(" MReflector"));154 cont.Add(plist.FindObject("Reflector")); 155 155 cont.Add(plist.FindObject("MGeomCam")); 156 cont.Add(plist.FindObject("Geom APDs"));156 cont.Add(plist.FindObject("GeomCones")); 157 157 158 158 if (fDisplay) … … 248 248 // -------------------------------------------------------------------------------- 249 249 250 // ---------- FIXME FIXME FIXME ----------- 251 // FIXME: Find a better name (What if both cams are identical?) 252 MParEnv env1("GeomAPDs"); // Inheritance! 253 MParEnv env2("MGeomCam"); // Inheritance! 250 // FIXME: Allow empty GeomCones! 251 MParEnv env0("Reflector"); 252 MParEnv env1("GeomCones"); 253 MParEnv env2("MGeomCam"); 254 env0.SetClassName("MReflector"); 254 255 env1.SetClassName("MGeomCam"); 255 256 env2.SetClassName("MGeomCam"); 257 plist.AddToList(&env0); 256 258 plist.AddToList(&env1); 257 259 plist.AddToList(&env2); 258 259 // FIXME: Allow the user to create other reflectors260 MReflector reflector;261 plist.AddToList(&reflector);262 260 263 261 plist.FindCreateObj("MPedPhotCam", "MPedPhotFromExtractorRndm"); … … 314 312 MSimMMCS simmmcs; 315 313 316 MSimAbsorption absapd(" AbsorptionAPDs");317 MSimAbsorption absmir(" AbsorptionMirrors");318 MSimAbsorption cones(" AbsorptionCones");314 MSimAbsorption absapd("PhotonDetectionEfficiency"); 315 MSimAbsorption absmir("MirrorReflectivity"); 316 MSimAbsorption cones("ConesAngularAcceptance"); 319 317 cones.SetUseTheta(); 320 318 … … 322 320 323 321 MSimReflector reflect; 324 reflect.SetNameGeomCam("Geom APDs");322 reflect.SetNameGeomCam("GeomCones"); 325 323 // MSimStarField stars; 326 324 … … 337 335 MBinning binszd( 70, 0, 70, "BinningZd"); 338 336 MBinning binsvc(155, 0, 31, "BinningViewCone"); 339 MBinning binsew(150, 0, 25, "BinningEvtWidth");337 MBinning binsew(150, 0, 50, "BinningEvtWidth"); 340 338 MBinning binstr("BinningTrigPos"); 341 339 … … 357 355 MH3 mhtp("TriggerPos.fVal-IntendedPulsePos.fVal-MPulseShape.GetPulseWidth"); 358 356 mhtp.SetName("TrigPos"); 359 mhtp.SetTitle("Trigger position w.r.t. the first photon hitting a n APD");357 mhtp.SetTitle("Trigger position w.r.t. the first photon hitting a detector"); 360 358 361 359 MH3 mhew("MPhotonStatistics.fTimeLast-MPhotonStatistics.fTimeFirst - MRawRunHeader.GetFreqSampling/1000.*MRawRunHeader.fNumSamplesHiGain - 2*MPulseShape.GetPulseWidth"); 362 360 mhew.SetName("EvtWidth"); 363 mhew.SetTitle("Time between first and last photon hitting a n APD");361 mhew.SetTitle("Time between first and last photon hitting a detector"); 364 362 365 363 MFillH fillh1(&mhn1, "", "FillH1"); … … 372 370 fillh3.SetNameTab("H3", "Distribution after trigger"); 373 371 filltp.SetNameTab("TrigPos", "TriggerPosition w.r.t the first photon"); 374 fillew.SetNameTab("EvtWidth", "Time between first and last photon hitting a n APD");372 fillew.SetNameTab("EvtWidth", "Time between first and last photon hitting a detector"); 375 373 376 374 MHPhotonEvent planeG(1); // Get from MaxImpact … … 387 385 MFillH fillG(&planeG, "MPhotonEvent", "FillGround"); 388 386 MFillH fill0(&plane0, "MirrorPlane0", "FillReflector"); 389 MFillH fill1(&plane1, "MirrorPlane1", "FillCamShadow");387 //MFillH fill1(&plane1, "MirrorPlane1", "FillCamShadow"); 390 388 MFillH fill2(&plane2, "MirrorPlane2", "FillCandidates"); 391 389 MFillH fill3(&plane3, "MirrorPlane3", "FillReflected"); 392 390 MFillH fill4(&plane4, "MirrorPlane4", "FillFocal"); 393 391 MFillH fillF1(&planeF1, "MPhotonEvent", "FillCamera"); 394 MFillH fillF2(&planeF2, "MPhotonEvent", "Fill APDs");392 MFillH fillF2(&planeF2, "MPhotonEvent", "FillCones"); 395 393 //MFillH fillP(&psf, "MPhotonEvent", "FillPSF"); 396 394 397 395 fillG.SetNameTab("Ground", "Photon distribution at ground"); 398 396 fill0.SetNameTab("Reflector", "Photon distribution at reflector plane w/o camera shadow"); 399 fill1.SetNameTab("CamShadow", "Photon distribution at reflector plane w/ camera shadow");397 //fill1.SetNameTab("CamShadow", "Photon distribution at reflector plane w/ camera shadow"); 400 398 fill2.SetNameTab("Candidates", "'Can hit' photon distribution at reflector plane w/ camera shadow"); 401 399 fill3.SetNameTab("Reflected", "Photon distribution after reflector projected to reflector plane"); 402 400 fill4.SetNameTab("Focal", "Photon distribution at focal plane"); 403 401 fillF1.SetNameTab("Camera", "Photon distribution which hit the detector"); 404 fillF2.SetNameTab(" APDs","Photon distribution after cones");402 fillF2.SetNameTab("Cones", "Photon distribution after cones"); 405 403 //fillP.SetNameTab("PSF", "Photon distribution after cones for all mirrors"); 406 404 407 405 // ------------------------------------------------------------------- 408 406 409 const TString rule1(Form("s/cer([0-9]+)/%s\\/ref$1.root/", Esc(fPathOut).Data())); 410 const TString rule2(Form("s/cer([0-9]+)/%s\\/sig$1.root/", Esc(fPathOut).Data())); 411 const TString rule3(Form("s/cer([0-9]+)/%s\\/cam$1.root/", Esc(fPathOut).Data())); 407 // FIXME: Pedestal and Calibration runs should get P and C 408 const TString rule1(Form("s/cer([0-9]+)/%s\\/00$1_R_MonteCarlo.root/", Esc(fPathOut).Data())); 409 const TString rule2(Form("s/cer([0-9]+)/%s\\/00$1_I_MonteCarlo.root/", Esc(fPathOut).Data())); 410 const TString rule3(Form("s/cer([0-9]+)/%s\\/00$1_D_MonteCarlo.root/", Esc(fPathOut).Data())); 412 411 413 412 MWriteRootFile write3a( 2, rule3, fOverwrite?"RECREATE":"NEW", "Camera file"); … … 471 470 472 471 MSimGeomCam simgeom; 473 simgeom.SetNameGeomCam("Geom APDs");472 simgeom.SetNameGeomCam("GeomCones"); 474 473 475 474 MSimCalibrationSignal simcal; 476 simcal.SetNameGeomCam("Geom APDs");475 simcal.SetNameGeomCam("GeomCones"); 477 476 478 477 // Dark Current: 4MHz = 0.004 GHz … … 484 483 // simnsb.SetFreq(0.005, 0.004); // 5MHz/cm^2, 4MHz 485 484 simnsb.SetFreq(0, 0.04); // 40MHz fixed for each APD 486 simnsb.SetNameGeomCam("Geom APDs");485 simnsb.SetNameGeomCam("GeomCones"); 487 486 488 487 // FIXME: How do we handle star-light? We need the rate but we also … … 491 490 MSimAPD simapd; 492 491 simapd.SetFreq(0.04); // Must be identical to MSimRanodmPhotons!! 493 simapd.SetNameGeomCam("Geom APDs");492 simapd.SetNameGeomCam("GeomCones"); 494 493 495 494 MSimExcessNoise simexcnoise; … … 563 562 { 564 563 tasks.AddToList(&fill0); 565 tasks.AddToList(&fill1);564 //tasks.AddToList(&fill1); 566 565 tasks.AddToList(&fill2); 567 566 tasks.AddToList(&fill3); … … 645 644 return kFALSE; 646 645 646 // FIXME: If pedestal file given use the values from this file 647 647 //------------------------------------------- 648 648 … … 652 652 653 653 header.Print(); 654 655 // FIXME: Display acceptance curves! 654 656 655 657 if (fDisplay) … … 666 668 shape.DrawClone()->SetBit(kCanDelete); 667 669 668 if ( header.IsDataRun() || header.IsPointRun())670 if (env0.GetCont() && (header.IsDataRun() || header.IsPointRun())) 669 671 { 670 672 c.cd(3); … … 674 676 gPad->SetGridy(); 675 677 gROOT->SetSelectedPad(0); 676 reflector.DrawClone("line")->SetBit(kCanDelete);678 static_cast<MReflector*>(env0.GetCont())->DrawClone("line")->SetBit(kCanDelete); 677 679 678 680 } … … 680 682 if (fCamera) 681 683 { 682 if ( dynamic_cast<MGeomCam*>(env1.GetCont()))684 if (env1.GetCont()) 683 685 { 684 686 c.cd(2); … … 696 698 } 697 699 698 if ( dynamic_cast<MGeomCam*>(env2.GetCont()))700 if (env2.GetCont()) 699 701 { 700 702 c.cd(4); -
trunk/MagicSoft/Mars/mjobs/MSequence.cc
r9318 r9328 416 416 case kRoot: // mcdata 417 417 d += "rawfiles/"; 418 if (!fNight) 419 *fLog << "WARNING - No Night-resource... path not supported." << endl; 418 420 d += fNight.GetStringFmt("%Y/%m/%d"); 419 421 break; … … 423 425 break; 424 426 case kCalibrated: 425 d += Form("callisto/%04d/%08d", fSequence/10000, fSequence);427 d += MString::Format("callisto/%04d/%08d", fSequence/10000, fSequence); 426 428 break; 427 429 case kImages: 428 d += Form("star/%04d/%08d", fSequence/10000, fSequence);430 d += MString::Format("star/%04d/%08d", fSequence/10000, fSequence); 429 431 break; 430 432 } … … 477 479 478 480 // ------------- Create file name -------------- 479 TString n = night.GetStringFmt("%Y%m%d_"); 481 TString n; 482 483 if (night) 484 n += night.GetStringFmt("%Y%m%d_"); 480 485 481 486 // This is for MCs (FIXME!!!!) 482 487 if (run<0) 483 n += Form("%08d", -run);488 n += MString::Format("%08d", -run); 484 489 else 485 490 { 486 491 if (tel>0) 487 n += Form("M%d_", tel);492 n += MString::Format("M%d_", tel); 488 493 489 494 // R. DeLosReyes and T. Bretz 490 495 // Changes to read the DAQ numbering format. Changes takes place 491 496 // between runs 35487 and 00035488 (2004_08_30) 492 n += Form(run>limit ? "%08d" : "%05d", run);497 n += MString::Format(run>limit ? "%08d" : "%05d", run); 493 498 494 499 if (tel>0) 495 n += Form(".%03d", file);500 n += MString::Format(".%03d", file); 496 501 } 497 502 … … 876 881 fSequence = (UInt_t)env.GetValue("Sequence", (Int_t)seq); 877 882 878 const TString prefix = Form("Sequence%08d", fSequence);883 const TString prefix = MString::Format("Sequence%08d", fSequence); 879 884 880 885 fTelescope = GetEnvValue2(env, prefix, "Telescope", 1); … … 890 895 891 896 str = GetEnvValue2(env, prefix, "Night", ""); 892 if (str.IsNull()) 893 fNight = MTime(); 894 else 895 { 896 str += " 00:00:00"; 897 fNight.SetSqlDateTime(str); 898 } 899 900 fPeriod = fNight.GetMagicPeriod(); 897 SetNight(str); 901 898 902 899 fProject = GetEnvValue2(env, prefix, "Project", ""); … … 1160 1157 while (p<pos+n) 1161 1158 { 1162 str += Form(" %d", f[p]);1159 str += MString::Format(" %d", f[p]); 1163 1160 1164 1161 if (p==pos+n-1) … … 1171 1168 1172 1169 if (i>1) 1173 str += Form(":%d", f[p+i-1]);1170 str += MString::Format(":%d", f[p+i-1]); 1174 1171 1175 1172 p += i; … … 1212 1209 return str; 1213 1210 1214 str += Form(" %d", r[p]);1211 str += MString::Format(" %d", r[p]); 1215 1212 // p now points to the last entry which fits and 1216 1213 // has a file number == 0 … … 1219 1216 // More tahn one found (i-1>1) 1220 1217 str += i-1==1 ? " " : ":"; 1221 str += Form("%d", r[p]);1218 str += MString::Format("%d", r[p]); 1222 1219 1223 1220 // One step forward … … 1294 1291 str += '\n'; 1295 1292 str += pre; 1296 str += Form("Run%08d:", r[pos]);1293 str += MString::Format("Run%08d:", r[pos]); 1297 1294 str += GetNumSequence(pos, n, f); 1298 1295 } … … 1327 1324 const TString opt(o); 1328 1325 1329 const TString pre = opt.Contains("prefixed") ? Form("Sequence%08d.", fSequence) : "";1326 const TString pre = opt.Contains("prefixed") ? MString::Format("Sequence%08d.", fSequence) : ""; 1330 1327 1331 1328 if (!IsValid()) … … 1345 1342 if (fMonteCarlo) 1346 1343 out << pre << "MonteCarlo: Yes" << endl; 1347 if (fPeriod >=0)1344 if (fPeriod!=(UInt_t)-1) 1348 1345 out << pre << "Period: " << fPeriod << endl; 1349 1346 if (fNight!=MTime()) … … 1513 1510 { 1514 1511 TString night(txt); 1512 1513 if (night.IsNull()) 1514 { 1515 fNight = MTime(); 1516 fPeriod = UInt_t(-1); 1517 return; 1518 } 1519 1515 1520 night += " 00:00:00"; 1516 1521 fNight.SetSqlDateTime(night); … … 1574 1579 seq = "/magic/"; 1575 1580 if (ismc) 1576 seq += "montecarlo/";1577 seq += Form("sequences/%04d/sequence%08d.txt", numseq/10000, numseq);1581 seq += "montecarlo/"; 1582 seq += MString::Format("sequences/%04d/sequence%08d.txt", numseq/10000, numseq); 1578 1583 gLog << inf << "Inflated sequence file: " << seq << endl; 1579 1584 } -
trunk/MagicSoft/Mars/mmain/MEventDisplay.cc
r9317 r9328 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MEventDisplay.cc,v 1.6 8 2009-02-11 12:31:47tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MEventDisplay.cc,v 1.69 2009-02-12 20:05:06 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 91 91 #include "MMuonCalibParCalc.h" // MMuonCalibParCalc 92 92 #include "MContinue.h" // MContinue 93 #include "MTriggerPatternDecode.h" // MTriggerPatternDecode 93 94 //#include "MMcTriggerLvl2Calc.h" // MMcTriggerLvl2Calc 94 95 … … 250 251 tlist->AddToList(apl); 251 252 253 MTriggerPatternDecode *decode = new MTriggerPatternDecode; 254 tlist->AddToList(decode); 252 255 253 256 //MArrivalTime *atime = new MArrivalTime; -
trunk/MagicSoft/Mars/mmain/Makefile
r8617 r9328 23 23 -I../mfileio -I../mimage -I../mhistmc -I../mgbase -I../mfbase \ 24 24 -I../mdata -I../msignal -I../mcalib -I../mbadpixels \ 25 -I../mpointing -I../mpedestal -I../mmuon -I../mfilter -I../mjobs 25 -I../mpointing -I../mpedestal -I../mmuon -I../mfilter -I../mjobs \ 26 -I../mtrigger 26 27 27 28 SRCFILES = MBrowser.cc \ -
trunk/MagicSoft/Mars/msim/MHPhotonEvent.cc
r9308 r9328 194 194 case 2: 195 195 { 196 MReflector *r = (MReflector*)pList->FindObject(" MReflector");196 MReflector *r = (MReflector*)pList->FindObject("Reflector", "MReflector"); 197 197 if (!r) 198 198 { 199 *fLog << err << " MReflectornot found... aborting." << endl;199 *fLog << err << "Reflector [MReflector] not found... aborting." << endl; 200 200 return kFALSE; 201 201 } -
trunk/MagicSoft/Mars/msim/MSimAbsorption.cc
r9243 r9328 235 235 Int_t MSimAbsorption::PreProcess(MParList *pList) 236 236 { 237 if (fFileName.IsNull()) 238 { 239 *fLog << inf << "No file given... skipping." << endl; 240 return kSKIP; 241 } 242 237 243 fEvt = (MPhotonEvent*)pList->FindObject("MPhotonEvent"); 238 244 if (!fEvt) … … 248 254 return kFALSE; 249 255 } 256 257 *fLog << inf << "Using " << (fUseTheta?"Theta":"Wavelength") << " for absorption." << endl; 250 258 251 259 return ReadFile(); -
trunk/MagicSoft/Mars/msimcamera/MSimAPD.cc
r9309 r9328 89 89 Int_t MSimAPD::PreProcess(MParList *pList) 90 90 { 91 if (fNameGeomCam.IsNull()) 92 { 93 *fLog << inf << "No geometry container... skipping." << endl; 94 return kSKIP; 95 } 96 91 97 fGeom = (MGeomCam*)pList->FindObject(fNameGeomCam, "MGeomCam"); 92 98 if (!fGeom) … … 199 205 return kTRUE; 200 206 } 207 208 // -------------------------------------------------------------------------- 209 // 210 // NameGeomCam 211 // 212 Int_t MSimAPD::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 213 { 214 Bool_t rc = kFALSE; 215 if (IsEnvDefined(env, prefix, "NameGeomCam", print)) 216 { 217 rc = kTRUE; 218 fNameGeomCam = GetEnvValue(env, prefix, "NameGeomCam", fNameGeomCam); 219 } 220 221 return rc; 222 } -
trunk/MagicSoft/Mars/msimcamera/MSimAPD.h
r9240 r9328 28 28 Double_t fFreq; // Frequency of random phtons which hit the APDs 29 29 30 // MParContainer 31 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 32 30 33 // MTask 31 34 Int_t PreProcess(MParList *pList); -
trunk/MagicSoft/Mars/msimcamera/MSimCamera.cc
r9323 r9328 281 281 return kTRUE; 282 282 } 283 284 // -------------------------------------------------------------------------- 285 // 286 // BaselineGain: Off 287 // 288 Int_t MSimCamera::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 289 { 290 Bool_t rc = kFALSE; 291 if (IsEnvDefined(env, prefix, "BaselineGain", print)) 292 { 293 rc = kTRUE; 294 fBaselineGain = GetEnvValue(env, prefix, "BaselineGain", fBaselineGain); 295 } 296 297 return rc; 298 } -
trunk/MagicSoft/Mars/msimcamera/MSimCamera.h
r9319 r9328 32 32 Bool_t fBaselineGain; // Should the gain be applied to baseline and electronic noise? 33 33 34 // MParContainer 35 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 36 34 37 // MTask 35 38 Int_t PreProcess(MParList *pList); -
trunk/MagicSoft/Mars/msimreflector/MSimReflector.cc
r9312 r9328 103 103 return kFALSE; 104 104 105 fReflector = (MReflector*)pList->FindObject(" MReflector");105 fReflector = (MReflector*)pList->FindObject("Reflector", "MReflector"); 106 106 if (!fReflector) 107 107 { 108 *fLog << err << " MReflectornot found... aborting." << endl;108 *fLog << err << "Reflector [MReflector] not found... aborting." << endl; 109 109 return kFALSE; 110 110 } … … 430 430 431 431 TClonesArray &cpy0 = fMirror0->GetArray(); 432 TClonesArray &cpy1 = fMirror1->GetArray();432 //TClonesArray &cpy1 = fMirror1->GetArray(); 433 433 TClonesArray &cpy2 = fMirror2->GetArray(); 434 434 TClonesArray &cpy3 = fMirror3->GetArray(); 435 435 TClonesArray &cpy4 = fMirror4->GetArray(); 436 436 cpy0.ExpandCreateFast(arr.GetEntriesFast()); 437 cpy1.ExpandCreateFast(arr.GetEntriesFast());437 //cpy1.ExpandCreateFast(arr.GetEntriesFast()); 438 438 cpy2.ExpandCreateFast(arr.GetEntriesFast()); 439 439 cpy3.ExpandCreateFast(arr.GetEntriesFast()); … … 507 507 508 508 // FIXME: Do we really need this one?? 509 *static_cast<MPhotonData*>(cpy1.UncheckedAt(cnt[1]++)) = *dat;509 //*static_cast<MPhotonData*>(cpy1.UncheckedAt(cnt[1]++)) = *dat; 510 510 511 511 // Check if the reflector can be hit at all … … 549 549 // MPhotonEvent::Shrink). 550 550 fMirror0->Shrink(cnt[0]); 551 fMirror1->Shrink(cnt[1]);551 //fMirror1->Shrink(cnt[1]); 552 552 fMirror2->Shrink(cnt[2]); 553 553 fMirror3->Shrink(cnt[3]);
Note:
See TracChangeset
for help on using the changeset viewer.