Changeset 9314
- Timestamp:
- 02/11/09 11:57:57 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mastro/MAstro.cc
r9305 r9314 338 338 // -------------------------------------------------------------------------- 339 339 // 340 // Convert a mjd to a number yymmdd. The century is just cut saway, e.g.340 // Convert a mjd to a number yymmdd. The century is just cut away, e.g. 341 341 // 54393 --> 71020 (2007/10/20) 342 342 // 50741 --> 971020 (1997/10/20) … … 355 355 // 356 356 // Convert a yymmdd number to mjd. The century is defined as 2000 for 357 // yy<70, 1900 elsewise.357 // yy<70, 1900 otherwise. 358 358 // 71020 --> 54393 (2007/10/20) 359 359 // 971020 --> 50741 (1997/10/20) -
trunk/MagicSoft/Mars/mbase/MEnv.cc
r8907 r9314 60 60 61 61 #include "MArgs.h" 62 #include "MString.h" 62 63 63 64 ClassImp(MEnv); … … 541 542 542 543 if (style>3999 && style<4101) 543 val = Form("%d%%", style-4000);544 val = MString::Format("%d%%", style-4000); 544 545 545 546 switch (style) -
trunk/MagicSoft/Mars/mbase/MTask.cc
r8907 r9314 233 233 // This does not reset the counter! 234 234 fStopwatch->Reset(); 235 fNumExecutions = 0; 236 fNumExec0 = GetNumExecutionsTotal(); 235 fNumExec0 = fNumExecutions; 237 236 238 237 *fLog << all << GetDescriptor() << "... " << flush; … … 400 399 UInt_t MTask::GetNumExecutions() const 401 400 { 402 return GetNumExecutionsTotal()-fNumExec0;403 } 404 405 // -------------------------------------------------------------------------- 406 // 407 // Return the total number of calls to Process() . If Process() was not401 return fNumExecutions-fNumExec0; 402 } 403 404 // -------------------------------------------------------------------------- 405 // 406 // Return the total number of calls to Process() ever. If Process() was not 408 407 // called due to a set filter this is not counted. 409 408 // 410 409 UInt_t MTask::GetNumExecutionsTotal() const 411 410 { 412 return fNumExecutions -1;411 return fNumExecutions; 413 412 } 414 413 … … 467 466 *fLog << GetDescriptor(); 468 467 469 if (GetNumExecutions() !=(UInt_t)-1)468 if (GetNumExecutions()>0) 470 469 *fLog << "\t" << dec << GetNumExecutions(); 471 470 -
trunk/MagicSoft/Mars/mcalib/MCalibrationPatternDecode.cc
r7194 r9314 34 34 // Input: 35 35 // MRawEvtData 36 // MRawRunHeader 36 37 // 37 38 // Output: … … 68 69 Int_t MCalibrationPatternDecode::PreProcess(MParList *pList) 69 70 { 70 fRunHeader = (MRawRunHeader*)pList->Find CreateObj("MRawRunHeader");71 fRunHeader = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 71 72 if (!fRunHeader) 72 73 { … … 84 85 fPattern = (MCalibrationPattern*)pList->FindCreateObj("MCalibrationPattern"); 85 86 if (!fPattern) 86 {87 *fLog << err << "MCalibratinPattern not found... abort." << endl;88 87 return kFALSE; 89 }90 88 91 89 return kTRUE; … … 102 100 // been called just before 103 101 if (fRunHeader->GetFormatVersion()<5) 104 return kTRUE;102 return kTRUE; 105 103 106 UInt_t pattern = fEvtHeader->GetCalibrationPattern(); 104 // Get calibration pattern from event header 105 const UInt_t pattern = fEvtHeader->GetCalibrationPattern(); 107 106 108 fPattern->fCLStrength = pattern & 0xff; 109 fPattern->fCLColor = (MCalibrationPattern::CLColor_t)((pattern>>8)&0xf); 110 111 const UInt_t pulserpattern = (pattern >> 16) & 0xffff; 107 const UInt_t str = (pattern ) & 0x00ff; 108 const UInt_t col = (pattern>> 8) & 0x000f; 109 const UInt_t pat = (pattern>>16) & 0xffff; 112 110 113 fPattern->fPulserColor = MCalibrationCam::kNONE; 111 fPattern->fCLStrength = str; 112 fPattern->fCLColor = (MCalibrationPattern::CLColor_t)col; 114 113 115 if ((pulserpattern & kGreenAndBlue) || (pulserpattern & kBlueAndUV) || (pulserpattern & kGreenAndUV)) 116 fPattern->fPulserColor = MCalibrationCam::kNONE; 117 if (pulserpattern & kCT1Pulser) 118 fPattern->fPulserColor = MCalibrationCam::kCT1; 119 if (pulserpattern & kAnyUV) 120 fPattern->fPulserColor = MCalibrationCam::kUV; 121 if (pulserpattern & kAnyGreen) 122 fPattern->fPulserColor = MCalibrationCam::kGREEN; 123 if (pulserpattern & kAnyBlue) 124 fPattern->fPulserColor = MCalibrationCam::kBLUE; 114 // Set a default pattern 115 fPattern->fPulserColor = MCalibrationCam::kNONE; 125 116 126 Float_t strength = 0.; 117 // Check the pattern 118 if ((pat & kGreenAndBlue) || (pat & kBlueAndUV) || (pat & kGreenAndUV)) 119 fPattern->fPulserColor = MCalibrationCam::kNONE; 120 121 if (pat & kCT1Pulser) 122 fPattern->fPulserColor = MCalibrationCam::kCT1; 123 124 if (pat & kAnyUV) 125 fPattern->fPulserColor = MCalibrationCam::kUV; 126 127 if (pat & kAnyGreen) 128 fPattern->fPulserColor = MCalibrationCam::kGREEN; 129 130 if (pat & kAnyBlue) 131 fPattern->fPulserColor = MCalibrationCam::kBLUE; 132 133 // Now decode the strength 134 fPattern->fPulserStrength = 0.; 127 135 128 136 switch (fPattern->fPulserColor) 129 137 { 130 138 case MCalibrationCam::kNONE: 131 break; 139 break; 140 132 141 case MCalibrationCam::kGREEN: 133 if (pulserpattern & kSlot1Green) 134 strength += 5.; 135 if (pulserpattern & kSlot2Green) 136 strength += 2.; 137 if (pulserpattern & kSlot15Green) 138 strength += 1.; 139 if (pulserpattern & kSlot16AttGreen) 140 strength += 0.2; 141 break; 142 if (pat & kSlot1Green) 143 fPattern->fPulserStrength += 5.0; 144 if (pat & kSlot2Green) 145 fPattern->fPulserStrength += 2.0; 146 if (pat & kSlot15Green) 147 fPattern->fPulserStrength += 1.0; 148 if (pat & kSlot16AttGreen) 149 fPattern->fPulserStrength += 0.2; 150 break; 151 142 152 case MCalibrationCam::kBLUE: 143 if (pulserpattern & kSlot3Blue) 144 strength += 5.1; 145 if (pulserpattern & kSlot6Blue) 146 strength += 5.2; 147 if (pulserpattern & kSlot7Blue) 148 strength += 5.4; 149 if (pulserpattern & kSlot8Blue) 150 strength += 2.; 151 if (pulserpattern & kSlot9AttBlue) 152 strength += 0.25; 153 if (pulserpattern & kSlot10Blue) 154 strength += 0.; 155 if (pulserpattern & kSlot11Blue) 156 strength += 1.; 157 if (pulserpattern & kSlot14Blue) 158 strength += 5.8; 159 break; 153 if (pat & kSlot3Blue) 154 fPattern->fPulserStrength += 5.1; 155 if (pat & kSlot6Blue) 156 fPattern->fPulserStrength += 5.2; 157 if (pat & kSlot7Blue) 158 fPattern->fPulserStrength += 5.4; 159 if (pat & kSlot8Blue) 160 fPattern->fPulserStrength += 2.0; 161 if (pat & kSlot9AttBlue) 162 fPattern->fPulserStrength += 0.25; 163 if (pat & kSlot10Blue) 164 fPattern->fPulserStrength += 0.0; 165 if (pat & kSlot11Blue) 166 fPattern->fPulserStrength += 1.0; 167 if (pat & kSlot14Blue) 168 fPattern->fPulserStrength += 5.8; 169 break; 170 160 171 case MCalibrationCam::kUV: 161 if (pulserpattern & kSlot4UV) 162 strength += 1.; 163 if (pulserpattern & kSlot5UV) 164 strength += 2.; 165 if (pulserpattern & kSlot12UV) 166 strength += 5.1; 167 if (pulserpattern & kSlot13UV) 168 strength += 5.2; 169 break; 172 if (pat & kSlot4UV) 173 fPattern->fPulserStrength += 1.0; 174 if (pat & kSlot5UV) 175 fPattern->fPulserStrength += 2.0; 176 if (pat & kSlot12UV) 177 fPattern->fPulserStrength += 5.1; 178 if (pat & kSlot13UV) 179 fPattern->fPulserStrength += 5.2; 180 break; 181 170 182 case MCalibrationCam::kCT1: 171 strength = 20.; 172 break; 173 } 174 175 fPattern->fPulserStrength = strength; 183 fPattern->fPulserStrength = 20.; 184 break; 185 } 176 186 177 187 return kTRUE; -
trunk/MagicSoft/Mars/mcorsika/MCorsikaRead.cc
r9212 r9314 218 218 if (fDisplay) 219 219 { 220 // Show the number of the last event after 221 // which we now open a new file 220 222 TString txt = GetFileName(); 221 223 txt += " @ ";
Note:
See TracChangeset
for help on using the changeset viewer.