lcdd/src
diff -u -r1.3 -r1.4
--- solenoidProcess.cc 4 Mar 2005 22:51:15 -0000 1.3
+++ solenoidProcess.cc 29 Aug 2005 23:22:08 -0000 1.4
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/solenoidProcess.cc,v 1.3 2005/03/04 22:51:15 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/solenoidProcess.cc,v 1.4 2005/08/29 23:22:08 jeremy Exp $
#include "Saxana/ProcessingConfigurator.h"
#include "Saxana/ProcessingContext.h"
@@ -43,8 +43,6 @@
sol->set_zmax( attrs.getValue( "zmax" ) );
sol->set_innerRadius( attrs.getValue( "inner_radius" ) );
sol->set_outerRadius( attrs.getValue( "outer_radius" ) );
- sol->set_funit( attrs.getValue( "funit" ) );
- sol->set_lunit( attrs.getValue( "lunit" ) );
m_obj = sol;
*obj = sol;
lcdd/include
diff -u -r1.4 -r1.5
--- FieldType.hh 20 Apr 2005 21:01:49 -0000 1.4
+++ FieldType.hh 29 Aug 2005 23:22:08 -0000 1.5
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/FieldType.hh,v 1.4 2005/04/20 21:01:49 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/FieldType.hh,v 1.5 2005/08/29 23:22:08 jeremy Exp $
#ifndef FieldType_hh
#define FieldType_hh 1
@@ -11,7 +11,7 @@
/**
* @class FieldType
* @brief FieldType from schema.
-*/
+ */
class FieldType
{
public:
@@ -35,6 +35,7 @@
};
public:
+
FieldType()
{}
@@ -51,9 +52,31 @@
return _name;
}
+ void set_funit(const std::string& s)
+ {
+ _funit = s;
+ }
+
+ void set_lunit(const std::string& s)
+ {
+ _lunit = s;
+ }
+
+ const std::string& get_funit() const
+ {
+ return _funit;
+ }
+
+ const std::string& get_lunit() const
+ {
+ return _lunit;
+ }
+
private:
std::string _name;
+ std::string _funit;
+ std::string _lunit;
};
#endif
lcdd/include
diff -u -r1.2 -r1.3
--- FieldTypeProcess.hh 4 Mar 2005 22:51:00 -0000 1.2
+++ FieldTypeProcess.hh 29 Aug 2005 23:22:08 -0000 1.3
@@ -1,5 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/FieldTypeProcess.hh,v 1.2 2005/03/04 22:51:00 jeremy Exp $
-
+// $Header: /cvs/lcd/lcdd/include/FieldTypeProcess.hh,v 1.3 2005/08/29 23:22:08 jeremy Exp $
#ifndef FieldTypeProcess_hh
#define FieldTypeProcess_hh 1
@@ -14,15 +13,17 @@
#include "FieldType.hh"
#include <iostream>
+
/**
- @class FieldTypeProcess
- @brief Generic process for fields.
+ * @class FieldTypeProcess
+ * @brief Generic process for fields.
+ * @note This class sets name and units for a field.
*/
class FieldTypeProcess : public SAXStateProcess
{
public:
FieldTypeProcess( const ProcessingContext* context = 0)
- : SAXStateProcess(context),
+ : SAXStateProcess(context),
m_obj(0)
{}
@@ -41,12 +42,15 @@
FieldType* fld = dynamic_cast<FieldType*>( m_obj );
if ( fld ) {
+
fld->set_name( attrs.getValue( "name" ) );
-
+ fld->set_funit( attrs.getValue( "funit" ) );
+ fld->set_lunit( attrs.getValue( "lunit" ) );
+
//std::cout << "name: " << fld->get_name() << std::endl;
- }
+ }
else {
- std::cerr << "Failed cast to FieldType" << std::endl;
+ std::cerr << "Failed cast to FieldType." << std::endl;
}
}
@@ -57,7 +61,9 @@
{}
virtual void StackPopNotify(const std::string&)
- {}
+ {
+ //std::cout << "FieldTypeProcess::StackPopNotify" << std::endl;
+ }
protected:
SAXObject* m_obj;