Changeset 3242


Ignore:
Timestamp:
Jan 8, 2013, 1:22:20 AM (12 years ago)
Author:
ldelgass
Message:

Improve log output

Location:
branches/Rappture 1.2/packages/vizservers/vtkvis
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/Rappture 1.2/packages/vizservers/vtkvis/RpHeightMap.cpp

    r3239 r3242  
    101101                                                 _dataSet->getActiveScalarsName(),
    102102                                                 1);
    103                 renderer->getCumulativeDataRange(_vectorMagnitudeRange,
    104                                                  _dataSet->getActiveVectorsName(),
    105                                                  3);
    106                 for (int i = 0; i < 3; i++) {
    107                     renderer->getCumulativeDataRange(_vectorComponentRange[i],
    108                                                      _dataSet->getActiveVectorsName(),
    109                                                      3, i);
     103                const char *activeVectors = _dataSet->getActiveVectorsName();
     104                if (activeVectors != NULL) {
     105                    renderer->getCumulativeDataRange(_vectorMagnitudeRange,
     106                                                     activeVectors,
     107                                                     3);
     108                    for (int i = 0; i < 3; i++) {
     109                        renderer->getCumulativeDataRange(_vectorComponentRange[i],
     110                                                         activeVectors,
     111                                                         3, i);
     112                    }
    110113                }
    111114            } else {
     
    850853                                         _dataSet->getActiveScalarsName(),
    851854                                         1);
    852         renderer->getCumulativeDataRange(_vectorMagnitudeRange,
    853                                          _dataSet->getActiveVectorsName(),
    854                                          3);
    855         for (int i = 0; i < 3; i++) {
    856             renderer->getCumulativeDataRange(_vectorComponentRange[i],
    857                                              _dataSet->getActiveVectorsName(),
    858                                              3, i);
     855        const char *activeVectors = _dataSet->getActiveVectorsName();
     856        if (activeVectors != NULL) {
     857            renderer->getCumulativeDataRange(_vectorMagnitudeRange,
     858                                             activeVectors,
     859                                             3);
     860            for (int i = 0; i < 3; i++) {
     861                renderer->getCumulativeDataRange(_vectorComponentRange[i],
     862                                                 activeVectors,
     863                                                 3, i);
     864            }
    859865        }
    860866    } else {
  • branches/Rappture 1.2/packages/vizservers/vtkvis/RpVtkRenderer.cpp

    r3233 r3242  
    11211121{
    11221122    if (_cubeAxesActor != NULL) {
    1123         TRACE("Setting %d axis title font to: '%s'", axis, fontName);
     1123        TRACE("Setting axis %d title font to: '%s'", axis, fontName);
    11241124        _cubeAxesActor->GetTitleTextProperty(axis)->SetFontFamilyAsString(fontName);
    11251125        _needsRedraw = true;
     
    11331133{
    11341134    if (_cubeAxesActor != NULL) {
    1135         TRACE("Setting %d axis title font size to: %d", axis, sz);
     1135        TRACE("Setting axis %d title font size to: %d", axis, sz);
    11361136        _cubeAxesActor->GetTitleTextProperty(axis)->SetFontSize(sz);
    11371137        _needsRedraw = true;
     
    11451145{
    11461146    if (_cubeAxesActor != NULL) {
    1147         TRACE("Setting %d axis title orientation to: %g", axis, orientation);
     1147        TRACE("Setting axis %d title orientation to: %g", axis, orientation);
    11481148        _cubeAxesActor->GetTitleTextProperty(axis)->SetOrientation(orientation);
    11491149        _needsRedraw = true;
     
    11571157{
    11581158    if (_cubeAxesActor != NULL) {
    1159         TRACE("Setting %d axis label font to: '%s'", axis, fontName);
     1159        TRACE("Setting axis %d label font to: '%s'", axis, fontName);
    11601160        _cubeAxesActor->GetLabelTextProperty(axis)->SetFontFamilyAsString(fontName);
    11611161        _needsRedraw = true;
     
    11691169{
    11701170    if (_cubeAxesActor != NULL) {
    1171         TRACE("Setting %d axis label font size to: %d", axis, sz);
     1171        TRACE("Setting axis %d label font size to: %d", axis, sz);
    11721172        _cubeAxesActor->GetLabelTextProperty(axis)->SetFontSize(sz);
    11731173        _needsRedraw = true;
     
    11811181{
    11821182    if (_cubeAxesActor != NULL) {
    1183         TRACE("Setting %d axis label orientation to: %g", axis, orientation);
     1183        TRACE("Setting axis %d label orientation to: %g", axis, orientation);
    11841184        _cubeAxesActor->GetLabelTextProperty(axis)->SetOrientation(orientation);
    11851185        _needsRedraw = true;
     
    11931193{
    11941194    if (_cubeAxesActor != NULL) {
    1195         TRACE("Setting %d axis label format to: '%s'", axis, format);
     1195        TRACE("Setting axis %d label format to: '%s'", axis, format);
    11961196        if (axis == X_AXIS) {
    11971197            _cubeAxesActor->SetXLabelFormat(format);
  • branches/Rappture 1.2/packages/vizservers/vtkvis/RpVtkRendererGraphicsObjs.h

    r3229 r3242  
    1212#include <typeinfo>
    1313
     14// Use GCC/G++ specific name demangling
     15#define DEMANGLE
     16
     17#ifdef DEMANGLE
     18#include <cstdlib>
     19#include <cxxabi.h>
     20#define GO_TRACE(go, format, ...)                                            \
     21do {                                                                         \
     22    int status;                                                              \
     23    char * typeName = abi::__cxa_demangle(typeid(go).name(), 0, 0, &status); \
     24    TRACE("%s " format, typeName, __VA_ARGS__);                              \
     25    free(typeName);                                                          \
     26} while (0)
     27
     28#define GO_ERROR(go, format, ...)                                            \
     29do {                                                                         \
     30    int status;                                                              \
     31    char * typeName = abi::__cxa_demangle(typeid(go).name(), 0, 0, &status); \
     32    ERROR("%s " format, typeName, __VA_ARGS__);                              \
     33    free(typeName);                                                          \
     34} while (0)
     35#else
     36#define GO_TRACE(go, format, ...) TRACE("%s " format, typeid(go).name(), __VA_ARGS__);
     37#define GO_ERROR(go, format, ...) ERROR("%s " format, typeid(go).name(), __VA_ARGS__);
     38#endif
     39
    1440#include "RpVtkRenderer.h"
    1541
     
    3056    if (itr == hashmap.end()) {
    3157#ifdef DEBUG
    32         TRACE("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     58        GO_TRACE(GraphicsObject, "not found: %s", id.c_str());
    3359#endif
    3460        return NULL;
     
    5682    }
    5783    if (itr == hashmap.end()) {
    58         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     84        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    5985        return;
    6086    }
     
    171197    }
    172198    if (itr == hashmap.end()) {
    173         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     199        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    174200        return;
    175201    }
     
    202228    }
    203229    if (itr == hashmap.end()) {
    204         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     230        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    205231        return;
    206232    }
     
    233259    }
    234260    if (itr == hashmap.end()) {
    235         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     261        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    236262        return;
    237263    }
     
    264290    }
    265291    if (itr == hashmap.end()) {
    266         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     292        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    267293        return;
    268294    }
     
    295321    }
    296322    if (itr == hashmap.end()) {
    297         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     323        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    298324        return;
    299325    }
     
    326352    }
    327353    if (itr == hashmap.end()) {
    328         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     354        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    329355        return;
    330356    }
     
    357383    }
    358384    if (itr == hashmap.end()) {
    359         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     385        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    360386        return;
    361387    }
     
    388414
    389415    if (itr == hashmap.end()) {
    390         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     416        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    391417        return;
    392418    }
     
    420446    }
    421447    if (itr == hashmap.end()) {
    422         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     448        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    423449        return;
    424450    }
     
    450476    }
    451477    if (itr == hashmap.end()) {
    452         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     478        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    453479        return;
    454480    }
     
    480506    }
    481507    if (itr == hashmap.end()) {
    482         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     508        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    483509        return;
    484510    }
     
    513539    }
    514540    if (itr == hashmap.end()) {
    515         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     541        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    516542        return;
    517543    }
     
    543569    }
    544570    if (itr == hashmap.end()) {
    545         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     571        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    546572        return;
    547573    }
     
    573599    }
    574600    if (itr == hashmap.end()) {
    575         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     601        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    576602        return;
    577603    }
     
    603629    }
    604630    if (itr == hashmap.end()) {
    605         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     631        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    606632        return;
    607633    }
     
    633659    }
    634660    if (itr == hashmap.end()) {
    635         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     661        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    636662        return;
    637663    }
     
    663689    }
    664690    if (itr == hashmap.end()) {
    665         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     691        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    666692        return;
    667693    }
     
    696722    }
    697723    if (itr == hashmap.end()) {
    698         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     724        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    699725        return;
    700726    }
     
    726752    }
    727753    if (itr == hashmap.end()) {
    728         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     754        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    729755        return;
    730756    }
     
    757783
    758784    if (itr == hashmap.end()) {
    759         ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
     785        GO_ERROR(GraphicsObject, "not found: %s", id.c_str());
    760786        return;
    761787    }
     
    768794
    769795    do {
    770         TRACE("Set %s color map: %s for dataset %s",
    771               typeid(GraphicsObject).name(),
    772               colorMapId.c_str(),
    773               itr->second->getDataSet()->getName().c_str());
     796        GO_TRACE(GraphicsObject, "Set color map: %s for dataset %s",
     797                 colorMapId.c_str(),
     798                 itr->second->getDataSet()->getName().c_str());
    774799
    775800        itr->second->setColorMap(cmap);
     
    828853            itr->second->getProp() != NULL)
    829854            mergeBounds(bounds, bounds, itr->second->getBounds());
     855        double *bPtr = itr->second->getBounds();
     856        assert(bPtr != NULL);
     857        GO_TRACE(GraphicsObject,
     858                 "%s bounds: %g %g %g %g %g %g",
     859                 itr->first.c_str(),
     860                 bPtr[0], bPtr[1], bPtr[2], bPtr[3], bPtr[4], bPtr[5]);
    830861    }
    831862}
     
    848879            itr->second->getProp() != NULL)
    849880            mergeBounds(bounds, bounds, itr->second->getUnscaledBounds());
     881        double *bPtr = itr->second->getUnscaledBounds();
     882        assert(bPtr != NULL);
     883        GO_TRACE(GraphicsObject,
     884                 "%s bounds: %g %g %g %g %g %g",
     885                 itr->first.c_str(),
     886                 bPtr[0], bPtr[1], bPtr[2], bPtr[3], bPtr[4], bPtr[5]);
    850887    }
    851888}
Note: See TracChangeset for help on using the changeset viewer.