Problem 491 - The runManager Initialization
Summary: The runManager Initialization
Status: RESOLVED INVALID
Alias: None
Product: Geant4
Classification: Unclassified
Component: run (show other problems)
Version: 5.0
Hardware: PC Linux
: P2 normal
Assignee: Makoto.Asai
URL:
Depends on:
Blocks:
 
Reported: 2003-05-22 09:21 CEST by Oleg.Ivanov
Modified: 2003-06-04 02:50 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Oleg.Ivanov 2003-05-22 09:21:45 CEST
Dear Geant4-ers,
      I was given a code of a program written in Geant 4 to get into it. When I
started to compile it I found some incompatibilities. For example the #include
<vector> was not enough, and I had to include 'using namespace std;' to get it
to work. Then I wonder how some classes, where 'cout' and 'endl' were used,
could work without including the library <iostream.h>. OKAY. The program uses
also the graphics from Root. Afterwards, when all the errors were managed, when
running it the program crashes, saying: The Segmentation Violation. I found
that this crashing comes at the line runManager->Initialize();
      Another supicious thing. As I said the program uses the Root (I have Root
3.05). And in the errors list (when executing the program) I see some errors
when the program should use some Root libraries. But it finds them, so I think
the error is not there.
      I don't have a clue what should I do. Do some of you know where the
problem is or any comments on this?
        Excuse me if my question was childish. I've never programmed in Geant
before. But I like the case that it is in C++!!!

        Have a Nice Work!

Kind Regards,
Oleg.
Comment 1 Gabriele Cosmo 2003-06-04 02:50:59 CEST
> I was given a code of a program written in Geant 4 to get into it. When I
> started to compile it I found some incompatibilities. For example the
> #include <vector> was not enough, and I had to include 'using namespace std;'
> to get it to work.

In C++ you need to use std::vector when using STL containers.
This is standard C++ syntax.

> Then I wonder how some classes, where 'cout' and 'endl' were used,
> could work without including the library <iostream.h>. OKAY.

 To use standard C++ you need to include <iostream> for std::cout and
 std::endl. Again, standard C++ syntax.

> The program uses also the graphics from Root. Afterwards, when all the
> errors were managed, when running it the program crashes, saying: The
> Segmentation Violation. I found  that this crashing comes at the line
> runManager->Initialize();
> Another supicious thing. As I said the program uses the Root (I have Root
> 3.05). And in the errors list (when executing the program) I see some errors
> when the program should use some Root libraries. But it finds them, so I
> think the error is not there.

 It is not clear from this report what is problem ...
 If errors are originated from Root libraries, it is more likely there's a
 problem in Root, or in the way it has been interfaced to Geant4.