/////////////////////////////////////////////////////////////////////////////
// GetData()
/////////////////////////////////////////////////////////////////////////////
void clCarbonValueCalculator::GetData( xercesc::DOMDocument * p_oDoc )
{
  try
  {
    clTreePopulation * p_oPop = ( clTreePopulation * ) mp_oSimManager->GetPopulationObject( "treepopulation" );

    GetParameterFileData(p_oDoc, p_oPop);
    FormatQueryString(p_oPop);
    SetupGrid();
    GetBiomassCodes(p_oPop);
    Action();
  }
  catch ( modelErr & err )
  {
    throw( err );
  }
  catch ( modelMsg & msg )
  {
    throw( msg );
  } //non-fatal error
  catch ( ... )
  {
    modelErr stcErr;
    stcErr.iErrorCode = UNKNOWN;
    stcErr.sFunction = "clCarbonValueCalculator::GetData" ;
    throw( stcErr );
  }
}
/////////////////////////////////////////////////////////////////////////////
// GetData()
/////////////////////////////////////////////////////////////////////////////
void clBoleVolumeCalculator::GetData( xercesc::DOMDocument * p_oDoc )
{
  try
  {
    GetParameterFileData(p_oDoc);
    FormatQueryString();
    PopulateTaperTable();
    Action();
  }
  catch ( modelErr & err )
  {
    throw( err );
  }
  catch ( modelMsg & msg )
  {
    throw( msg );
  } //non-fatal error
  catch ( ... )
  {
    modelErr stcErr;
    stcErr.iErrorCode = UNKNOWN;
    stcErr.sFunction = "clBoleVolumeCalculator::GetData" ;
    throw( stcErr );
  }
}
void clInsectInfestation::GetData( xercesc::DOMDocument * p_oDoc )
{
  try
  {
    clTreePopulation *p_oPop = (clTreePopulation *) mp_oSimManager->GetPopulationObject("treepopulation");

    m_iYearsOfInfestation = 0;
    ReadParFile( p_oDoc, p_oPop );
    FormatQueryString( p_oPop );
  }
  catch ( modelErr & err )
  {
    throw( err );
  }
  catch ( modelMsg & msg )
  {
    throw( msg );
  } //non-fatal error
  catch ( ... )
  {
    modelErr stcErr;
    stcErr.iErrorCode = UNKNOWN;
    strcpy( stcErr.cFunction, "clInsectInfestation::GetData" );
    throw( stcErr );
  }
}
/////////////////////////////////////////////////////////////////////////////
// GetData()
/////////////////////////////////////////////////////////////////////////////
void clStormKilledPartitionedBiomass::GetData( xercesc::DOMDocument * p_oDoc )
{
  try
  {
    clTreePopulation * p_oPop = ( clTreePopulation * ) mp_oSimManager->GetPopulationObject( "treepopulation" );
    int i;

    for (i = 0; i < m_iNumSpeciesTypeCombos; i++) {
      if (mp_whatSpeciesTypeCombos[i].iType != clTreePopulation::snag) {
        modelErr stcErr;
        stcErr.iErrorCode = BAD_DATA;
        stcErr.sMoreInfo = "Storm Killed Partitioned Biomass can only be applied to snags.";
        stcErr.sFunction = "clStormKilledPartitionedBiomass::GetData";
        throw(stcErr);
      }
    }

    GetTreeCodes(p_oPop);
    GetParameterFileData(p_oDoc, p_oPop);
    FormatQueryString(p_oPop);
    SetupGrid(p_oPop);
    Action();
  }
  catch ( modelErr & err )
  {
    throw( err );
  }
  catch ( modelMsg & msg )
  {
    throw( msg );
  } //non-fatal error
  catch ( ... )
  {
    modelErr stcErr;
    stcErr.iErrorCode = UNKNOWN;
    stcErr.sFunction = "clStormKilledPartitionedBiomass::GetData" ;
    throw( stcErr );
  }
}