Changeset 10635 for trunk/FACT++/src


Ignore:
Timestamp:
05/09/11 20:16:55 (14 years ago)
Author:
tbretz
Message:
Unified help output more; echanged constructors of DimDescribedService
File:
1 edited

Legend:

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

    r10612 r10635  
    4242 */
    4343 //****************************************************************
     44#include "FACT.h"
    4445#include "Event.h"
    4546#include "Time.h"
     
    352353{
    353354                //create the DIM service
    354                 int dataSize = 2*sizeof(long) + sizeof(long);
     355//              int dataSize = 2*sizeof(long) + sizeof(long);
    355356
    356357                DataLoggerStats statVar;
     
    365366                        statVar.freeSpace = -1;
    366367
    367                 DimDescribedService srvc ("DATA_LOGGER/STATS", "X:3", &statVar, dataSize, "Add description here");
     368                DimDescribedService srvc ("DATA_LOGGER/STATS", "X:3", statVar, "Add description here");
    368369                fPreviousSize = 0;
    369370                bool statWarning = false;
     
    559560                fToDim.fileName[0] = '\0';
    560561
    561                 fOpenedNightlyFiles = new DimDescribedService((GetName() + "/FILENAME_NIGHTLY").c_str(), "I:1;C", &fToDim, sizeof(int)+1,
     562                fOpenedNightlyFiles = new DimDescribedService(GetName() + "/FILENAME_NIGHTLY", "I:1;C", fToDim,
    562563                                                              "Path and base name which is used to compile the filenames for the nightly files."
    563564                                                              "|Type[int]:type of open files (1=log, 2=rep, 4=fits)"
    564565                                                              "|Name[string]:path and base file name");
    565566
    566                 fOpenedRunFiles = new DimDescribedService((GetName() + "/FILENAME_RUN").c_str(), "I:1;C", &fToDim, sizeof(int)+1,
    567                                                               "Path and base name which is used to compile the filenames for the run files."
    568                                                               "|Type[int]:type of open files (1=log, 2=rep, 4=fits)"
    569                                                               "|Name[string]:path and base file name");
     567                fOpenedRunFiles = new DimDescribedService(GetName() + "/FILENAME_RUN", "I:1;C", fToDim,
     568                                                          "Path and base name which is used to compile the filenames for the run files."
     569                                                          "|Type[int]:type of open files (1=log, 2=rep, 4=fits)"
     570                                                          "|Name[string]:path and base file name");
    570571
    571572                fNumSubAndFitsData.numSubscriptions = 0;
    572573                fNumSubAndFitsData.numOpenFits = 0;
    573                 fNumSubAndFits = new DimDescribedService((GetName() + "/NUM_SUBS").c_str(), "I:2", &fNumSubAndFitsData, sizeof(NumSubAndFitsType),
     574                fNumSubAndFits = new DimDescribedService(GetName() + "/NUM_SUBS", "I:2", fNumSubAndFitsData,
    574575                                                         "Shows number of services to which the data logger is currently subscribed and the total number of open files."
    575576                                                         "|Subscriptions[int]:number of dim services to which the data logger is currently subscribed."
     
    20602061        "writes them to ascii and fits files.\n"
    20612062        "\n"
    2062         "Usage: dataLogger [-c type] [OPTIONS]\n"
    2063         "  or:  dataLogger [OPTIONS]\n"
    2064         "\n"
    2065         "Options:\n"
    2066         "The following describes the available commandline options. "
    2067         "For further details on how command line option are parsed "
    2068         "and in which order which configuration sources are accessed "
    2069         "please refer to the class reference of the Configuration class.";
    2070     cout << endl;
    2071 
    2072 }
    2073 
    2074 void PrintHelp()
    2075 {
    2076     cout << "\n"
    20772063        "The default is that the program is started without user interaction. "
    20782064        "All actions are supposed to arrive as DimCommands. Using the -c "
    20792065        "option, a local shell can be initialized. With h or help a short "
    2080         "help message about the usuage can be brought to the screen."
    2081         << endl;
    2082 }
    2083 
    2084 /*
    2085  The first line of the --version information is assumed to be in one
    2086  of the following formats:
    2087 
    2088    <version>
    2089    <program> <version>
    2090    {GNU,Free} <program> <version>
    2091    <program> ({GNU,Free} <package>) <version>
    2092    <program> - {GNU,Free} <package> <version>
    2093 
    2094  and separated from any copyright/author details by a blank line.
    2095 
    2096  Handle multi-line bug reporting sections of the form:
    2097 
    2098    Report <program> bugs to <addr>
    2099    GNU <package> home page: <url>
    2100    ...
    2101 */
    2102 void PrintVersion(const char *name)
    2103 {
    2104     cout <<
    2105         name << " - "PACKAGE_STRING"\n"
     2066        "help message about the usuage can be brought to the screen.\n"
    21062067        "\n"
    2107         "Written by Thomas Bretz et al.\n"
    2108         "\n"
    2109         "Report bugs to <"PACKAGE_BUGREPORT">\n"
    2110         "Home page: "PACKAGE_URL"\n"
    2111         "\n"
    2112         "Copyright (C) 2011 by the FACT Collaboration.\n"
    2113         "This is free software; see the source for copying conditions.\n"
    2114         << endl;
    2115 }
    2116 
     2068        "Usage: dataLogger [-c type] [OPTIONS]\n"
     2069        "  or:  dataLogger [OPTIONS]\n";
     2070    cout << endl;
     2071
     2072}
     2073
     2074void PrintHelp()
     2075{
     2076    /* Additional help text which is printed after the configuration
     2077     options goes here */
     2078}
    21172079
    21182080void SetupConfiguration(Configuration &conf)
     
    21642126    if (conf.HasVersion())
    21652127    {
    2166         PrintVersion(argv[0]);
     2128        FACT::PrintVersion(argv[0]);
    21672129        return -1;
    21682130    }
Note: See TracChangeset for help on using the changeset viewer.