Hi, Please do not send your mail to multiple newsgroups. see: http://root.cern.ch/root/roottalk/RoottalkRules.html check that your pointer h_mass[cc] is not null. Rene Brun On Tue, 5 Aug 2003, Avdhesh Chandra wrote: > Hi, > > I'm defining an array of histograms. > > TH1F *h_mass[20]; > h_mass[0] = new TH1F("0_hmass","all events ", nBins,minMass,maxMass); > .................................................................. > > After filling them for all events, when I want to write them in rootfile, > using: > TFile *out1 = new TFile("Tagging_histo.root","RECREATE"); > out1->cd(); > for(int cc=0; cc<10; cc++) { h_mass[cc] -> Write(); } > > I get the following: > > *** Break *** segmentation violation > Generating stack trace... > > 0x40191291 in TUnixSystem::StackTrace(void) at > /cdf/scratch/jeffk/root_cutting/KCC_4_0-opt-thread-exception/root/unix/src/TUnixSystem.cxx:1358 > from > /D0/ups/root/Linux-2-4/v3_05_00bKCC_4_0-exception-opt-thread/lib/libCore.so > 0x40190600 in TUnixSystem::DispatchSignals(ESignals) at > /cdf/scratch/jeffk/root_cutting/KCC_4_0-opt-thread-exception/root/unix/src/TUnixSystem.cxx:583 > from > /D0/ups/root/Linux-2-4/v3_05_00bKCC_4_0-exception-opt-thread/lib/libCore.so > 0x4018dc2a in <unknown> from > /D0/ups/root/Linux-2-4/v3_05_00bKCC_4_0-exception-opt-thread/lib/libCore.so > 0x4018dcaa in <unknown> from > /D0/ups/root/Linux-2-4/v3_05_00bKCC_4_0-exception-opt-thread/lib/libCore.so > > I feel that the problem is only in writing the histos in a file. > > Can someone help me in solving this problem? > > Thanks in advance, > Avdhesh >
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET