Message: IPLotterFactory can't plot histogram and dump *.ps file Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question IPLotterFactory can't plot histogram and dump *.ps file 

Keywords: IPLotterFactory can't plot histogram and dump *.ps file
Forum: Analysis
Date: 06 Nov, 2002
From: Lam Yihua <Lam Yihua>

dear programmers,

I can successfully compile my whole program, but after /beamOn/ with neutron as the incident particle, the program will hang when it reached the state in plotting histogram and generating *.ps file.

Well after I "comment" the IPlotterFactory and the following objects for plotter, the program seems ok.

The same thing happens to those advanced examples in geant4.4.1.p01 package.

I'm using:
1) lhcxx version (4.0.4) with gcc-2.95.2 from

2) Will QT (which I previously installed 2.3.1) crash with QPlotter and QT (3.0.1) attached with that lhcxx package?


:  af(0), tree(0), hf(0), tpf(0), plotterFactory(0)
{ G4cout <<" tree is created and booked inside book()"<<G4endl;

  G4cout << " Histogramfile: " << histogramfile << G4endl;

//             build up  the  factories
  af = AIDA_createAnalysisFactory();

  //parameters for the TreeFactory
  G4bool fileExists = false;
  G4bool readOnly   = false;
  if(af){ ITreeFactory  *tf = af->createTreeFactory();
  G4String filename = getFileName();
    if(tf){ tree = tf->create("LamCo001c.hbook", readOnly, fileExists, "hbook");
  		G4cout << "Tree store : " << tree->storeName() << G4endl;
  		G4cout << " Booked Hbook File " << G4endl;

        if(tree){ //HistoFactory and TupleFactory depend on theTree
//		tpf = af->createTupleFactory(*tree );
		 hf = af->createHistogramFactory(*tree);
		 G4cout<<"successfully creating HistogramFactory"<<G4endl;
// Creating an 1-dimensional histogram in the root directory of the tree
GammaBornEnergyHist = hf->create1D("101","Gamma born in the sample /keV", 1000,0.,1000.);
  		}delete hf;//End if(hf)
		 G4cout<<"successfully creating many Histograms, now delete HistogramFactory"<<G4endl;
	      }//End if(tree)
  	   delete tf; // Will not delete the ITree.
	         G4cout<<"now delete treeFactory"<<G4endl;
	   }//End if(tf)
// Creating Plotter
	  	 G4cout<<"start creating PlotterFactory"<<G4endl;
    IPlotterFactory* plotterFactory = af->createPlotterFactory(argc,argv);
    if(plotterFactory){ plotter = plotterFactory->create();
      if(plotter) {
	plotter->setParameter("pageTitle","Gamma Spectrum Tel");
    }//End if(plotterFactory)
//    delete plotterFactory;
    G4cout<<"successfully creating plotter, now delete plotterFactory"<<G4endl;

}//End if(af)

... ... ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

many thanks...


Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Feedback: Re: IPLotterFactory can't plot histogram and dump *.ps file   (Andreas Pfeiffer - 07 Nov, 2002)
1 Sad: Re: IPLotterFactory can't plot histogram and dump *.ps file   (Lam YiHua - 07 Nov, 2002)
2 Sad: Re: IPLotterFactory can't plot histogram and dump *.ps file   (Lam YiHua - 08 Nov, 2002)
 Add Message Add Message
to: "IPLotterFactory can't plot histogram and dump *.ps file"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]