Ignore:
Timestamp:
10/27/11 17:10:47 (13 years ago)
Author:
kraehenb
Message:
Save spectra of gainanalysis to the file gainspectra.root.
Location:
fact/tools/rootmacros
Files:
2 edited

Legend:

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

    r12299 r12303  
    66#include <TF1.h>
    77#include <TGraph.h>
     8#include <TFile.h>
    89
    910#include <stdint.h>
     
    2930
    3031        gROOT->SetStyle("Plain");
    31        
     32        TFile outfile("gainspectra.root","RECREATE");   
    3233//-------------------------------------------
    3334//Define the data variables
     
    8081                std::sprintf(title_spect,"Spectrum of Px %i (data: %s, DRS: %s)",i,name,drsname);
    8182                std::sprintf(name_spect,"spect%i",i);
    82                 spectrum[i] = new TH1F(name_spect,title_spect,300,0,600);
     83                spectrum[i] = new TH1F(name_spect,title_spect,350,-100,600);
    8384                spectrum[i]->GetXaxis()->SetTitle("Pulse size (a.u.)");
    8485                spectrum[i]->GetYaxis()->SetTitle("Counts");
     
    281282                std::cin >> plotspect_nr;
    282283        }
    283        
     284        outfile.Write();
     285        outfile.Close();
    284286        return 0;
    285287}
  • fact/tools/rootmacros/peakfinderscope.C

    r12204 r12303  
    99#include <cstdio>
    1010
     11#define HAVE_ZLIB
    1112#include "fits.h"
    1213#include "FOpenDataFile.c"
Note: See TracChangeset for help on using the changeset viewer.