Hi rooters, I have a problem when I create a TTree in batch mode. My program create and fill 10 events in a TTree, the result is stored in a TFile. When I try to read the file (ntu.root) in root I get this curious output : root [0] TFile file("ntu.root") root [1] .ls TFile** ntu.root TFile* ntu.root KEY: TTree tree;2 Pixel Occupancy KEY: TTree tree;2 Pixel Occupancy KEY: TTree tree;2 Pixel Occupancy KEY: TTree tree;2 Pixel Occupancy KEY: TTree tree;2 Pixel Occupancy KEY: TTree tree;2 Pixel Occupancy KEY: TTree tree;2 Pixel Occupancy KEY: TTree tree;2 Pixel Occupancy KEY: TTree tree;2 Pixel Occupancy KEY: TTree tree;1 Pixel Occupancy root [2] tree.GetEntries() (Stat_t)2.000000000000e+00 root [3] tree.Scan() ************************************************************************ * Row * run * na50burst * na50trig * pixev * burstsize * ************************************************************************ * 0 * 9 * 13 * 18 * 27 * 90 * * 1 * 8 * 12 * 16 * 24 * 80 * ************************************************************************ When I try to draw a variable (tree.Draw("run")) I got only 2 entries, rather than 10 that I put in the batch program. What is wrong ? I am using version 2.00.12 for Linux egcs1.02. Here also the code I use and the makefile. By the wai this code work with the version 2.00.08. Thanks, Alberto -- +-------------------------------+------------------------------------+ | Alberto BALDISSERI | Tel : (33-1) 69 08 93 33 | | DAPNIA/SPhN, Bat 703 piece 42 | Fax : (33-1) 69 08 75 84 | | CEA Saclay | E-mail : baldiss@hep.saclay.cea.fr | | F 91191 Gif-sur-Yvette cedex | | +-------------------------------+------------------------------------+ CXX = g++ CXXFLAGS = -g -I$(ROOTSYS)/include ROOTLIBS = -L$(ROOTSYS)/lib -lNew -lBase -lCint -lClib -lCont -lFunc \ -lGraf -lGraf3d -lHist -lHtml -lMatrix -lMeta -lMinuit -lNet \ -lPostscript -lProof -lTree -lUnix -lZip -lm -ldl -rdynamic all : pixoff pixoff : pixoff.cxx $(CXX) $(CXXFLAGS) pixoff.cxx $(ROOTLIBS) -o $@ /* NA50 pixel Offline data reading A. Baldisseri : March 98 */ #include <stdio.h> #include <pixdecode.h> #include <pixhisto.h> /* include hbook.h */ _PixBurst Burst; int RunNumber = 1; int main() { int i = 10; _PixBurstRec burst; Burst = &burst; Burst->header.na50burst = 0; Burst->header.na50triggers = 2; Burst->header.pixevents = 3; Burst->header.burstsize = 4; /* ROOT ntu book */ /* ROOT ntu fill */ while(i--) ntu_fill__Fv(); /* ROOT ntu end */ ntu_end__Fv(); } /* end of main */
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:39 MET