Forum: Persistency Not Logged In (login)
Show subscribers

Topics covering object persistency, persistency management, and databases are discussed here.

The email gateway for this forum is: persistency-g4hn@slac.stanford.edu


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

None test persistency HN, please ignore.  by Terry Hung <Terry Hung>,   Aug 04, 18:52
test persistency HN, please ignore.

-- 
Terry Hung - Stanford Linear Accelerator Center

None Test HyperNews, please ignore  by Terry Hung <Terry Hung>,   Aug 04, 18:50
test, please ignore.

Question Root file creation  by Kliakhandler Kosta <Kliakhandler Kosta>,   Jul 20, 16:41
Hello,

I have not found many examples of creating a root file with data, and the one I found (Persistency 01) does not compile for some reason (can't find the Txxx.h headers).

Despite this, I have managed to create something which compiles and creates a file. However, The file is always 314 bytes long, no matter what I try to write out to it.

I use something very similar to the RootIO class from the Persistency 01 example. I would like to write out hits, but I tried writing almost anything, including just a bunch of integers. Nothing works.

I can provide the code if it would help diagnosis. Any ideas?

Thanks.

Question STEP file import formats under Geant4 9.2?  by Mark Looper <Mark Looper>,   26 Mar, 2009
I have been trying to figure out how to use the new CAD file import capability in version 9.2, but the MEs I've talked to here don't recognize the file formats supported. Geant4 9.2 is supposed to be able to read STEP files, but the example given ($G4INSTALL/examples/extended/persistency/gdml/G02) doesn't use *.step or *.stp as the input file, but rather a pair of files with names of the form *.tree and *.geom. As I said, our SolidWorks users have never seen these; the README file calls them "STEP Tool files," so does that mean they are a (proprietary?) format put out by the commercial "STEP Tools" software (www.steptools.com)? Is there a way to translate a *.step file into such a file pair, preferably with some freeware app or SolidWorks add-on?

Also, in DetectorConstruction.cc of that example I see that parser.ParseST returns a G4LogicalVolume that encloses the "hardware" and is assigned one material, with the "hardware" assigned another material as a daughter volume. In the example input files, there is a single daughter volume; can the input file contain more than one? If so, do I understand correctly that all daughter volumes will be assigned a single material (Aluminum in the example), so that I will have to specify other materials by hand? Thanks.

1 Feedback: Re: STEP file import formats under Geant4 9.2?   (John Watts - 27 Mar, 2009)
(_ More: Re: STEP file import formats under Geant4 9.2?   (Mark Looper - 06 May, 2009)
(_ More: Re: STEP file import formats under Geant4 9.2?   (Mark Looper - 06 May, 2009)
Feedback Problems with GDML in Geant4.9.2  by John Watts <John Watts>,   11 Feb, 2009
I have been attempting to modify my code to use the GDML routines in geant4.9.2. Previously I used the interface in GDML_2_10_0. I have found a couple of problems. 1. The VolumeAuxiliaryinformation map if owned by the G4GDMLReadStructure routine rather then the G4GDMLParser. Each time you read a new module file it is reset. 2. Matrix don't seem to work. I tried the matirx example, matricesandloop.gdml in the load_gdml of examples/extended/persistancy/gdml/G01. I got syntax errors.

1 Question: Re: Problems with GDML in Geant4.9.2   (Gabriele Cosmo - 17 Feb, 2009)
1 Feedback: Re: Problems with GDML in Geant4.9.2 Matrix issue   (John Watts - 17 Feb, 2009)
2 Feedback: Re: Problems with GDML in Geant4.9.2 VolumeAuxilaryInformation issue   (John Watts - 17 Feb, 2009)
3 More: Re: Problems with GDML in Geant4.9.2   (Gabriele Cosmo - 18 Feb, 2009)
None problems adding TH1F histogram to the persistency example  by <marco.serra@roma1.infn.it>,   27 Feb, 2007
Hello,
I am trying to create a 1D histogram in the persistency example
(Geant-4.8.2 / root_v5.14.00b / clhep-2.0.3.1) adding a simple line

TH1F* h1 = new TH1F("hist1","CalHit",100,0,100.);

to the "readHits.cc" class.

But when I try to create an executable I have the error
 
: undefined reference to `TH1F::TH1F(char const*, char const*, int, double, double)'
collect2: ld returned 1 exit status
make: *** [dictionary] Error 1

I have added #include TH1F.h in readHits.cc but it does not help. 

Note that for example the creation of a new file via:
TFile* hf = new TFile("Histo.root", "RECREATE");
works fine. 

With older versions of the persistency example (up to Geant 4.8.0.p01) 
it was always possible to add histrograms, but now the example was 
rewritten (and the makefile changed a lot) and I am not able anymore 
to obtain plots.

Could someone help me?
thanks, regards Marco Serra 
1 Ok: Re: problems adding TH1F histogram to the persistency example   (marco.serra@roma1.infn.it - 27 Feb, 2007)
Question How to store the fluence distribution and the energy spectra?  Keywords: save, energy fluence ,particle fluence ,momentum distribution
by Shahrokh <Shahrokh>,   21 Dec, 2005

Hi,

What can I store and save the information of energy fluence, particle fluence and the momentum distribution of particles on a plane? for example, the particle is electron produced by interaction of photon source with material.)

please help me.

Thanks a lot.

Shahrokh

Question Writing digis with rootio  by Emanuele Leonardi <Emanuele Leonardi>,   14 Oct, 2005
I am adapting the structure which in examples/extended/perisitency writes
hits to a root file so that I can also write digis.

I modified the Pers01CalorHit.rootio file in this way:

@------------------------------------------------------------------@
set class_name TileCalDigi
set collection_class TileCalDigitsCollection
set collection_base_class G4VDigiCollection
set array_io_base G4VPDigitsCollectionIO
set catalog G4DCIOentryT
#set sdet_name TileCalScintSD
set add_header
  @class_name@.hh
..
set member
  @int@ PMTNumber;
  @float@ Photoel;
  @int@ ROValue;
  @int@ Overflow;
..

set constructor
  @class_root@(@class_name@* digi)
  {
    PMTNumber = digi->GetPMTNumber();
    Photoel = digi->GetPhotoel();
    ROValue = digi->GetROValue();
    Overflow = digi->GetOverflow();
  }
..

set method
  @class_name@* @make_transient@()
  {
    @class_name@* digi = new @class_name@();
    digi->SetPMTNumber(PMTNumber);
    digi->SetPhotoel(Photoel);
    digi->SetROValue(ROValue);
    if (Overflow == 0) { digi->ResetOverflow(); } else { digi->SetOverflow(); }
    return digi;
  }
..
@------------------------------------------------------------------@

The problem is that I have no idea of what to use as sdet_name and the
g4rootio script complains that it is not defined:

g4rootio: Error - sensitive detctor name is not specified.  Stop.

What should I use as "sensitive detector" for digis?

Thanks

             Emanuele Leonardi
None structure of g4root files  Keywords: structure of g4root files
by Tomasz Wachala <twachala@wp.pl>,   17 Jan, 2005

I need some information about g4root files generated by G4Glacier.How can I find it? How can I read these files under Root?Do I need to install any additional libraries for Root?

None Executable module of G4PersEx01  Keywords: persistency
by Ed Tatar <tatar@physics.isu.edu>,   15 Mar, 2004

Dear Colleagues,

I am trying to build PersEx01 from geant4_6.0.p01. Making libG4ROOTIO.so is successfull, however I get warnings like:
-------------------------------------------------
...
src/G4RootTransManager.cc: In member function `virtual bool
   G4RootTransManager::SelectWriteFile(std::basic_string<char,
   std::char_traits<char>, std::allocator<char> >, std::basic_string<char,
   std::char_traits<char>, std::allocator<char> >)':
src/G4RootTransManager.cc:69: warning: unused parameter `std::string obj'
...
-------------------------------------------------
The problem I have is in making the executable module.  The compiler gives an error after a long list of warnings:
-------------------------------------------------
...
/home/etatar/bin/root_v3.10.02/root/cint/include/float.h:18:1: warning: "FLT_MIN
" redefined
In file included from /home/etatar/g4/geant4.6.0.p01/include/globals.hh:95,
                 from /home/etatar/g4/geant4.6.0.p01/include/G4VHit.hh:31,
                 from /home/etatar/g4/geant4.6.0.p01/examples/extended/persisten
cy/PersEx01/include/Pers01CalorHit.hh:35,
                 from Pers01CalorHitRoot.hh:10,
                 from /tmp/fileOj4byr_rootcint.h:1,
                 from /tmp/Ga3A8n_cint.cxx:1:
/home/etatar/g4/geant4.6.0.p01/include/templates.hh:86:1: warning: this is the l
ocation of the previous definition
gmake: *** [/home/etatar/g4/geant4.6.0.p01/examples/extended/persistency/rootio/
tmp/Linux-g++/G4PersEx01/G4PersEx01Dict.cc] Error 134
-------------------------------------------------
If I execute the GNUmakefilefile again, the errors are ignored and 
          libG4PersEx01.so   and    G4PersEx01
are created.  Here is the end of the message I get when I run the ./run script:
-------------------------------------------------

---> End of event: 18
   Absorber: total energy: 30.9549 MeV       total track length: 2.00985 cm
        Gap: total energy: 67.0609 keV       total track length: 75.2977 mum

5 hits are stored in Pers01CalorHitsCollection. Hit Collection I/O manager "CalorSD" not found! G4HitRootIO::Store(): Hit Collection I/O manager is not registered for detector: 'CalorSD', collection name: 'CalCollection'. G4PersistencyManager::Store(G4Event) - Transaction aborted.

---> Begin of event: 19

--------- Ranecu engine status ---------
 Initial seed (index) = 0
 Current couple of seeds = 1379718041, 189997860
----------------------------------------
---> End of event: 19
   Absorber: total energy: 30.8041 MeV       total track length: 2.13951 cm
        Gap: total energy: 217.855 keV       total track length: 370.671 mum

5 hits are stored in Pers01CalorHitsCollection. Hit Collection I/O manager "CalorSD" not found! G4HitRootIO::Store(): Hit Collection I/O manager is not registered for detector: 'CalorSD', collection name: 'CalCollection'. G4PersistencyManager::Store(G4Event) - Transaction aborted. Graphics systems deleted. Visualization Manager deleting...

 *** Break *** segmentation violation
 Generating stack trace...
 0x41435217 in G4ParticleDefinition::~G4ParticleDefinition [not-in-charge]() + 0x3b from /home/etatar/g4/geant4.6.0.p01/lib/Linux-g++/libG4particles.so
 0x4144b5a7 in <unknown> from /home/etatar/g4/geant4.6.0.p01/lib/Linux-g++/libG4particles.so
 0x4144b606 in <unknown> from /home/etatar/g4/geant4.6.0.p01/lib/Linux-g++/libG4particles.so
 0x41421f6b in <unknown> from /home/etatar/g4/geant4.6.0.p01/lib/Linux-g++/libG4particles.so
 0x414d8066 in <unknown> from /home/etatar/g4/geant4.6.0.p01/lib/Linux-g++/libG4particles.so
 0x4000ce94 in <unknown> from /lib/ld-linux.so.2
 0x43dc3e10 in exit + 0x70 from /lib/tls/libc.so.6
 0x43daf768 in <unknown> from /lib/tls/libc.so.6
 0x0804ecb1 in G4VUserPhysicsList::RetrievePhysicsTable(G4ParticleDefinition*, G4String const&, bool) + 0x65 from ../rootio/bin/Linux-g++/G4PersEx01
./run: line 3:   889 Aborted                 ../rootio/bin/Linux-g++/G4PersEx01 run.mac
-------------------------------------------------

I am using gcc3.2 on Linux 9. The enviromental variables seem to be correctly defined. Could somebody help us?

With best regards, Eddie Tatar Idaho State University

1 Feedback: Re: Executable module of G4PersEx01   (Gabriele Cosmo - 24 Mar, 2004)
Question Novice user question  by ptr <ptr@msu.dubna.ru>,   26 Jun, 2003

making executable PersEx01]$ make i've got such errors:

/*********************

Generating dictionary /home/vlasov/CHARME/GEANT/examples/extended/persistency/rootio/tmp/Linux-g++/G4PersEx01/G4PersEx01Dict.cc ...

Error: assignment to 101325*hep_pascalstaticconst HepDoubleampere FILE:/home/vlasov/CHARME/GEANT/include/SystemOfUnits.h LINE:218
Error: assignment to 100000*hep_pascalstaticconst HepDoubleatmosphere FILE:/home/vlasov/CHARME/GEANT/include/SystemOfUnits.h LINE:218
Error: Symbol ampere is not defined in current scope  FILE:/home/vlasov/CHARME/GEANT/include/SystemOfUnits.h LINE:219
Error: Symbol ampere is not defined in current scope  FILE:/home/vlasov/CHARME/GEANT/include/SystemOfUnits.h LINE:220
Error: Symbol ampere is not defined in current scope  FILE:/home/vlasov/CHARME/GEANT/include/SystemOfUnits.h LINE:221
Error: Symbol ampere is not defined in current scope  FILE:/home/vlasov/CHARME/GEANT/include/SystemOfUnits.h LINE:233
Error: operator '/' divided by zero FILE:/home/vlasov/CHARME/GEANT/include/SystemOfUnits.h LINE:233
Error: Symbol ampere is not defined in current scope  FILE:/home/vlasov/CHARME/GEANT/include/SystemOfUnits.h LINE:260
Error: operator '/' divided by zero FILE:/home/vlasov/CHARME/GEANT/include/SystemOfUnits.h LINE:260

*********************/ What does'em means?

by the way i've sucsessfuly built a libG4ROOTIO.so library

None ROOT/IO in Geant4.5.0  Keywords: ROOT IO in Geant4
by Huaimin Liu <Huaimin Liu>,   26 Feb, 2003

Hi,

I am trying to use root/io in Geant4.5.0, so I just start with an example provided by G4. I followed steps in README. The first step is ok, libG4ROOTIO.so was successfully built. When I am making my executable, libG4PersEx01.so was created without any problem, but some error messages (sse below) came out at the linking stage

  /rootio/lib/Linux-g++/libG4ROOIO.so:   
     undefined reference to `TObject::Browse(TBrowser*)'
             ......
     undefined reference to `TFile::TFile[in-charge]

so the executable could not be created. Can anyone help? I am using RedHat7.2 with gcc3.2 and a new G4 patch, I think my ROOT environment was correctly set. Thank you.

--Huaimin Liu

1 None: Re: ROOT/IO in Geant4.5.0   (Youhei Morita - 12 Mar, 2003)
 Add Message Add Message
to: "Persistency"

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 ]