Ignore:
Timestamp:
Apr 7, 2011, 12:39:27 PM (10 years ago)
Author:
tbretz
Message:
Implemented event description into all kind of events.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/EventImp.cc

    r10295 r10299  
    113113#include "Time.h"
    114114#include "WindowLog.h"
     115#include "Description.h"
    115116
    116117using namespace std;
     
    205206    if (!fmt.empty())
    206207        out << kBold << "[" << fmt << "]";
     208
     209    vector<Description> v = Description::SplitDescription(GetDescription());
     210
     211    if (!GetDescription().empty())
     212    {
     213        for (vector<Description>::const_iterator j=v.begin()+1;
     214             j!=v.end(); j++)
     215            out << " <" << j->name << ">";
     216    }
    207217
    208218    out << kReset << ":";
     
    233243    out << endl;
    234244
    235     if (!fDescription.empty())
    236         out << "     " << fDescription << endl;
     245    if (GetDescription().empty())
     246        return;
     247
     248    out << "   " << v[0].comment << endl;
     249
     250    for (vector<Description>::const_iterator j=v.begin()+1;
     251         j!=v.end(); j++)
     252    {
     253        out << "    " << kGreen << j->name;
     254        if (!j->comment.empty())
     255            out << kReset << ": " << kBlue << j->comment;
     256        if (!j->unit.empty())
     257            out << kYellow << " [" << j->unit << "]";
     258        out << endl;
     259    }
    237260}
    238261
Note: See TracChangeset for help on using the changeset viewer.