Changeset 10799 for trunk/FACT++/src


Ignore:
Timestamp:
05/24/11 17:39:48 (13 years ago)
Author:
tbretz
Message:
Simplified program options handling; only send enable of a general settings register if it changed at all; only sent trigger counter if the received report was dynamic data.
File:
1 edited

Legend:

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

    r10790 r10799  
    2020#include "Converter.h"
    2121
    22 #include "FACT.h"
    2322#include "tools.h"
    2423
     
    807806    void Enable(FTM::StaticData::GeneralSettings type, bool enable)
    808807    {
    809         fStaticData.Enable(type, enable);
     808        if (fStaticData.IsEnabled(type)!=enable)
     809        {
     810            fStaticData.Enable(type, enable);
     811            CmdSendStatDat();
     812        }
    810813    }
    811814
     
    960963    {
    961964        ConnectionFTM::UpdateHeader();
     965
     966        if (fHeader.fType!=FTM::kDynamicData)
     967            return;
    962968
    963969        const FTM::DimTriggerCounter data(fHeader);
     
    18711877    catch (po::multiple_occurrences &e)
    18721878    {
    1873         cout << "Error: " << e.what() << " of '" << e.get_option_name() << "' option." << endl;
    1874         cout << endl;
     1879        cerr << "Program options invalid due to: " << e.what() << " of '" << e.get_option_name() << "'." << endl;
    18751880        return -1;
    18761881    }
    18771882#endif
    1878     catch (std::exception &e)
    1879     {
    1880         cout << "Error: " << e.what() << endl;
    1881         cout << endl;
    1882 
     1883    catch (exception& e)
     1884    {
     1885        cerr << "Program options invalid due to: " << e.what() << endl;
    18831886        return -1;
    18841887    }
    18851888
    1886     if (conf.HasPrint())
     1889    if (conf.HasVersion() || conf.HasPrint())
    18871890        return -1;
    1888 
    1889     if (conf.HasVersion())
    1890     {
    1891         FACT::PrintVersion(argv[0]);
    1892         return -1;
    1893     }
    18941891
    18951892    if (conf.HasHelp())
Note: See TracChangeset for help on using the changeset viewer.