Changeset 12719 for fact/tools
- Timestamp:
- 12/12/11 15:24:48 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/rootmacros/example.C
r12718 r12719 9 9 #include <TStyle.h> // in order to set gStyle->SetPallette(1,0); 10 10 #include <TCanvas.h> // well ..we are going to show some plots, right? 11 #include <TTimer.h> // dunno 12 #include <Getline.h> // well ... for Getline() 13 #include <TFile.h> // for root file handling 11 14 #include <TH1F.h> // we will use these Histograms 12 15 … … 30 33 // contains implementation of std FIR filters for vector<float> and 31 34 // a simple sldig average filter, which is not FIR. 32 #include "factfir.h"33 35 #include "factfir.C" 34 36 … … 63 65 TH1F* hWavelet = NULL; // this we use for plotting the Wavelet 64 66 TCanvas *cExample = NULL; 65 // The following two functions were introduced by Werner. 67 TObjArray hList; 68 // The following two functions were introduced by Werner 66 69 // BookHistos() creates histograms and takes care of settings like 67 70 // Binning … … 81 84 int firstpixel = 0, 82 85 int npixel = -1, 83 bool Debug = false,86 bool Debug = true, 84 87 int verbosityLevel = 1, 85 88 bool ProduceGraphic = true 86 89 ) 87 90 { 88 91 bool breakout = false; 89 92 90 93 cout << "I AM NOT YET TESTED ... DO NOT USE ME" << endl; … … 94 97 gROOT->SetStyle("Plain"); // don't know 95 98 96 if ( spikeDebug){97 c Filtered= new TCanvas("cFiltered","filtered DRS Waveforms",410,410,400,400);98 c Filtered->Divide(1, 4);99 if ( Debug ){ 100 cExample = new TCanvas("cFiltered","filtered DRS Waveforms",410,410,400,400); 101 cExample->Divide(1, 4); 99 102 } 100 103 … … 172 175 173 176 if ( Debug ){ 174 hWavelet .GetXaxis()->Set(Wavelet.size() , -0.5 , Wavelet.size()-0.5);177 hWavelet->GetXaxis()->Set(Wavelet.size() , -0.5 , Wavelet.size()-0.5); 175 178 176 179 for ( unsigned int sl = 0; sl < RegionOfInterest; sl++){ 177 hWavelet .SetBinContent(sl, Wavelet[sl]);180 hWavelet->SetBinContent(sl, Wavelet[sl]); 178 181 } 179 182 180 183 cExample->cd(1); 181 184 gPad->SetGrid(); 182 hWavelet .Draw();185 hWavelet->Draw(); 183 186 cExample->Update(); 184 187 … … 218 221 hWavelet->GetYaxis()->SetTitle( "amplitude in mV" ); 219 222 hList.Add(hWavelet); 220 221 hDom = new TH1F("hDom", "test", Wavelet.size(), -0.5, Wavelet.size()-0.5 );222 hDom->GetXaxis()->SetTitle( "time in slices" );223 hDom->GetYaxis()->SetTitle( "amplitude in mV" );224 hList.Add(hDom);225 226 223 } 227 224
Note:
See TracChangeset
for help on using the changeset viewer.