--------------3085565C46636F152493E399
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
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 | | +-------------------------------+------------------------------------+
--------------3085565C46636F152493E399 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 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 Occupancyroot [2] tree.GetEntries() (Stat_t)2.000000000000e+00root [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 andthe 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 | | +-------------------------------+------------------------------------+--------------3085565C46636F152493E399-- --------------2FA49FCBE3956D48E59A453F Content-Type: text/plain; charset=us-ascii; name="Makefile" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Makefile" Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit 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 $@ --------------2FA49FCBE3956D48E59A453F Content-Type: text/plain; charset=us-ascii; name="pixoff.c" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pixoff.c" Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit /* NA50 pixel Offline data reading A. Baldisseri : March 98 */ #include#include #include /* 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 */ --------------2FA49FCBE3956D48E59A453F--