Changeset 8477 for trunk/MagicSoft/Mars/datacenter/macros
- Timestamp:
- 05/08/07 14:34:24 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C
r8475 r8477 57 57 ///////////////////////////////////////////////////////////////////////////// 58 58 #include <iostream> 59 #include <iomanip> 59 60 60 61 #include <TEnv.h> … … 73 74 74 75 using namespace std; 76 77 Int_t CalcUnsuitable(const MHCamera &cam, Float_t f) 78 { 79 Int_t n = 0; 80 for (int i=0; i<cam.GetNbinsX(); i++) 81 if (cam.GetBinContent(i+1)>f) 82 n++; 83 84 return n; 85 } 75 86 76 87 int Process(MSQLServer &serv, TString fname, Bool_t dummy) … … 238 249 meanpul = TMath::Nint(meanpul*100)/100.; 239 250 rmspul = TMath::Nint(rmspul *100)/100.; 251 252 cam = (MHCamera*)arr.FindObjectInCanvas("Unsuitable;avg", "MHCamera", "Unsuitable"); 253 if (!cam) 254 { 255 cout << "WARNING - Reading of Unsuitable;avg failed." << endl; 256 return 2; 257 } 258 259 Int_t unsuitable50 = CalcUnsuitable(*cam, 0.50); 260 Int_t unsuitable01 = CalcUnsuitable(*cam, 0.01); 240 261 241 262 /* … … 293 314 cout << " Lo-Hi gain offset: " << medpuloff << " +- " << devpuloff << endl; 294 315 cout << " Hi/Lo gain ratio: " << medhilocal << " +- " << devhilocal << endl; 316 cout << " Unsuitable > 50%: " << setw(6) << unsuitable50 << endl; 317 cout << " Unsuitable > 1%: " << setw(6) << unsuitable01 << endl; 295 318 cout << endl; 296 319 … … 307 330 //" fPulsePosLoMean=%s, fPulsePosLoRms=%s, " 308 331 " fPulsePosOffMed=%s, fPulsePosOffDev=%s, " 309 " fHiLoGainRatioMed=%s, fHiLoGainRatioDev=%s " 332 " fHiLoGainRatioMed=%s, fHiLoGainRatioDev=%s, " 333 " fUnsuitable50=%d, fUnsuitable01=%d " 310 334 " WHERE fSequenceFirst='%d' ", 311 335 meanrmsinner.Data(), meanrmsouter.Data(), … … 317 341 medpuloff.Data(), devpuloff.Data(), 318 342 medhilocal.Data(), devhilocal.Data(), 343 unsuitable50, unsuitable01, 319 344 seq); 320 345
Note:
See TracChangeset
for help on using the changeset viewer.