Changeset 9313
- Timestamp:
- 02/11/09 10:48:24 (16 years ago)
- Location:
- trunk/MagicSoft
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9312 r9313 18 18 19 19 -*-*- END OF LINE -*-*- 20 2009/02/11 Thomas Bretz 21 22 * mcalib/MCalibColorSet.[h,cc]: 23 - removed some obsolete break statements 24 - removed obsolete gkMCRunLimit 25 - fixed setting of signal strength for extremely old 26 runs (I think we don't have them anyway) 27 28 * mcalib/MCalibrateData.cc: 29 - improved output 30 31 * mcalib/MCalibrationChargeCalc.cc: 32 - stop if no valid pulser colors have been found 33 34 * mcorsika/MCorsikaRunHeader.h: 35 - some cosmetics 36 - added some getter 37 38 * mhist/MHEvent.cc: 39 - some improvements to output 40 41 * mmc/MMcEvtBasic.[h,cc]: 42 - moved the getter returning a TString to the source file 43 - replaced Form by MString::Format 44 45 * mraw/MRawRunHeader.cc: 46 - initialize fSourceEpochChar[1] 47 - initialize fNumEventsRead 48 - suppress more output which has not been initialized 49 - removed run-type from SetRunInfo 50 - added new function SetRunType 51 - use strncpy instead of memcpy 52 - replaced const char[] arguments by TString 53 54 * msimreflector/MReflector.[h,cc]: 55 - added Print 56 - added a circle around the mirror showing fMaxR 57 58 59 20 60 2009/02/10 Thomas Bretz 21 61 -
trunk/MagicSoft/Mars/mcalib/MCalibColorSet.cc
r7122 r9313 57 57 58 58 const Int_t MCalibColorSet::gkIFAEBoxInaugurationRun = 20113; 59 const Int_t MCalibColorSet::gkMCRunLimit = 1000;60 59 const UInt_t MCalibColorSet::gkFirstRunWithFinalBits = 45626; 61 60 … … 193 192 *fLog << inf << "Run taken before inauguration of IFAE-box... using CT1 pulser." << endl; 194 193 fColor = MCalibrationCam::kCT1; 194 fStrength = 10.; 195 195 fPattern->SetPulserColor(fColor); 196 196 fPattern->SetPulserStrength(fStrength); 197 fStrength = 10.;198 197 fIsValid = kTRUE; 199 198 return kTRUE; … … 341 340 *fLog << err << "Sorry, run 27474 was taken with CLOSED LIDS. It should not be used! " << endl; 342 341 return kFALSE; 343 break;344 342 345 343 case 40493: … … 351 349 *fLog << err << "the camera. It cannot be used for the standard calibration " << endl; 352 350 return kFALSE; 353 break;354 351 355 352 case 45605: … … 357 354 *fLog << err << "It cannot be used for calibration. Try to run a pedestal extraction on it." << endl; 358 355 return kFALSE; 359 break;360 356 361 357 case 45606: … … 363 359 *fLog << err << "It cannot be used for calibration. Try to run a pedestal extraction on it." << endl; 364 360 return kFALSE; 365 break;366 361 367 362 } -
trunk/MagicSoft/Mars/mcalib/MCalibColorSet.h
r6231 r9313 19 19 20 20 static const Int_t gkIFAEBoxInaugurationRun; //! Run number of first IFAE box calibration (set to: 20113) 21 static const Int_t gkMCRunLimit; //! Maximum MC run number (now set to: 1000)22 21 static const UInt_t gkFirstRunWithFinalBits; //! Run number of first functionning digital modules 23 22 -
trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc
r9036 r9313 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MCalibrateData.cc,v 1.7 2 2008-07-22 18:55:08tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MCalibrateData.cc,v 1.73 2009-02-11 10:48:24 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 683 683 { 684 684 *fLog << err << GetDescriptor() << ": ERROR - "; 685 *fLog << "GetConversionFactor has skipped more than 90% of the pixels... abort." << endl;685 *fLog << "GetConversionFactor has skipped more than 90% of the " << fGeomCam->GetNumPixels() << " pixels... abort." << endl; 686 686 return kFALSE; 687 687 } -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r8907 r9313 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MCalibrationChargeCalc.cc,v 1.18 4 2008-06-02 08:46:44 tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MCalibrationChargeCalc.cc,v 1.185 2009-02-11 10:48:24 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 665 665 if (fPulserColor == MCalibrationCam::kNONE) 666 666 { 667 *fLog << warn << "WARNING - No Pulse colour has been set or used at all..." << endl;668 return k TRUE;667 *fLog << err << "ERROR - No event was flagged with a pulser color... no calibration possible." << endl; 668 return kFALSE; 669 669 } 670 670 -
trunk/MagicSoft/Mars/mcorsika/MCorsikaRunHeader.h
r9312 r9313 45 45 MCorsikaRunHeader(const char *name=NULL, const char *title=NULL); 46 46 47 // Getter 48 UInt_t GetRunNumber() const { return fRunNumber; } 49 UInt_t GetParticleID() const { return fParticleID; } 50 UInt_t GetNumEvents() const { return fNumEvents; } 51 47 52 UInt_t GetFormatVersion() const { return (UInt_t)fProgramVersion; } 48 Bool_t HasViewCone() const { return fViewConeOuterAngle>0; }49 50 UInt_t GetParticleID() const { return fParticleID; }51 53 52 54 Float_t GetZdMin() const { return fZdMin; } … … 66 68 67 69 Float_t GetViewConeOuterAngle() const { return fViewConeOuterAngle; } 70 Bool_t HasViewCone() const { return fViewConeOuterAngle>0; } 68 71 69 UInt_t GetNumEvents() const { return fNumEvents; } 70 71 void Print(Option_t *t=NULL) const; 72 72 // I/O 73 73 Bool_t ReadEvt(istream& fin); 74 74 Bool_t ReadEvtEnd(istream& fin); 75 75 Bool_t SeekEvtEnd(istream &fin); 76 76 77 // TObject 78 void Print(Option_t *t=NULL) const; 79 77 80 ClassDef(MCorsikaRunHeader, 2) // storage container for general info 78 81 }; -
trunk/MagicSoft/Mars/mhist/MHEvent.cc
r9224 r9313 291 291 292 292 if (fRawEvtHeader && fRawRunHeader) 293 s += " of";294 295 if (fRaw RunHeader)293 s += " FileId #"; 294 295 if (fRawEvtHeader) 296 296 s += fRawRunHeader->GetStringID(); 297 297 -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc
r9312 r9313 193 193 memset(fObservationMode, 0, 61); 194 194 fSourceEpochChar[0]=0; 195 fSourceEpochChar[1]=0; 195 196 fSourceEpochDate=0; 196 197 fNumCrates=0; … … 199 200 fNumSamplesHiGain=0; 200 201 fNumEvents=0; 202 fNumEventsRead=0; 201 203 fNumBytesPerSample=1; 202 204 fSamplingFrequency=300; … … 931 933 if (fFormatVersion>10) 932 934 *fLog << "Header sizes: " << fHeaderSizeRun << "b (run), " << fHeaderSizeEvt << "b (evt), " << fHeaderSizeCrate << "b (crate)" << endl; 933 if (fFormatVersion>5) 934 *fLog << "Telescope: " << fTelescopeNumber << endl; 935 if (fRunNumber>0) 936 { 937 if (fFormatVersion>5) 938 *fLog << "Telescope: " << fTelescopeNumber << endl; 939 *fLog << "RunNumber: " << fRunNumber; 940 if (fFormatVersion>10) 941 *fLog << "/" << fFileNumber << " (id=" << GetFileID() << ")"; 942 *fLog << " (Type=" << GetRunTypeStr() << ")" << endl; 943 } 935 944 if (fFormatVersion>7) 936 945 { … … 945 954 *fLog << ")" << endl; 946 955 } 947 *fLog << "RunNumber: " << fRunNumber;948 if (fFormatVersion>10)949 *fLog << "/" << fFileNumber << " (id=" << GetFileID() << ")";950 *fLog << " (Type=" << GetRunTypeStr() << ")" << endl;951 956 *fLog << "ProjectName: '" << fProjectName << "'" << endl; 952 957 if (fFormatVersion>5) … … 1196 1201 // Monte Carlo Interface 1197 1202 // 1198 // Set run-type, telescope number, run-number and file-number 1199 // 1200 void MRawRunHeader::SetRunInfo(UShort_t type, UShort_t tel, UInt_t run, UInt_t file) 1201 { 1202 fRunType = type; 1203 // Set telescope number, run-number and file-number 1204 // 1205 void MRawRunHeader::SetRunInfo(UShort_t tel, UInt_t run, UInt_t file) 1206 { 1203 1207 fTelescopeNumber = tel; 1204 1208 fRunNumber = run; … … 1212 1216 // Set source-name, epoch (default J) and date (default 2000) 1213 1217 // 1214 void MRawRunHeader::SetSourceInfo(const char src[80], char epoch, UShort_t date)1215 { 1216 memcpy(fSourceName, src, 80);1218 void MRawRunHeader::SetSourceInfo(const TString src, char epoch, UShort_t date) 1219 { 1220 strncpy(fSourceName, src.Data(), 80); 1217 1221 1218 1222 fSourceEpochChar[0] = epoch; // epoch char of the source 1219 fSourceEpochChar[1] = 0; // epoch char of the source 1220 1221 fSourceEpochDate = date; // epoch date of the source 1223 fSourceEpochDate = date; // epoch date of the source 1222 1224 } 1223 1225 … … 1240 1242 // Set project name and observation mode 1241 1243 // 1242 void MRawRunHeader::SetObservation(const char mode[60], const char proj[100])1243 { 1244 memcpy(fProjectName, proj, 100);1245 memcpy(fObservationMode, mode, 60);1244 void MRawRunHeader::SetObservation(const TString mode, const TString proj) 1245 { 1246 strncpy(fProjectName, proj.Data(), 100); 1247 strncpy(fObservationMode, mode.Data(), 60); 1246 1248 } 1247 1249 -
trunk/MagicSoft/Mars/msimreflector/MReflector.cc
r9277 r9313 37 37 #include <TClass.h> 38 38 #include <TSystem.h> 39 #include <TEllipse.h> 39 40 40 41 #include "MQuaternion.h" … … 43 44 #include "MLog.h" 44 45 #include "MLogManip.h" 46 47 #include "MH.h" 45 48 46 49 ClassImp(MReflector); … … 254 257 // -------------------------------------------------------------------------- 255 258 // 259 // Print the collection of mirrors 260 // 261 void MReflector::Print(Option_t *o) const 262 { 263 *fLog << all << GetDescriptor() << " (" << GetNumMirrors() << "): " << endl; 264 265 fMirrors.Print(o); 266 } 267 268 // -------------------------------------------------------------------------- 269 // 256 270 // Paint the collection of mirrors 257 271 // 258 272 void MReflector::Paint(Option_t *o) 259 273 { 274 if (!TString(o).Contains("same", TString::kIgnoreCase)) 275 MH::SetPadRange(-fMaxR*1.01, -fMaxR*1.01, fMaxR*1.01, fMaxR*1.01); 276 260 277 fMirrors.Paint(o); 261 /* 262 TIter Next(&fMirrors); 263 MMirror *m = 0; 264 265 while ((m=static_cast<MMirror*>(Next()))) 266 m->Paint(o);*/ 278 279 TEllipse e; 280 e.SetFillStyle(0); 281 e.SetLineColor(17); 282 e.PaintEllipse(0, 0, fMaxR, fMaxR, 0, 360, 0); 267 283 } 268 284 -
trunk/MagicSoft/include-Classes/MMcFormat/MMcEvtBasic.cc
r9312 r9313 52 52 #include "MMcEvtBasic.h" 53 53 54 #include "MString.h" 55 54 56 #include "MLog.h" 55 57 #include "MLogManip.h" … … 124 126 fTelescopeTheta = fTThet; 125 127 } 128 129 TString MMcEvtBasic::GetParticleName(Int_t id) 130 { 131 switch (id) 132 { 133 case kUNDEFINED: return "Undefined"; 134 case kGAMMA: return "Gamma"; 135 case kPOSITRON: return "Positron"; 136 case kELECTRON: return "Electron"; 137 case kANTIMUON: return "Anti-Muon"; 138 case kMUON: return "Muon"; 139 case kPI0: return "Pi-0"; 140 case kNEUTRON: return "Neutron"; 141 case kPROTON: return "Proton"; 142 case kHELIUM: return "Helium"; 143 case kOXYGEN: return "Oxygen"; 144 case kIRON: return "Iron"; 145 case kArtificial: return "Artificial"; 146 case kNightSky: return "NightSky"; 147 } 148 149 return MString::Format("Id:%d", id); 150 } 151 152 TString MMcEvtBasic::GetParticleSymbol(Int_t id) 153 { 154 switch (id) 155 { 156 case kUNDEFINED:return "N/A"; 157 case kGAMMA: return "\\gamma"; 158 case kPOSITRON: return "e^{+}"; 159 case kELECTRON: return "e^{-}"; 160 case kANTIMUON: return "\\mu^{+}"; 161 case kMUON: return "\\mu^{-}"; 162 case kPI0: return "\\pi^{0}"; 163 case kNEUTRON: return "n"; 164 case kPROTON: return "p"; 165 case kHELIUM: return "He"; 166 case kOXYGEN: return "O"; 167 case kIRON: return "Fe"; 168 case kNightSky: return "\\gamma_{NSB}"; 169 } 170 171 return MString::Format("Id:%d", id); 172 } 173 174 TString MMcEvtBasic::GetEnergyStr(Float_t e) 175 { 176 if (e>=1000) 177 return MString::Format("%.1fTeV", e/1000); 178 179 if (e>=10) 180 return MString::Format("%dGeV", (Int_t)(e+.5)); 181 182 if (e>=1) 183 return MString::Format("%.1fGeV", e); 184 185 return MString::Format("%dMeV", (Int_t)(e*1000+.5)); 186 } 187 126 188 127 189 // -------------------------------------------------------------------------- -
trunk/MagicSoft/include-Classes/MMcFormat/MMcEvtBasic.h
r9312 r9313 51 51 Float_t GetTelescopeTheta() const { return fTelescopeTheta; } 52 52 53 static TString GetParticleName(Int_t id) 54 { 55 switch (id) 56 { 57 case kUNDEFINED: return "Undefined"; 58 case kGAMMA: return "Gamma"; 59 case kPOSITRON: return "Positron"; 60 case kELECTRON: return "Electron"; 61 case kANTIMUON: return "Anti-Muon"; 62 case kMUON: return "Muon"; 63 case kPI0: return "Pi-0"; 64 case kNEUTRON: return "Neutron"; 65 case kPROTON: return "Proton"; 66 case kHELIUM: return "Helium"; 67 case kOXYGEN: return "Oxygen"; 68 case kIRON: return "Iron"; 69 case kArtificial: return "Artificial"; 70 case kNightSky: return "NightSky"; 71 } 72 73 return Form("Id:%d", id); 74 } 75 76 static TString GetParticleSymbol(Int_t id) 77 { 78 switch (id) 79 { 80 case kUNDEFINED:return "N/A"; 81 case kGAMMA: return "\\gamma"; 82 case kPOSITRON: return "e^{+}"; 83 case kELECTRON: return "e^{-}"; 84 case kANTIMUON: return "\\mu^{+}"; 85 case kMUON: return "\\mu^{-}"; 86 case kPI0: return "\\pi^{0}"; 87 case kNEUTRON: return "n"; 88 case kPROTON: return "p"; 89 case kHELIUM: return "He"; 90 case kOXYGEN: return "O"; 91 case kIRON: return "Fe"; 92 case kNightSky: return "\\gamma_{NSB}"; 93 } 94 95 return Form("Id:%d", id); 96 } 97 98 static TString GetEnergyStr(Float_t e) 99 { 100 if (e>=1000) 101 return Form("%.1fTeV", e/1000); 102 103 if (e>=10) 104 return Form("%dGeV", (Int_t)(e+.5)); 105 106 if (e>=1) 107 return Form("%.1fGeV", e); 108 109 return Form("%dMeV", (Int_t)(e*1000+.5)); 110 } 53 static TString GetParticleName(Int_t id); 54 static TString GetParticleSymbol(Int_t id); 55 static TString GetEnergyStr(Float_t e); 111 56 112 57 TString GetParticleSymbol() const
Note:
See TracChangeset
for help on using the changeset viewer.