I hope this what you’ve asked for.
I hung ntuple->printf() at the end of the file and I got this in the command line:
[code]******************************************************************************
*Tree :Datensatz : title *
*Entries : 242622 : Total = 18509203 bytes File Size = 3210123 *
*Br 0 :event_number/i : *
*Entries : 242622 : Total Size= 974340 bytes File Size = 272669 *
*Baskets : 30 : Basket Size= 32000 bytes Compression= 3.52 *
…
*Br 1 :ch00_12bit : *
*Entries : 242622 : Total Size= 974200 bytes File Size = 530177 *
*Baskets : 30 : Basket Size= 32000 bytes Compression= 1.81 *
…
*Br 2 :ch00_15bit : *
*Entries : 242622 : Total Size= 974200 bytes File Size = 8280 *
*Baskets : 30 : Basket Size= 32000 bytes Compression= 115.93 *
…
*Br 3 :ch01_12bit : *
*Entries : 242622 : Total Size= 974200 bytes File Size = 521249 *
*Baskets : 30 : Basket Size= 32000 bytes Compression= 1.84 *
…
*Br 4 :ch01_15bit : *
*Entries : 242622 : Total Size= 974200 bytes File Size = 8280 *
*Baskets : 30 : Basket Size= 32000 bytes Compression= 115.93 *
…
*Br 5 :ch02_12bit : *
*Entries : 242622 : Total Size= 974200 bytes File Size = 537924 *
*Baskets : 30 : Basket Size= 32000 bytes Compression= 1.78 *
…
*Br 6 :ch02_15bit : *
*Entries : 242622 : Total Size= 974200 bytes File Size = 8280 *
*Baskets : 30 : Basket Size= 32000 bytes Compression= 115.93 *
…
*Br 7 :ch03_12bit : *
*Entries : 242622 : Total Size= 974200 bytes File Size = 545689 *
*Baskets : 30 : Basket Size= 32000 bytes Compression= 1.76 *
…
*Br 8 :ch03_15bit : *
*Entries : 242622 : Total Size= 974200 bytes File Size = 8280 *
*Baskets : 30 : Basket Size= 32000 bytes Compression= 115.93 *
…
*Br 9 :ch04_12bit : *
*Entries : 242622 : Total Size= 974200 bytes File Size = 184214 *
*Baskets : 30 : Basket Size= 32000 bytes Compression= 5.21 *
…
*Br 10 :ch04_15bit : *
*Entries : 242622 : Total Size= 974200 bytes File Size = 8280 *
*Baskets : 30 : Basket Size= 32000 bytes Compression= 115.93 *
…
*Br 11 :ch05_12bit : *
*Entries : 242622 : Total Size= 974200 bytes File Size = 171977 *
*Baskets : 30 : Basket Size= 32000 bytes Compression= 5.58 *
…
*Br 12 :ch05_15bit : *
*Entries : 242622 : Total Size= 974200 bytes File Size = 8280 *
*Baskets : 30 : Basket Size= 32000 bytes Compression= 115.93 *
…
*Br 13 :ch06_12bit : *
*Entries : 242622 : Total Size= 974200 bytes File Size = 194298 *
*Baskets : 30 : Basket Size= 32000 bytes Compression= 4.94 *
…
*Br 14 :ch06_15bit : *
*Entries : 242622 : Total Size= 974200 bytes File Size = 8280 *
*Baskets : 30 : Basket Size= 32000 bytes Compression= 115.93 *
…
*Br 15 :ch07_12bit : *
*Entries : 242622 : Total Size= 974200 bytes File Size = 167372 *
*Baskets : 30 : Basket Size= 32000 bytes Compression= 5.74 *
…
*Br 16 :ch07_15bit : *
*Entries : 242622 : Total Size= 974200 bytes File Size = 8280 *
*Baskets : 30 : Basket Size= 32000 bytes Compression= 115.93 *
…
*Br 17 :unix_seconds/D : *
*Entries : 242622 : Total Size= 1948336 bytes File Size = 18314 *
*Baskets : 60 : Basket Size= 32000 bytes Compression= 104.83 *
…
[/code]
I didn’t use any command to draw it. I just opend the Tree in the browser and double clicked the lea “unix_seconds” which usually does a histogram. However now it produces the error mentioned before.
Edit:
I just played around a bit more.
I ran the MakeClass again over the root file (generated using your suggestions) and in the Analyze.h file the code goes like this.
[code] // Declaration of leaf types
…
Float_t ch07_12bit;
Float_t ch07_15bit;
Double_t unix_seconds/D;
// List of branches
…
TBranch *b_ch07_12bit; //!
TBranch *b_ch07_15bit; //!
TBranch *b_unix_seconds; //!
…
…
…[/code]
So it actually seems to declare the unix_seconds as Double (which is good I guess).
But when I try to Analyze it running Analyz a a using this code:
[code]#define Analyze_cxx
#include “Analyze.h”
#include <TH2.h>
#include <TStyle.h>
#include <TCanvas.h>
void Analyze::Loop()
{
…
if (fChain == 0) return;
TH1* timeHist = new TH1D("unix_seconds/D","Zeit",10000,1288966221,1288997999);
timeHist->GetXaxis()->SetTitle("Time");
timeHist->GetXaxis()->SetTimeDisplay(1); // X axis is a time axis
timeHist->GetXaxis()->SetTimeFormat("%H\:%M\:%S");
timeHist->GetYaxis()->SetTitle("number of events");
Long64_t nentries = fChain->GetEntriesFast();
Long64_t nbytes = 0, nb = 0;
for (Long64_t jentry=0; jentry<nentries;jentry++) {
Long64_t ientry = LoadTree(jentry);
if (ientry < 0) break;
nb = fChain->GetEntry(jentry); nbytes += nb;
// if (Cut(ientry) < 0) continue;
timeHist->Fill(unix_seconds);
}
timeHist->Draw("");
}
[/code]
I get the following error message:
Error: Symbol unix_seconds is not defined in current scope Analyze.h:149:
Error: Symbol D is not defined in current scope Analyze.h:149:
Error: operator '/' divided by zero Analyze.h:149:
which points to this line in the Analyze.h file:
Maybe this helps locate the error.