Changeset 12050 for trunk/FACT++/src


Ignore:
Timestamp:
09/08/11 22:25:59 (14 years ago)
Author:
tbretz
Message:
Replaced build in FACTmapV5(a) by a program otpion.
Location:
trunk/FACT++/src
Files:
2 edited

Legend:

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

    r11995 r12050  
    19381938
    19391939        PixelMap map;
    1940         if (!map.Read("FACTmapV5.txt"))
    1941         {
    1942             T::Error("Reading reference voltages from FACTmapV5.txt failed.");
     1940        if (!map.Read(conf.Get<string>("pixel-map-file")))
     1941        {
     1942            T::Error("Reading reference voltages from "+conf.Get<string>("pixel-map-file")+" failed.");
    19431943            return 5;
    19441944        }
     
    19811981        ("volt-max-abs",    var<float>(75),      "Absolte upper limit for the voltage (in Volts)")
    19821982        ("volt-max-rel",    var<float>(2.5),     "Relative upper limit for the voltage w.r.t. the G-APD reference voltage (in Volts)")
     1983        ("pixel-map-file",  var<string>("FACTmapV5a.txt"), "Pixel mapping file. Used here to get the default reference voltage.")
    19831984        ;
    1984     // FIXME: Add a bit for OC... there is no -0
    19851985
    19861986    conf.AddOptions(control);
  • trunk/FACT++/src/feedback.cc

    r12047 r12050  
    592592    }
    593593
    594     int EvalOptions(Configuration &)
    595     {
    596         //SetEndpoint(conf.Get<string>("addr"));
    597 
    598         //fFSC.SetVerbose(!conf.Get<bool>("quiet"));
    599 
    600         if (!fMap.Read("FACTmapV5a.txt"))
    601         {
    602             Error("Reading mapping table from FACTmapV5a.txt failed.");
     594    int EvalOptions(Configuration &conf)
     595    {
     596        if (!fMap.Read(conf.Get<string>("pixel-map-file")))
     597        {
     598            Error("Reading mapping table from "+conf.Get<string>("pixel-map-file")+" failed.");
    603599            return 1;
    604600        }
    605 
    606         /*
    607         if (!fBias.SetNewGapdVoltage(map.Vgapd()))
    608         {
    609             T::Error("Setting reference voltages failed.");
    610             return 6;
    611         }*/
    612601
    613602        return -1;
     
    623612{
    624613    return Main::execute<T, StateMachineFeedback>(conf);
     614}
     615
     616void SetupConfiguration(Configuration &conf)
     617{
     618    po::options_description control("BIAS control options");
     619    control.add_options()
     620        ("pixel-map-file",  var<string>("FACTmapV5a.txt"), "Pixel mapping file. Used here to get the default reference voltage.")
     621        ;
     622
     623    conf.AddOptions(control);
    625624}
    626625
     
    674673    conf.SetPrintUsage(PrintUsage);
    675674    Main::SetupConfiguration(conf);
     675    SetupConfiguration(conf);
    676676
    677677    if (!conf.DoParse(argc, argv, PrintHelp))
Note: See TracChangeset for help on using the changeset viewer.