Changeset 7833 for trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C
- Timestamp:
- 08/02/06 10:33:31 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C
r7777 r7833 118 118 } 119 119 120 MHCamera *difflo = (MHCamera*)arr.FindObjectInCanvas("DiffLo;avg", "MHCamera", "DiffLo"); 121 if (!difflo) 122 { 123 cout << "WARNING - Reading of DiffLo;avg failed." << endl; 124 return 2; 125 } 126 MHCamera *diffhi = (MHCamera*)arr.FindObjectInCanvas("DiffHi;avg", "MHCamera", "DiffHi"); 127 if (!diffhi) 128 { 129 cout << "WARNING - Reading of DiffHi;avg failed." << endl; 130 return 2; 131 } 132 133 MHCamera *pulhi = (MHCamera*)arr.FindObjectInCanvas("PulseHi;avg", "TH1D", "PulseHi"); 134 if (!pulhi) 135 { 136 cout << "WARNING - Reading of PulseHi failed." << endl; 137 return 2; 138 } 139 MHCamera *pullo = (MHCamera*)arr.FindObjectInCanvas("PulseLo;avg", "TH1D", "PulseLo"); 140 if (!pullo) 141 { 142 cout << "WARNING - Reading of PulseLo failed." << endl; 143 return 2; 144 } 145 120 146 TArrayI inner(1); 121 147 inner[0] = 0; … … 173 199 174 200 meanpul = TMath::Nint(meanpul*100)/100.; 175 rmspul = TMath::Nint(rmspul*100)/100.; 201 rmspul = TMath::Nint(rmspul *100)/100.; 202 203 204 Double_t meanhi = TMath::Nint(pulhi->GetMean()*100.)/100.; 205 Double_t rmshi = TMath::Nint(pulhi->GetRMS() *100.)/100.; 206 207 Double_t meanlo = TMath::Nint(pullo->GetMean()*100.)/100.; 208 Double_t rmslo = TMath::Nint(pullo->GetRMS() *100.)/100.; 209 210 pullo->Add(pullo, pulhi, 1, -1); 211 pullo->ResetBit(MHCamera::kProfile); 212 213 Double_t meanoff = TMath::Nint(pullo->GetMean()*100.)/100.; 214 Double_t rmsoff = TMath::Nint(pullo->GetRMS() *100.)/100.; 176 215 177 216 //get sequence number from the filename … … 194 233 TString rmsextpulpos =Form("%6.2f", rmsextpul); 195 234 235 TString meanpulhi =Form("%6.2f", meanhi); 236 TString rmspulhi =Form("%6.2f", rmshi); 237 238 TString meanpullo =Form("%6.2f", meanlo); 239 TString rmspullo =Form("%6.2f", rmslo); 240 241 TString meanpuloff =Form("%6.2f", meanoff); 242 TString rmspuloff =Form("%6.2f", rmsoff); 243 196 244 if (meanextpul<0 && rmsextpul<0) 197 245 { … … 200 248 } 201 249 250 // ***************************************************** 251 252 // ***************************************************** 253 254 202 255 cout << "Sequence #" << seq << endl; 203 cout << " Mean Ped RMS inner [phe] " << meanrmsinner << endl; 204 cout << " Mean Ped RMS outer [phe] " << meanrmsouter << endl; 205 cout << " Mean Signal inner [phe] " << meansiginner << endl; 206 cout << " Mean Signal outer [phe] " << meansigouter << endl; 207 cout << " Mean calibrated PulsePos " << meanpulpos << endl; 208 cout << " Rms calibrated PulsePos " << rmspulpos << endl; 209 cout << " Mean extracted PulsePos " << meanextpulpos << endl; 210 cout << " Rms extracted PulsePos " << rmsextpulpos << endl; 256 cout << " Mean Ped RMS inner [phe] " << meanrmsinner << endl; 257 cout << " Mean Ped RMS outer [phe] " << meanrmsouter << endl; 258 cout << " Mean Signal inner [phe] " << meansiginner << endl; 259 cout << " Mean Signal outer [phe] " << meansigouter << endl; 260 cout << " Mean calibrated PulsePos " << meanpulpos << " +- " << rmspulpos << endl; 261 cout << " Mean extracted PulsePos " << meanextpulpos << " +- " << rmsextpulpos << endl; 262 cout << " Mean ext.HiGain PulsePos " << meanpulhi << " +- " << rmspulhi << endl; 263 cout << " Mean ext.LoGain PulsePos " << meanpullo << " +- " << rmspullo << endl; 264 cout << " Lo-Hi gain offset: " << meannpuloff << " +- " << rmspuloff << endl; 265 cout << endl; 211 266 212 267 //build query and insert information into the database … … 219 274 " fPulsePosMean=%s, fPulsePosRms=%s, " 220 275 " fPulsePosCheckMean=%s, fPulsePosCheckRms=%s " 276 " fPulsePosHiMean=%s, fPulsePosHiRms=%s, " 277 " fPulsePosLoMean=%s, fPulsePosLoRms=%s, " 278 " fPulsePosOffMean=%s, fPulsePosOffRms=%s, " 221 279 " WHERE fSequenceFirst='%d' ", 222 280 meanrmsinner.Data(), meanrmsouter.Data(), … … 224 282 meanpulpos.Data(), rmspulpos.Data(), 225 283 meanextpulpos.Data(), rmsextpulpos.Data(), 284 meanpulhi.Data(), rmspulhi.Data(), 285 meanpullo.Data(), rmspullo.Data(), 286 meanpuloff.Data(), rmspuloff.Data(), 226 287 seq); 227 288
Note:
See TracChangeset
for help on using the changeset viewer.