Changeset 7428 for trunk/MagicSoft/Mars
- Timestamp:
- 11/25/05 11:29:14 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7427 r7428 18 18 19 19 -*-*- END OF LINE -*-*- 20 2005/11/25 Thomas Bretz 21 22 * datacenter/macros/fillsignal.C: 23 - added filling of PulsePos used for seeting the extractor window 24 25 26 20 27 2005/11/25 Daniela Dorner 21 28 -
trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C
r7394 r7428 65 65 #include "MHCamera.h" 66 66 67 #include "MCalibrationPulseTimeCam.h" 68 #include "MCalibrationPix.h" 69 67 70 using namespace std; 68 71 … … 76 79 } 77 80 78 MStatusArray *arr = (MStatusArray*)file.Get("MStatusDisplay"); 79 if (!arr) 81 Float_t meanextpul = -1; 82 Float_t rmsextpul = -1; 83 84 MCalibrationPulseTimeCam *pt; 85 file.GetObject("MCalibrationPulseTimeCam", pt); 86 if (pt) 87 { 88 meanextpul = pt->GetAverageArea(0).GetHiGainMean(); 89 rmsextpul = pt->GetAverageArea(0).GetHiGainRms(); 90 91 meanextpul = TMath::Nint(meanextpul*100)/100.; 92 rmsextpul = TMath::Nint(rmsextpul*100)/100.; 93 } 94 95 MStatusArray arr; 96 if (arr.Read()<=0) 80 97 { 81 98 cout << "ERROR - Reading of MStatusDisplay failed." << endl; … … 83 100 } 84 101 85 MHCamera *cam = (MHCamera*)arr ->FindObjectInCanvas("PedRMS;avg", "MHCamera", "PedRMS");102 MHCamera *cam = (MHCamera*)arr.FindObjectInCanvas("PedRMS;avg", "MHCamera", "PedRMS"); 86 103 if (!cam) 87 104 { … … 90 107 } 91 108 92 MHCamera *pul = (MHCamera*)arr ->FindObjectInCanvas("PulsePos;avg", "MHCamera", "PulsePos");109 MHCamera *pul = (MHCamera*)arr.FindObjectInCanvas("PulsePos;avg", "MHCamera", "PulsePos"); 93 110 if (!pul) 94 111 { … … 119 136 meanrmso = TMath::Nint(meanrmso*100)/100.; 120 137 121 cam = (MHCamera*)arr ->FindObjectInCanvas("Interp'd;avg", "MHCamera", "Interp'd");138 cam = (MHCamera*)arr.FindObjectInCanvas("Interp'd;avg", "MHCamera", "Interp'd"); 122 139 if (!cam) 123 140 { … … 163 180 164 181 Int_t seq = atoi(sequence.Data()+6); 165 TString meanrmsinner=Form("%6.2f", meanrmsi); 166 TString meanrmsouter=Form("%6.2f", meanrmso); 167 TString meansiginner=Form("%6.2f", meansigi); 168 TString meansigouter=Form("%6.2f", meansigo); 169 TString meanpulpos =Form("%6.2f", meanpul); 170 TString rmspulpos =Form("%6.2f", rmspul); 182 TString meanrmsinner =Form("%6.2f", meanrmsi); 183 TString meanrmsouter =Form("%6.2f", meanrmso); 184 TString meansiginner =Form("%6.2f", meansigi); 185 TString meansigouter =Form("%6.2f", meansigo); 186 TString meanpulpos =Form("%6.2f", meanpul); 187 TString rmspulpos =Form("%6.2f", rmspul); 188 TString meanextpulpos=Form("%6.2f", meanextpul); 189 TString rmsextpulpos =Form("%6.2f", rmsextpul); 190 191 if (meanextpul<0 && rmsextpul<0) 192 { 193 meanextpulpos = "NULL"; 194 rmsextpulpos = "NULL"; 195 } 171 196 172 197 cout << "Sequence #" << seq << endl; … … 175 200 cout << " Mean Signal inner [phe] " << meansiginner << endl; 176 201 cout << " Mean Signal outer [phe] " << meansigouter << endl; 177 cout << " Mean PulsePos " << meanpulpos << endl; 178 cout << " Rms PulsePos " << rmspulpos << endl; 202 cout << " Mean calibrated PulsePos " << meanpulpos << endl; 203 cout << " Rms calibrated PulsePos " << rmspulpos << endl; 204 cout << " Mean extracted PulsePos " << meanextpulpos << endl; 205 cout << " Rms extracted PulsePos " << rmsextpulpos << endl; 179 206 180 207 TString query = Form("UPDATE Calibration SET " 181 " fMeanPedRmsInner=%s, fMeanPedRmsOuter=%s, " 182 " fMeanSignalInner=%s, fMeanSignalOuter=%s, " 183 " fPulsePosMean=%s, fPulsePosRms=%s " 208 " fMeanPedRmsInner=%s, fMeanPedRmsOuter=%s, " 209 " fMeanSignalInner=%s, fMeanSignalOuter=%s, " 210 " fPulsePosMean=%s, fPulsePosRms=%s, " 211 " fPulsePosCheckMean=%s, fPulsePosCheckRms=%s " 184 212 " WHERE fSequenceFirst='%d' ", 185 meanrmsinner.Data(), meanrmsouter.Data(), 186 meansiginner.Data(), meansigouter.Data(), 187 meanpulpos.Data(), rmspulpos.Data(), 213 meanrmsinner.Data(), meanrmsouter.Data(), 214 meansiginner.Data(), meansigouter.Data(), 215 meanpulpos.Data(), rmspulpos.Data(), 216 meanextpulpos.Data(), rmsextpulpos.Data(), 188 217 seq); 189 218
Note:
See TracChangeset
for help on using the changeset viewer.