Message: Re: Surface finish Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Surface finish 

Keywords: surface finish
Forum: Processes Involving Optical Photons
Date: 04 Feb, 2002
From: Gumplinger Peter <Gumplinger Peter>

I'll first reply to your last point regarding the enumerations (but I invite everybody to check my understanding of C++):

What you are doing may be correct in C but not C++. I assume you have code like this in your SetSurfaceFinish method:

MyDetectorConstruction::SetSurfaceFinish(G4int inputInteger) { G4OpticalSurfaceFinish surfaceFinish = inputInteger; G4OpticalSurface * mySurface = new G4OpticalSurface("MySurface"); mySurface -> SetFinish(surfaceFinish); }

I don't think this is valid code because ints are not convertible to enumerations in C++. The compiler proves the validity of the program by providing a compile-time redundancy check confirming that 'surfaceFinish' is assigned only valid values; but how can it in this case, so it may not compile?

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

1 More: Re: Surface finish   (Rui Bugalho de Moura - 04 Feb, 2002)
 Add Message Add Message
to: "Re: Surface finish"

 Subscribe Subscribe

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