Changeset 12298 for fact/tools/rootmacros/fbsl.C
- Timestamp:
- 10/27/11 16:00:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/rootmacros/fbsl.C
r12206 r12298 36 36 UInt_t data_roi; 37 37 int NEvents; 38 int NBSLeve = 1000; 38 39 39 40 size_t drs_n; … … 157 158 } 158 159 // Book the histograms 159 printf("call BookHistos\n");160 // printf("call BookHistos\n"); 160 161 BookHistos( data_roi ); 161 printf("returned from BookHistos\n");162 // printf("returned from BookHistos\n"); 162 163 // Loop over events 163 164 cout << "--------------------- Data --------------------" << endl; … … 201 202 } 202 203 204 FILE *fp; 205 TString fName; // name of the histogram file 206 /* create the filename for the histogram file */ 207 fName = datafilename; // use the name of the tree file 208 fName.Remove(fName.Length() - 5); // remove the extension .root 209 fName += "_bsl.txt"; // add the new extension 210 211 fp = fopen(fName, "a+"); 212 fprintf( fp, "FILE: %s\n", datafilename ); 213 fprintf( fp, "NEVENTS: %d\n", NEvents); 214 NBSLeve = NEvents; // this has to be changed when computation on a subset of a run is implemented 215 fprintf( fp, "NBSLEVE: %d\n", NBSLeve ); 216 203 217 for (int pix = 0; pix < NPIX; pix++) { 204 218 //printf("Maximum bin pix[%d] %f\n", pix ,hBaseline[pix]->GetMaximumBin() ); … … 206 220 float vmaxprob = hBaseline[pix]->GetXaxis()->GetBinCenter( 207 221 hBaseline[pix]->GetMaximumBin() ); 222 223 fprintf( fp, "%8.3f", vmaxprob ); 224 208 225 hMeanBsl->Fill( vmaxprob ); 209 226 hpltMeanBsl->SetBinContent(pix+1, vmaxprob ); … … 212 229 hpltRmsBsl->SetBinContent( pix+1, hBaseline[pix]->GetRMS() ); 213 230 } 231 232 fclose( fp ); 214 233 215 234 SaveHistograms( datafilename ); … … 361 380 hList.Add( hRmsBsl ); 362 381 363 hpltRmsBsl = new TH1F("hplt_ mean","Value of maximal probability",1440,-0.5,1439.5);382 hpltRmsBsl = new TH1F("hplt_rms","Value of maximal probability",1440,-0.5,1439.5); 364 383 hpltRmsBsl->GetXaxis()->SetTitle( "pixel" ); 365 384 hpltRmsBsl->GetYaxis()->SetTitle( "RMS in mV" );
Note:
See TracChangeset
for help on using the changeset viewer.