- Timestamp:
- 09/08/11 22:25:59 (13 years ago)
- Location:
- trunk/FACT++
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r12046 r12050 3630 3630 // -------------------------------------------------------------------------- 3631 3631 3632 if (!fPixelMap.Read( "FACTmapV5a.txt"))3633 { 3634 cerr << "ERROR - Problems reading FACTmapV5a.txt"<< endl;3632 if (!fPixelMap.Read(conf.Get<string>("pixel-map-file"))) 3633 { 3634 cerr << "ERROR - Problems reading " << conf.Get<string>("pixel-map-file") << endl; 3635 3635 exit(-1); 3636 3636 } 3637 3637 3638 /*3639 ifstream fin0("FACTmapV5.txt");3640 3641 int l = 0;3642 3643 string buf;3644 while (getline(fin0, buf, '\n'))3645 {3646 if (l>1439)3647 break;3648 3649 buf = Tools::Trim(buf);3650 if (buf[0]=='#')3651 continue;3652 3653 stringstream str(buf);3654 3655 int idummy;3656 float fdummy;3657 3658 PixelMapEntry entry;3659 3660 str >> entry.index;3661 str >> entry.cbpx;3662 str >> idummy;3663 str >> idummy;3664 str >> entry.gapd;3665 str >> fdummy;3666 str >> entry.hv_board;3667 str >> entry.hv_channel;3668 str >> fdummy;3669 str >> fdummy;3670 str >> fdummy;3671 3672 fPixelMap[l++] = entry;3673 }3674 3675 if (l!=1440)3676 {3677 cerr << "ERROR - Problems reading FACTmapV5.txt" << endl;3678 exit(-1);3679 }3680 */3681 3638 // -------------------------------------------------------------------------- 3682 3639 -
trunk/FACT++/src/biasctrl.cc
r11995 r12050 1938 1938 1939 1939 PixelMap map; 1940 if (!map.Read( "FACTmapV5.txt"))1941 { 1942 T::Error("Reading reference voltages from FACTmapV5.txtfailed.");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."); 1943 1943 return 5; 1944 1944 } … … 1981 1981 ("volt-max-abs", var<float>(75), "Absolte upper limit for the voltage (in Volts)") 1982 1982 ("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.") 1983 1984 ; 1984 // FIXME: Add a bit for OC... there is no -01985 1985 1986 1986 conf.AddOptions(control); -
trunk/FACT++/src/feedback.cc
r12047 r12050 592 592 } 593 593 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."); 603 599 return 1; 604 600 } 605 606 /*607 if (!fBias.SetNewGapdVoltage(map.Vgapd()))608 {609 T::Error("Setting reference voltages failed.");610 return 6;611 }*/612 601 613 602 return -1; … … 623 612 { 624 613 return Main::execute<T, StateMachineFeedback>(conf); 614 } 615 616 void 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); 625 624 } 626 625 … … 674 673 conf.SetPrintUsage(PrintUsage); 675 674 Main::SetupConfiguration(conf); 675 SetupConfiguration(conf); 676 676 677 677 if (!conf.DoParse(argc, argv, PrintHelp))
Note:
See TracChangeset
for help on using the changeset viewer.