Changeset 7394 for trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C
- Timestamp:
- 11/11/05 16:33:22 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C
r7363 r7394 90 90 } 91 91 92 MHCamera *pul = (MHCamera*)arr->FindObjectInCanvas("PulsePos;avg", "MHCamera", "PulsePos"); 93 if (!pul) 94 { 95 cout << "WARNING - Reading of PulsePos;avg failed." << endl; 96 return 0; 97 } 98 92 99 TArrayI inner(1); 93 100 inner[0] = 0; … … 132 139 meansigi = TMath::Nint(meansigi*100)/100.; 133 140 meansigo = TMath::Nint(meansigo*100)/100.; 141 142 Stat_t meanpul = pul->GetMean(); 143 Stat_t rmspul = pul->GetRMS(); 144 145 if (meanpul<0 || rmspul<0) 146 { 147 cout << "WARNING - PulsePos'd mean or rms < 0 " << endl; 148 cout << "PulsePos'd mean " << meanpul << endl; 149 cout << "PulsePos'd rms " << rmspul << endl; 150 return 0; 151 } 152 153 meanpul = TMath::Nint(meanpul*100)/100.; 154 rmspul = TMath::Nint(rmspul*100)/100.; 134 155 135 156 TString sequence = fname(TRegexp("signal[0-9]+[.]root$")); … … 146 167 TString meansiginner=Form("%6.2f", meansigi); 147 168 TString meansigouter=Form("%6.2f", meansigo); 169 TString meanpulpos =Form("%6.2f", meanpul); 170 TString rmspulpos =Form("%6.2f", rmspul); 148 171 149 172 cout << "Sequence #" << seq << endl; … … 152 175 cout << " Mean Signal inner [phe] " << meansiginner << endl; 153 176 cout << " Mean Signal outer [phe] " << meansigouter << endl; 177 cout << " Mean PulsePos " << meanpulpos << endl; 178 cout << " Rms PulsePos " << rmspulpos << endl; 154 179 155 180 TString query = Form("UPDATE Calibration SET " 156 181 " fMeanPedRmsInner=%s, fMeanPedRmsOuter=%s, " 157 " fMeanSignalInner=%s, fMeanSignalOuter=%s " 182 " fMeanSignalInner=%s, fMeanSignalOuter=%s, " 183 " fPulsePosMean=%s, fPulsePosRms=%s " 158 184 " WHERE fSequenceFirst='%d' ", 159 185 meanrmsinner.Data(), meanrmsouter.Data(), 160 186 meansiginner.Data(), meansigouter.Data(), 187 meanpulpos.Data(), rmspulpos.Data(), 161 188 seq); 162 189
Note:
See TracChangeset
for help on using the changeset viewer.