Changeset 7118
- Timestamp:
- 05/31/05 19:10:11 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7117 r7118 21 21 22 22 -*-*- END OF LINE -*-*- 23 2005/05/31 Daniela Dorner 24 25 * datacenter/macros/fillstar.C: 26 - added two new parameters 27 28 * datacenter/macros/setupdb.C: 29 - adapted to changes in DB (added two columns) 30 31 32 23 33 2005/05/31 Thomas Bretz 24 34 -
trunk/MagicSoft/Mars/datacenter/macros/fillstar.C
r7112 r7118 45 45 46 46 #include <TH1.h> 47 #include <TGraph.h> 47 48 #include <TProfile.h> 48 49 #include <TFile.h> … … 149 150 if (!h) 150 151 { 151 cout << "WARNING - Reading of EffOnT imefailed." << endl;152 return kFALSE;152 cout << "WARNING - Reading of EffOnTheta failed." << endl; 153 return 0; 153 154 } 154 155 155 156 Float_t effon = h->Integral(); 156 Float_t rate = num/effon;157 rate = TMath::Nint(rate*100)/100.;158 TString muonrate = Form("%6.2f", rate);157 Float_t mrate = num/effon; 158 mrate = TMath::Nint(mrate*100)/100.; 159 TString muonrate = Form("%6.2f", mrate); 159 160 Int_t effontime = TMath::Nint(effon); 161 162 h = (TH1*)arr.FindObjectInCanvas("ProjDeltaT", "TH1D", "EffOnTime"); 163 if (!h) 164 { 165 cout << "WARNING - Reading of ProjDeltaT failed." << endl; 166 return 0; 167 } 168 169 Int_t numevents = (int)h->GetEntries(); 170 Int_t datarate = (int)(numevents/effon); 171 172 TGraph *g = (TGraph*)arr.FindObjectInCanvas("Humidity", "TGraph", "MHWeather"); 173 if (!g) 174 { 175 cout << "WARNING - Reading of Humidity failed." << endl; 176 return 0; 177 } 178 179 Double_t max = TMath::MaxElement(g->GetN(), g->GetY()); 180 TString maxhum = Form("%6.1f", max); 181 160 182 161 183 TString sequence = fname(TRegexp("star[0-9]+[.]root$")); … … 169 191 170 192 cout << "Sequence #" << seq << endl; 171 cout << " PSF [mm] " << PSF << endl; 172 cout << " Island Quality " << islands << endl; 173 cout << " Ratio [%] " << ratio << endl; 174 cout << " Muon Number " << num << endl; 175 cout << " EffOnTime [s] " << effontime << endl; 176 cout << " Muon Rate [Hz] " << muonrate << endl; 193 cout << " PSF [mm] " << PSF << endl; 194 cout << " Island Quality " << islands << endl; 195 cout << " Ratio [%] " << ratio << endl; 196 cout << " Muon Number " << num << endl; 197 cout << " EffOnTime [s] " << effontime << endl; 198 cout << " Muon Rate [Hz] " << muonrate << endl; 199 cout << " # of Events " << numevents << endl; 200 cout << " Rate after ImgCl [Hz] " << datarate << endl; 201 cout << " Maximum Humidity [%] " << maxhum << endl; 177 202 178 203 TString query; … … 186 211 " fEffOnTime=%d, " 187 212 " fMuonRate=%s, " 188 " fPSF=%s ", 213 " fPSF=%s, " 214 " fDataRate=%d, " 215 " fMaxHumidity=%s ", 189 216 seq, islands.Data(), ratio.Data(), 190 217 num, effontime, 191 muonrate.Data(), PSF.Data()); 218 muonrate.Data(), PSF.Data(), 219 datarate, maxhum.Data()); 192 220 } 193 221 else … … 199 227 " fEffOnTime=%d, " 200 228 " fMuonRate=%s, " 201 " fPSF=%s " 229 " fPSF=%s, " 230 " fDataRate=%d, " 231 " fMaxHumidity=%s " 202 232 " WHERE fSequenceFirst=%d ", 203 233 islands.Data(), ratio.Data(), 204 234 num, effontime, 205 muonrate.Data(), PSF.Data(), seq); 235 muonrate.Data(), PSF.Data(), 236 datarate, maxhum.Data(), seq); 206 237 } 207 238 -
trunk/MagicSoft/Mars/datacenter/macros/setupdb.C
r7089 r7118 532 532 " fRatio FLOAT(5,1) NOT NULL," 533 533 " fMuonRate FLOAT(6,2) NOT NULL," 534 " fMuonNumber INT UNSIGNED NOT NULL" 535 " fEffOnTime INT UNSIGNED NOT NULL" 534 " fMuonNumber INT UNSIGNED NOT NULL," 535 " fEffOnTime INT UNSIGNED NOT NULL," 536 " fDataRate INT UNSIGNED NOT NULL," 537 " fMaxHumidity FLOAT(6,1) NOT NULL," 536 538 " fLastUpdate TIMESTAMP" 537 539 ")")); … … 558 560 " fCCFilled DATETIME NULL," 559 561 " fExclusionsDone DATETIME NULL," 560 " fSequenceEntriesBuilt DATETIME NULL ,"562 " fSequenceEntriesBuilt DATETIME NULL" 561 563 ")"; 562 564
Note:
See TracChangeset
for help on using the changeset viewer.