Changeset 9272 for trunk/MagicSoft
- Timestamp:
- 01/26/09 14:26:47 (16 years ago)
- Location:
- trunk/MagicSoft
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc
r9270 r9272 202 202 fSamplingFrequency=300; 203 203 fFadcResolution=8; 204 205 fHeaderSizeRun=0; 206 fHeaderSizeEvt=0; 207 fHeaderSizeCrate=0; 204 208 } 205 209 -
trunk/MagicSoft/Mars/msimcamera/MSimCalibrationSignal.cc
r9256 r9272 107 107 } 108 108 109 110 fEvt = 0; 111 fTrigger = 0; 112 113 if (fRunHeader->IsCalibrationRun()) 114 { 115 fEvt = (MPhotonEvent*)pList->FindCreateObj("MPhotonEvent"); 116 if (!fEvt) 117 return kFALSE; 118 } 119 else 120 { 121 fTrigger = (MParameterD*)pList->FindCreateObj("MParameterD", "TriggerPos"); 122 if (!fTrigger) 123 return kFALSE; 124 } 109 fEvt = (MPhotonEvent*)pList->FindCreateObj("MPhotonEvent"); 110 if (!fEvt) 111 return kFALSE; 112 113 fTrigger = (MParameterD*)pList->FindCreateObj("MParameterD", "TriggerPos"); 114 if (!fTrigger) 115 return kFALSE; 125 116 126 117 fStat = (MPhotonStatistics*)pList->FindCreateObj("MPhotonStatistics"); … … 155 146 // ReInit the task-list if this is the first "event from this fake file" 156 147 // 157 Bool_t MSimCalibrationSignal:: ReInit(MParList *plist)158 { 159 if ( plist)148 Bool_t MSimCalibrationSignal::CallReInit() 149 { 150 if (GetNumExecutions()>0) 160 151 return kTRUE; 161 152 162 if (GetNumExecutions()==0) 163 return kTRUE; 164 165 MTask *fTaskList = (MTask*)fParList->FindObject("MTaskList"); 166 if (!fTaskList) 153 MTask *tlist = (MTask*)fParList->FindObject("MTaskList"); 154 if (!tlist) 167 155 { 168 156 *fLog << err << dbginf << "MTaskList not found... abort." << endl; … … 170 158 } 171 159 172 if (!fTaskList->ReInit(fParList)) 173 return kFALSE; 174 175 return kTRUE; 160 return tlist->ReInit(fParList); 176 161 } 177 162 … … 182 167 Int_t MSimCalibrationSignal::Process() 183 168 { 184 if (GetNumExecutions() ==fNumEntries)185 return kFALSE; 186 187 if (! ReInit())169 if (GetNumExecutions()>fNumEntries) 170 return kFALSE; 171 172 if (!CallReInit()) 188 173 return kERROR; 189 174 … … 194 179 { 195 180 // FIXME: Where to get this number from? 196 for (int i=0; i<5 0; i++)181 for (int i=0; i<5; i++) 197 182 { 198 183 MPhotonData &ph = fEvt->Add(cnt++); … … 200 185 const Float_t tm = gRandom->Gaus(0, 1); 201 186 187 ph.SetPrimary(MMcEvtBasic::kArtificial); 202 188 ph.SetTag(idx); 203 189 ph.SetWeight(); -
trunk/MagicSoft/Mars/msimcamera/MSimCalibrationSignal.h
r9256 r9272 34 34 Int_t PreProcess(MParList *pList); 35 35 Int_t Process(); 36 Bool_t ReInit(MParList *plist=0); 36 37 // MSimCalibrationSignal 38 Bool_t CallReInit(); 37 39 38 40 //Int_t ReadRouting(const char *fname, TObjArray &arr); -
trunk/MagicSoft/Mars/msimcamera/MSimRandomPhotons.cc
r9243 r9272 179 179 // Set source to NightSky, time to t and tag to pixel index 180 180 ph.SetPrimary(MMcEvtBasic::kNightSky); 181 ph.SetWeight(); 181 182 ph.SetTime(t); 182 183 ph.SetTag(idx); -
trunk/MagicSoft/Mars/msimcamera/MSimReadout.cc
r9270 r9272 131 131 132 132 fRunHeader->InitPixels(cam->GetNumPixels()); 133 fRunHeader->SetValidMagicNumber(); 134 fRunHeader->SetSourceInfo("MonteCarlo"); // "Muon" from first event?? 133 135 134 136 fData->InitRead(fRunHeader); … … 237 239 fData->SetReadyToSave(); 238 240 241 fRunHeader->SetNumEvents(fRunHeader->GetNumEvents()+1); 242 239 243 return kTRUE; 240 244 } -
trunk/MagicSoft/include-Classes/MMcFormat/MMcEvtBasic.h
r9219 r9272 12 12 enum ParticleId_t 13 13 { 14 kUNDEFINED = -1, 15 kGAMMA = 1, 16 kPOSITRON = 2, 17 kELECTRON = 3, 18 kANTIMUON = 5, 19 kMUON = 6, 20 kPI0 = 7, 21 kNEUTRON = 13, 22 kPROTON = 14, 23 kHELIUM = 402, 24 kOXYGEN = 1608, 25 kIRON = 5626, 26 kNightSky = 9999 14 kUNDEFINED = -1, 15 kGAMMA = 1, 16 kPOSITRON = 2, 17 kELECTRON = 3, 18 kANTIMUON = 5, 19 kMUON = 6, 20 kPI0 = 7, 21 kNEUTRON = 13, 22 kPROTON = 14, 23 kHELIUM = 402, 24 kOXYGEN = 1608, 25 kIRON = 5626, 26 kArtificial = 9998, 27 kNightSky = 9999 27 28 }; 28 29 … … 54 55 switch (id) 55 56 { 56 case kUNDEFINED:return "Undefined"; 57 case kGAMMA: return "Gamma"; 58 case kPOSITRON: return "Positron"; 59 case kELECTRON: return "Electron"; 60 case kANTIMUON: return "Anti-Muon"; 61 case kMUON: return "Muon"; 62 case kPI0: return "Pi-0"; 63 case kNEUTRON: return "Neutron"; 64 case kPROTON: return "Proton"; 65 case kHELIUM: return "Helium"; 66 case kOXYGEN: return "Oxygen"; 67 case kIRON: return "Iron"; 68 case kNightSky: return "NSB"; 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"; 69 71 } 70 72
Note:
See TracChangeset
for help on using the changeset viewer.