lcdd/include/lcdd/geant4
diff -u -r1.4 -r1.5
--- PhysVolId.hh 10 Jul 2013 18:06:17 -0000 1.4
+++ PhysVolId.hh 10 Jul 2013 18:35:40 -0000 1.5
@@ -1,10 +1,11 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/geant4/PhysVolId.hh,v 1.4 2013/07/10 18:06:17 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/geant4/PhysVolId.hh,v 1.5 2013/07/10 18:35:40 jeremy Exp $
#ifndef LCDD_GEANT4_PHYSVOLID_HH
#define LCDD_GEANT4_PHYSVOLID_HH 1
// STL
#include <vector>
+#include <string>
/**
* @brief Physical volume IDs that are attached to G4VPhysicalVolume objects.
@@ -20,27 +21,15 @@
/**
* Class constructor.
- */
- //PhysVolId()
- //{
- //}
-
- /**
- * Class constructor.
* @param[in] val The value of the ID.
* @param[in] fld The name of the ID.
*/
- PhysVolId(ValueType val, std::string fld) :
- _value(val), _fieldName(fld)
- {
- }
+ PhysVolId(ValueType val, std::string fld);
/**
* Class destructor.
*/
- virtual ~PhysVolId()
- {
- }
+ virtual ~PhysVolId();
public:
@@ -48,49 +37,25 @@
* Get the value of the ID.
* @return The value of the ID.
*/
- ValueType getValue() const
- {
- return _value;
- }
+ ValueType getValue() const;
/**
* Get the name of the field.
* @return The name of the field.
*/
- const std::string& getFieldName() const
- {
- return _fieldName;
- }
-
- /*
- void setFieldName(const std::string& fn)
- {
- _fieldName = fn;
- }
-
- void setValue(ValueType vt)
- {
- _value = vt;
- }
- */
+ const std::string& getFieldName() const;
/**
* Compare this PhysVolId to another based on their values.
* @return True if ID values are equal; false if not.
*/
- bool operator==(const PhysVolId& right)
- {
- return (_value == right._value);
- }
+ bool operator==(const PhysVolId& right);
/**
* Compare this PhysVolId to a value.
* @return True if value is equal to this ID; false if not.
*/
- bool operator==(ValueType vt)
- {
- return (_value == vt);
- }
+ bool operator==(ValueType vt);
private:
lcdd/src/lcdd/geant4
diff -N PhysVolId.cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ PhysVolId.cc 10 Jul 2013 18:35:41 -0000 1.1
@@ -0,0 +1,32 @@
+// $Header: /cvs/lcd/lcdd/src/lcdd/geant4/PhysVolId.cc,v 1.1 2013/07/10 18:35:41 jeremy Exp $
+
+#include "lcdd/geant4/PhysVolId.hh"
+
+PhysVolId::PhysVolId(ValueType val, std::string fld) :
+ _value(val), _fieldName(fld)
+{
+}
+
+PhysVolId::~PhysVolId()
+{
+}
+
+PhysVolId::ValueType PhysVolId::getValue() const
+{
+ return _value;
+}
+
+const std::string& PhysVolId::getFieldName() const
+{
+ return _fieldName;
+}
+
+bool PhysVolId::operator==(const PhysVolId& right)
+{
+ return (_value == right._value);
+}
+
+bool PhysVolId::operator==(ValueType vt)
+{
+ return (_value == vt);
+}