Changeset 11965 for trunk/FACT++
- Timestamp:
- 09/05/11 16:25:53 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/biasctrl.cc
r11958 r11965 11 11 #include "Console.h" 12 12 #include "Converter.h" 13 #include "PixelMap.h" 13 14 14 15 #include "tools.h" … … 1785 1786 // -------------------------------------------------------------------------- 1786 1787 1787 ifstream fin("FACTmapV5.txt"); 1788 1789 int l = 0; 1790 1791 vector<float> vec(kNumChannels); 1792 1793 string buf; 1794 while (getline(fin, buf, '\n')) 1795 { 1796 if (l>1439) 1797 break; 1798 1799 buf = Tools::Trim(buf); 1800 if (buf[0]=='#') 1801 continue; 1802 1803 stringstream str(buf); 1804 1805 int idummy, board, channel; 1806 float fdummy, volt; 1807 1808 str >> idummy >> idummy >> idummy >> idummy >> idummy; 1809 str >> volt; 1810 str >> board; 1811 str >> channel; 1812 str >> fdummy >> fdummy >> fdummy; 1813 1814 if (channel+32*board>=kNumChannels) 1815 { 1816 T::Error("Invalid board/channel read from FACTmapV5.txt."); 1817 return 4; 1818 } 1819 1820 vec[channel+32*board] = volt; 1821 l++; 1822 } 1823 1824 if (l!=1440) 1788 PixelMap map; 1789 if (!map.Read("FACTmapV5.txt")) 1825 1790 { 1826 1791 T::Error("Reading reference voltages from FACTmapV5.txt failed."); … … 1828 1793 } 1829 1794 1830 if (!fBias.SetNewGapdVoltage( vec))1795 if (!fBias.SetNewGapdVoltage(map.Vgapd())) 1831 1796 { 1832 1797 T::Error("Setting reference voltages failed.");
Note:
See TracChangeset
for help on using the changeset viewer.