Changeset 16863 for trunk/Mars
- Timestamp:
- 06/18/13 03:50:37 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/fact/processing/numevents.C
r16671 r16863 21 21 // create tables in DB 22 22 23 int numevents(TString night="20130418", TString inpath="/daq/analysis/1/", TString table= "AnalysisResultsRunLP", Bool_t dummy=kTRUE, Bool_t pernight=kFALSE )23 int numevents(TString night="20130418", TString inpath="/daq/analysis/1/", TString table= "AnalysisResultsRunLP", Bool_t dummy=kTRUE, Bool_t pernight=kFALSE, Int_t source=0) 24 24 { 25 25 … … 105 105 ganymed_fname=inpath+"/ganymed_run/"+year+"/"+month+"/"+day+"/"+run+"-analysis.root"; 106 106 else 107 ganymed_fname=inpath+"/ganymed_night/"+night2+"-analysis.root"; 108 //cout << "gf => " << ganymed_fname << endl; 107 if (!source) 108 cout << "ERROR - source " << source << " not valid. " << endl; 109 else 110 ganymed_fname=Form("%s/ganymed_night/%d/%s-analysis.root", inpath.Data(), source, night2.Data()); 111 cout << "gf => " << ganymed_fname << endl; 109 112 110 113 if (!pernight) 111 114 { 112 115 star_fname=inpath+"/star/"+year+"/"+month+"/"+day+"/"+run+"_I.root"; 113 //cout << "sf => " << star_fname << endl;116 cout << "sf => " << star_fname << endl; 114 117 115 118 //check star file status … … 142 145 star_tree->Draw("MImagePar.fNumIslands>>IslandHisto","",""); 143 146 TH1F *HistJo = (TH1F*)gDirectory->Get("IslandHisto"); 147 if (!HistJo) 148 { 149 cout << "ERROR - Reading of IslandHisto failed " << HistJo << endl; 150 continue; 151 } 144 152 fNumIslandsMean = HistJo->GetMean(); 145 153 } … … 229 237 230 238 //inserting or updating the information in the database 231 vars = Form("fRunID=%s, fNight=%s,", runid.Data(), night2.Data()); 239 if (!pernight) 240 vars = Form("fRunID=%s, fNight=%s,", runid.Data(), night2.Data()); 241 else 242 vars = Form("fNight=%s, fSourceKey=%d, ", night2.Data(), source); 232 243 vars += Form(" fNumEvtsAfterQualCuts=%d, " 233 244 " fNumEvtsAfterBgCuts=%d, " … … 251 262 252 263 if (pernight) 253 where = Form("fNight=%s ", night2.Data());264 where = Form("fNight=%s AND fSourceKey=%d", night2.Data(), source); 254 265 else 255 266 where = Form("fRunID=%s AND fNight=%s", runid.Data(), night2.Data());
Note:
See TracChangeset
for help on using the changeset viewer.