Changeset 12719


Ignore:
Timestamp:
12/12/11 15:24:48 (13 years ago)
Author:
neise
Message:
at least it compiles
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/rootmacros/example.C

    r12718 r12719  
    99#include <TStyle.h>     // in order to set gStyle->SetPallette(1,0);
    1010#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
    1114#include <TH1F.h>       // we will use these Histograms
    1215
     
    3033// contains implementation of std FIR filters for vector<float> and
    3134// a simple sldig average filter, which is not FIR.
    32 #include "factfir.h"
    3335#include "factfir.C"
    3436
     
    6365TH1F* hWavelet = NULL;              // this we use for plotting the Wavelet
    6466TCanvas *cExample = NULL;
    65 // The following two functions were introduced by Werner.
     67TObjArray hList;
     68// The following two functions were introduced by Werner
    6669// BookHistos() creates histograms and takes care of settings like
    6770// Binning
     
    8184    int firstpixel                  = 0,
    8285    int npixel                      = -1,
    83     bool Debug                      = false,
     86    bool Debug                      = true,
    8487    int verbosityLevel              = 1,
    8588    bool ProduceGraphic             = true
    8689        )
    8790{
    88 
     91bool breakout = false;
    8992
    9093cout << "I AM NOT YET TESTED ... DO NOT USE ME" << endl;
     
    9497gROOT->SetStyle("Plain");   // don't know
    9598
    96     if (spikeDebug){
    97         cFiltered = new TCanvas("cFiltered","filtered DRS Waveforms",410,410,400,400);
    98         cFiltered->Divide(1, 4);
     99    if ( Debug ){
     100        cExample = new TCanvas("cFiltered","filtered DRS Waveforms",410,410,400,400);
     101        cExample->Divide(1, 4);
    99102    }
    100103
     
    172175
    173176            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);
    175178
    176179                for ( unsigned int sl = 0; sl < RegionOfInterest; sl++){
    177                     hWavelet.SetBinContent(sl, Wavelet[sl]);
     180                    hWavelet->SetBinContent(sl, Wavelet[sl]);
    178181                }
    179182
    180183                cExample->cd(1);
    181184                gPad->SetGrid();
    182                 hWavelet.Draw();
     185                hWavelet->Draw();
    183186                cExample->Update();
    184187
     
    218221    hWavelet->GetYaxis()->SetTitle( "amplitude in mV" );
    219222    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 
    226223}
    227224
Note: See TracChangeset for help on using the changeset viewer.