Commit in slicPandora/src on MAIN
DetectorGeometry.cpp+301.2 -> 1.3
checkpoint for reading in id information to IDDecoder (untested)

slicPandora/src
DetectorGeometry.cpp 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- DetectorGeometry.cpp	24 Feb 2010 01:13:49 -0000	1.2
+++ DetectorGeometry.cpp	2 Mar 2010 21:00:57 -0000	1.3
@@ -121,6 +121,36 @@
         extras.m_cellSizeU = cellSizeU;
         extras.m_cellSizeV = cellSizeV;
         extras.m_collection = calElem->Attribute("collection");
+
+        // Setup the IDDecoder.
+        IDDecoder::IDFields fields;
+        TiXmlElement* idElem = (TiXmlElement*) calElem->FirstChild("id");
+        TiXmlElement* fieldElem = (TiXmlElement*) idElem->FirstChild("field");
+        for (fieldElem;
+             fieldElem;
+             fieldElem = idElem->NextSiblingElement())
+        {
+            std::string name;
+            int length = 0;
+            int start = 0;
+            bool isSigned = false;
+            std::string isSignedStr = false;
+
+            name = std::string(fieldElem->Attribute("name"));
+            fieldElem->QueryIntAttribute("length", &length);
+            fieldElem->QueryIntAttribute("start", &start);
+            isSignedStr = fieldElem->Attribute("isSigned");
+            if (isSignedStr == "true")
+            {
+                isSigned = true;
+            }
+            IDDecoder::IDField* field = new IDDecoder::IDField(name, start, length, isSigned);
+            fields.push_back(field);            
+        }        
+        IDDecoder* decoder = new IDDecoder(fields);
+        extras.m_decoder = decoder;
+
+        // Insert the extra subdetector information.            
         std::string subdetTypeStr(subdetType);
         subdetExtras[subdetTypeStr] = extras;
     }   
CVSspam 0.2.8