VGM Version 5.3
Loading...
Searching...
No Matches
VMedium.cxx
Go to the documentation of this file.
1// $Id$
2
3// -----------------------------------------------------------------------
4// The BaseVGM package of the Virtual Geometry Model
5// Copyright (C) 2007, Ivana Hrivnacova
6// All rights reserved.
7//
8// For the licensing terms see vgm/LICENSE.
9// Contact: ivana@ipno.in2p3.fr
10// -----------------------------------------------------------------------
11
12//
13// Class VMedium
14// ---------------
15// The ABC for tracking medium.
16//
17// Author: Ivana Hrivnacova; IPN Orsay
18
20
22
24
25//_____________________________________________________________________________
26std::ostream& operator<<(std::ostream& out, const VGM::IMedium& medium)
27{
28 out << "Medium: "
29 << "\"" << medium.Name() << "\""
30 << " material " << medium.Name() << " g/cm3"
31 << " parameters:";
32
33 for (int i = 0; i < medium.NofParameters(); i++)
34 out << " " << medium.Parameter(i);
35
36 return out;
37}
38
39//_____________________________________________________________________________
41 : VGM::IMedium(), fMaterial(material)
42{
44}
45
46//_____________________________________________________________________________
48{
50}
51
52//_____________________________________________________________________________
53BaseVGM::VMedium::VMedium(const VMedium& rhs) : VGM::IMedium(rhs)
54{
56}
57
58//_____________________________________________________________________________
63
64//_____________________________________________________________________________
66{
67 //
68 return fMaterial;
69}
70
71//_____________________________________________________________________________
72int BaseVGM::VMedium::NofParameters() const { return fgkParamSize; }
std::ostream & operator<<(std::ostream &out, const VGM::IMedium &medium)
Definition VMedium.cxx:26
The ABC for tracking medium.
Definition VMedium.h:35
virtual VGM::IMaterial * Material() const
Return its associated material.
Definition VMedium.cxx:65
static const int fgkParamSize
Definition VMedium.h:49
virtual ~VMedium()
Definition VMedium.cxx:59
virtual int NofParameters() const
Return the number of defined parameters.
Definition VMedium.cxx:72
The VGM interface to materials.
Definition IMaterial.h:44
The VGM interface to tracking medium.
Definition IMedium.h:31
virtual int NofParameters() const =0
Return the number of defined parameters.
virtual double Parameter(int i) const =0
Return the i-th parameter.
virtual std::string Name() const =0
Return its name.
VGM interfaces.
Definition VMedium.h:28