Message: extended_hadronic_Hadr01 / OpenScientist-16.0 / empty histos in .hbook file Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None extended_hadronic_Hadr01 / OpenScientist-16.0 / empty histos in .hbook file  

Forum: Analysis
Date: 24 May, 2007
From: Guy Barrand <Guy Barrand>

   Hello

  We have seen, with Jean-Etienne Sauvestre of CEA, that on :

    extended/hadronic/Hadr01

 of the 8.2, the "hbook" persistency done by using
 the Zebra driver of OpenScientist-16.0 
 produces a p_pb_20gev.book files with empty histos !

  This comes from the fact that in this 
 example (see Histo::save() code), someone do :

  tree->commit();
  tree->close();
  for(G4int i=0; i<nHisto; i++) {
    if(histo[i]) histo[i]->reset();
  }

 That is to say, a reset() is done over the 
 histos after the commit.

  But, in the osc-16.0 Zebra driver, the
 "HROUT" is done in fact at the deletion
 of the tree (and not in the commit() or close()),
 and then AFTER the histo->reset() in this
 example, and then the empty histos in the file.

  I am going to correct that in OSC-16.1, but 
 if someone intends to clone Hadr01 by using
 OSC-16.0 + HBOOK, he must be aware of this problem.
 (The best is to comment out the histo[i]->reset()
 in the Histo::save() method and arrange to 
 use the Histo::reset() at beginOfRun()).

  From what I have seen, Hadr01 is the only example
 that does that (reset() the histos after the commit()).

  Else, anyway the Hadr01/Histo.cc code has to be corrected
 because the main IAnalysisFactory (the "af" object)
 is handled by an std::auto_ptr in the Histo::book()
 and then deleted at end of this method ; and as
 in OSC, the main analysis factory is the global manager
 of everything, then the AIDA objects booked in 
 this method will be deleted here too, and then
 someone will have a crash in later fill() because
 the objects are no more here ! (I think that 
 the same will happen by using JAIDA/AIDAJNI).
  If cloning this example, then arrange to 
 create (delete) the "af" in the Histo class
 constructor (destructor).

  Else, with the uppers corrected, the example
 runs nicely and I get a p_pb_20gev.hbook file
 with no more empty histos that I can plot 
 with CERN/PAW and opaw.

  Guy Barrand

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

1 None: Re: extended_hadronic_Hadr01 / OpenScientist-16.0 / empty histos in .hbook file   (Vladimir IVANTCHENKO - 24 May, 2007)
 Add Message Add Message
to: "extended_hadronic_Hadr01 / OpenScientist-16.0 / empty histos in .hbook 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 ]