Message: Any advice on wrapping CLHEP into Python Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Any advice on wrapping CLHEP into Python 

Forum: Installation and Configuration
Date: 13 Jan, 2010
From: Robert Penny <Robert Penny>

This is a multi-part message in MIME format.

------_=_NextPart_001_01CA94B3.0B5FF7D4
Content-Type: text/plain;
 charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

I'm trying to reconstruct some images from data generated by a Geant =
simulation.  This involves a lot of calculations with the intersections =
of lines with planes.  It seemed like an ideal application for the CLHEP =
geometric primitives.

Although the code will eventually be pure C++, for debugging purposes it =
seemed that it'd be a lot easier to try things out in Python.  Python is =
also a great way to glue data into display tools such as Matplotlib and =
VTK.

A few days ago I started wrapping some of the CLHEP geometry classes ( =
Point3D, Vector3D, Plane3D, Transform3D, Normal3D) into Python using =
Boost.Python.  Unfortunately, everyone seems to use their own build =
system, Geant with GNUmake, Boost.Python with bjam (and for that matter =
VTK with CMAKE).

I was trying to resolve whether to try to get Geant applications to =
build under bjam, or get Boost.Python extension modules to compile under =
GNUmake.  It was only this afternoon I found the g4Py wrappings of Geant =
into Python in the Geant source tree. I wish I'd seen this a few days =
ago.

Given how much effort I could have saved if I'd seen this earlier, I =
wanted to get a sanity check on the direction in which I'm intending to =
proceed.

Firstly, is anyone aware of a more extensive wrapping of CLHEP geometric =
primitives than the TwoVector, ThreeVector and Transform3D in the =
existing Geant source tree?  It'd be nice to use the operator =
overloading for applying transformations through a simple Python =
multiplication.

Secondly, it seems like moving away from bjam towards GNUmake for =
building the extensions is the way to go.

I can probably get a better handle on this after I spend a few more =
hours walking through the environments/g4py source tree.  However, if =
there's anyone out there who's done this already I'd appreciate their =
advice.

Thanks,

-Rob.


------_=_NextPart_001_01CA94B3.0B5FF7D4
Content-Type: text/html;
 charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.7655.4">
<TITLE>Any advice on wrapping CLHEP into Python</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=3D2>Hi,<BR>
<BR>
I'm trying to reconstruct some images from data generated by a Geant =
simulation.&nbsp; This involves a lot of calculations with the =
intersections of lines with planes.&nbsp; It seemed like an ideal =
application for the CLHEP geometric primitives.<BR>
<BR>
Although the code will eventually be pure C++, for debugging purposes it =
seemed that it'd be a lot easier to try things out in Python.&nbsp; =
Python is also a great way to glue data into display tools such as =
Matplotlib and VTK.<BR>
<BR>
A few days ago I started wrapping some of the CLHEP geometry classes ( =
Point3D, Vector3D, Plane3D, Transform3D, Normal3D) into Python using =
Boost.Python.&nbsp; Unfortunately, everyone seems to use their own build =
system, Geant with GNUmake, Boost.Python with bjam (and for that matter =
VTK with CMAKE).<BR>
<BR>
I was trying to resolve whether to try to get Geant applications to =
build under bjam, or get Boost.Python extension modules to compile under =
GNUmake.&nbsp; It was only this afternoon I found the g4Py wrappings of =
Geant into Python in the Geant source tree. I wish I'd seen this a few =
days ago.<BR>
<BR>
Given how much effort I could have saved if I'd seen this earlier, I =
wanted to get a sanity check on the direction in which I'm intending to =
proceed.<BR>
<BR>
Firstly, is anyone aware of a more extensive wrapping of CLHEP geometric =
primitives than the TwoVector, ThreeVector and Transform3D in the =
existing Geant source tree?&nbsp; It'd be nice to use the operator =
overloading for applying transformations through a simple Python =
multiplication.<BR>
<BR>
Secondly, it seems like moving away from bjam towards GNUmake for =
building the extensions is the way to go.<BR>
<BR>
I can probably get a better handle on this after I spend a few more =
hours walking through the environments/g4py source tree.&nbsp; However, =
if there's anyone out there who's done this already I'd appreciate their =
advice.<BR>
<BR>
Thanks,<BR>
<BR>
-Rob.<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01CA94B3.0B5FF7D4--

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

1 Idea: Re: Any advice on wrapping CLHEP into Python   (Koichi Murakami - 21 Jan, 2010)
 Add Message Add Message
to: "Any advice on wrapping CLHEP into Python"

 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 ]