Changeset 13500
- Timestamp:
- 05/01/12 15:34:55 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/rootmacros/PulseTemplates/pixel.C
r13493 r13500 26 26 int bSLMean, 27 27 int gainMean, 28 TString options28 TString options 29 29 ) 30 30 { … … 38 38 mGainMean = gainMean; 39 39 40 // hMaxOverlay = (TH2F*) calloc(mMaxPulseOrder, sizeof(TH2F*)); 41 hMaxOverlay = new TH2F*[mMaxPulseOrder]; 42 // hEdgeOverlay = (TH2F*) calloc(mMaxPulseOrder, sizeof(TH2F*)); 40 hMaxOverlay = new TH2F*[mMaxPulseOrder]; 43 41 hEdgeOverlay = new TH2F*[mMaxPulseOrder]; 44 // hMaxProfile = (TProfile*) calloc(mMaxPulseOrder, sizeof(TProfile)); 45 hMaxProfile = new TProfile*[mMaxPulseOrder]; 46 // hEdgeProfile = (TProfile*) calloc(mMaxPulseOrder, sizeof(TProfile)); 42 hMaxProfile = new TProfile*[mMaxPulseOrder]; 47 43 hEdgeProfile = new TProfile*[mMaxPulseOrder]; 48 if (mOptions == "S") 49 {50 // hSlopeRisingEdge= (TH1F*) calloc(mMaxPulseOrder, sizeof(TH1F)); 44 45 if (mOptions.Contains("S") ) 46 { 51 47 hSlopeRisingEdge = new TH1F*[mMaxPulseOrder]; 52 48 } 53 if (mOptions == "R") 54 {55 // hRisingEdgeToMax= (TH1F*) calloc(mMaxPulseOrder, sizeof(TH1F)); 49 50 if (mOptions.Contains("R") ) 51 { 56 52 hRisingEdgeToMax = new TH1F*[mMaxPulseOrder]; 57 53 } 58 if (mOptions == "P") 59 {60 // hPosOfMax = (TH1F*) calloc(mMaxPulseOrder, sizeof(TH1F)); 54 55 if (mOptions.Contains("P") ) 56 { 61 57 hPosOfMax = new TH1F*[mMaxPulseOrder]; 62 58 } … … 96 92 TString histo_name; 97 93 98 for (int order =0; order > mMaxPulseOrder; order++) 99 { 100 histo_name = "hMaxOverlay"; 101 histo_name += order; 94 for (int order = 0; order < mMaxPulseOrder; order++) 95 { 96 histo_name = "hMaxOverlay"; 97 histo_name += mChid; 98 histo_name += "_"; 99 histo_name += order; 100 if (mVerbosityLevel > 3) cout << "\t...booking " << histo_name << endl; 102 101 hMaxOverlay[order]=new TH2F( 103 102 histo_name, … … 118 117 ); 119 118 */ 120 if (mVerbosityLevel > 3) cout << "...booking " << histo_name << endl;121 119 hMaxOverlay[order]->SetAxisRange( 122 120 mBSLMean - 5, … … 127 125 //hMaxProfile->SetBit(TH2F::kCanRebin); 128 126 hList->Add( hMaxOverlay[order] ); 129 }130 131 for (int order = 0; order < mMaxPulseOrder; order ++)132 {133 127 134 128 //------------------------------------------------------------------------ … … 141 135 ); 142 136 */ 143 histo_name = "hEdgeOverlay"; 144 histo_name += order; 145 if (mVerbosityLevel > 3) cout << "...booking " << histo_name << endl; 137 histo_name = "hEdgeOverlay"; 138 histo_name += mChid; 139 histo_name += "_"; 140 histo_name += order; 141 if (mVerbosityLevel > 3) cout << "\t...booking " << histo_name << endl; 146 142 hEdgeOverlay[order] = new TH2F( 147 143 histo_name, … … 172 168 ); 173 169 */ 174 histo_name = "hMaxProfile"; 175 histo_name += order; 176 if (mVerbosityLevel > 3) cout << "...booking " << histo_name << endl; 170 histo_name = "hMaxProfile"; 171 histo_name += mChid; 172 histo_name += "_"; 173 histo_name += order; 174 if (mVerbosityLevel > 3) cout << "\t...booking " << histo_name << endl; 177 175 hMaxProfile[order] = new TProfile( 178 176 histo_name, … … 205 203 */ 206 204 histo_name = "hEdgeProfile"; 205 histo_name += mChid; 206 histo_name += "_"; 207 207 histo_name += order; 208 if (mVerbosityLevel > 3) cout << " ...booking " << histo_name << endl;208 if (mVerbosityLevel > 3) cout << "\t...booking " << histo_name << endl; 209 209 hEdgeProfile[order] = new TProfile( 210 210 histo_name, … … 260 260 Pixel::BookDistributionHistos( ) 261 261 { 262 if (mOptions != "") 263 { 262 if (!mOptions.IsNull() ) 263 { 264 cout << endl << "#" ; 264 265 TString histo_name; 265 for (int order =0; order >mMaxPulseOrder; order++)266 for (int order =0; order < mMaxPulseOrder; order++) 266 267 { 268 cout << endl << "##" ; 267 269 if (mVerbosityLevel > 2) cout << endl 268 270 << "...book distribution histograms" … … 271 273 if (mOptions.Contains("S")) 272 274 { 273 histo_name = "hSlopeRisingEdge"; 274 histo_name += order; 275 histo_name = "hSlopeRisingEdge"; 276 histo_name += mChid; 277 histo_name += "_"; 278 histo_name += order; 279 if (mVerbosityLevel > 3) cout << "\t...booking " << histo_name << endl; 275 280 hSlopeRisingEdge[order] = new TH1F ( 276 281 histo_name, … … 287 292 if (mOptions.Contains("R")) 288 293 { 289 histo_name = "hRisingEdgeToMax"; 290 histo_name += order; 294 histo_name = "hRisingEdgeToMax"; 295 histo_name += mChid; 296 histo_name += "_"; 297 histo_name += order; 298 if (mVerbosityLevel > 3) cout << "\t...booking " << histo_name << endl; 291 299 hRisingEdgeToMax[order] = new TH1F ( 292 300 histo_name, … … 303 311 if (mOptions.Contains("P")) 304 312 { 305 histo_name = "hPosOfMax"; 306 histo_name += order; 313 histo_name = "hPosOfMax"; 314 histo_name += mChid; 315 histo_name += "_"; 316 histo_name += order; 317 if (mVerbosityLevel > 3) cout << "\t...booking " << histo_name << endl; 307 318 hPosOfMax[order] = new TH1F ( 308 319 histo_name, … … 319 330 if (mVerbosityLevel > 2) cout << "...done" << endl; 320 331 } 332 cout << endl << "###" ; 321 333 } 322 334 } … … 364 376 Pixel::DeletePixelHistos() 365 377 { 366 if (mVerbosityLevel > 2) cout << endl << " ...delete current overlay histograms" ;378 if (mVerbosityLevel > 2) cout << endl << "\t...delete current overlay histograms" ; 367 379 368 380 for (int order = 0; … … 370 382 order ++) 371 383 { 372 if (mVerbosityLevel > 3) cout << endl << " ...deleting hMaxOverlay";384 if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hMaxOverlay"; 373 385 delete hMaxOverlay[order]; 374 386 375 if (mVerbosityLevel > 3) cout << endl << " ...deleting hEdgeOverlay";387 if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hEdgeOverlay"; 376 388 delete hEdgeOverlay[order]; 377 389 378 if (mVerbosityLevel > 3) cout << endl << " ...deleting hMaxProfile";390 if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hMaxProfile"; 379 391 delete hMaxProfile[order]; 380 392 381 if (mVerbosityLevel > 3) cout << endl << " ...deleting hMaxProfile2";393 if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hMaxProfile2"; 382 394 delete hEdgeProfile[order]; 383 395 } 384 if (mVerbosityLevel > 3) cout << endl << " ...deleting histogram Arrays";396 if (mVerbosityLevel > 3) cout << endl << "\t...deleting histogram Arrays"; 385 397 delete[] hMaxOverlay; 386 398 hMaxOverlay = NULL; … … 401 413 Pixel::DeleteDistributionHistos() 402 414 { 403 if (mVerbosityLevel > 2) cout << endl << "...delete current distribution histograms" ; 415 if (mVerbosityLevel > 2) cout << endl 416 << "\t...delete current distribution histograms" ; 404 417 405 418 for (int order = 0; … … 407 420 order ++) 408 421 { 409 if (mVerbosityLevel > 3) cout << endl << "...deleting hMaxOverlay"; 410 delete hSlopeRisingEdge[order]; 411 412 if (mVerbosityLevel > 3) cout << endl << "...deleting hEdgeOverlay"; 413 delete hRisingEdgeToMax[order]; 414 415 if (mVerbosityLevel > 3) cout << endl << "...deleting hMaxProfile"; 416 delete hPosOfMax[order]; 417 418 } 419 if (mVerbosityLevel > 3) cout << endl << "...deleting histogram Arrays"; 420 421 422 delete[] hSlopeRisingEdge; 423 hSlopeRisingEdge = NULL; 424 425 delete[] hRisingEdgeToMax; 426 hRisingEdgeToMax = NULL; 427 428 delete[] hPosOfMax; 429 hPosOfMax = NULL; 422 if (mOptions.Contains("S")) 423 { 424 if (mVerbosityLevel > 3) cout << endl 425 << "\t\t...deleting hSlopeRisingEdge" 426 << mChid << "_" << order ; 427 delete hSlopeRisingEdge[order]; 428 } 429 430 if (mOptions.Contains("R")) 431 { 432 if (mVerbosityLevel > 3) cout << endl 433 << "\t\t...deleting hRisingEdgeToMax" 434 << mChid << "_" << order ; 435 // delete hRisingEdgeToMax[order]; 436 } 437 438 if (mOptions.Contains("P")) 439 { 440 if (mVerbosityLevel > 3) cout << endl 441 << "\t\t...deleting hPosOfMax" 442 << mChid << "_" << order ; 443 444 // delete hPosOfMax[order]; 445 } 446 447 } 448 if (mVerbosityLevel > 3) cout << endl << "\t...deleting histogram Arrays"; 449 450 if (mOptions.Contains("S")) 451 { 452 if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hSlopeRisingEdge"; 453 // delete[] hSlopeRisingEdge; 454 hSlopeRisingEdge = NULL; 455 } 456 457 if (mOptions.Contains("R")) 458 { 459 if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hRisingEdgeToMax"; 460 // delete[] hRisingEdgeToMax; 461 hRisingEdgeToMax = NULL; 462 } 463 464 if (mOptions.Contains("P")) 465 { 466 if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hPosOfMax"; 467 // delete[] hPosOfMax; 468 hPosOfMax = NULL; 469 } 430 470 } 431 471 // end of DeletePixelHistos
Note:
See TracChangeset
for help on using the changeset viewer.