- Timestamp:
- 07/19/11 19:54:39 (13 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Connection.h
r11370 r11471 2 2 #define FACT_Connection 3 3 4 #include <array> 4 5 #include <deque> 5 6 #include <string> … … 118 119 119 120 template<typename T, size_t N> 120 void PostMessage(const boost::array<T, N> &msg)121 void PostMessage(const std::array<T, N> &msg) 121 122 { 122 123 PostMessage(msg.begin(), msg.size()*sizeof(T)); -
trunk/FACT++/src/ConnectionUSB.h
r11314 r11471 2 2 #define FACT_Connection 3 3 4 #include <array> 4 5 #include <deque> 5 6 #include <string> … … 81 82 82 83 template<typename T, size_t N> 83 void PostMessage(const boost::array<T, N> &msg)84 void PostMessage(const std::array<T, N> &msg) 84 85 { 85 86 PostMessage(msg.begin(), msg.size()*sizeof(T)); -
trunk/FACT++/src/EventBuilderWrapper.h
r11467 r11471 1542 1542 1543 1543 1544 boost::array<FAD::EventHeader, 40> fVecHeader;1544 array<FAD::EventHeader, 40> fVecHeader; 1545 1545 1546 1546 template<typename T> 1547 boost::array<T, 42> Compare(const FAD::EventHeader *h, const T *t)1547 array<T, 42> Compare(const FAD::EventHeader *h, const T *t) 1548 1548 { 1549 1549 const int offset = reinterpret_cast<const char *>(t) - reinterpret_cast<const char *>(h); … … 1553 1553 const T *max = NULL; 1554 1554 1555 boost::array<T, 42> vec;1555 array<T, 42> vec; 1556 1556 1557 1557 bool rc = true; … … 1593 1593 1594 1594 template<typename T> 1595 boost::array<T, 42> CompareBits(const FAD::EventHeader *h, const T *t)1595 array<T, 42> CompareBits(const FAD::EventHeader *h, const T *t) 1596 1596 { 1597 1597 const int offset = reinterpret_cast<const char *>(t) - reinterpret_cast<const char *>(h); … … 1600 1600 T rc = 0; 1601 1601 1602 boost::array<T, 42> vec;1602 array<T, 42> vec; 1603 1603 1604 1604 bool first = true; … … 1634 1634 1635 1635 template<typename T, size_t N> 1636 void Update(DimDescribedService &svc, const boost::array<T, N> &data, int n=N)1636 void Update(DimDescribedService &svc, const array<T, N> &data, int n=N) 1637 1637 { 1638 1638 // svc.setQuality(vec[40]<=vec[41]); … … 1642 1642 1643 1643 template<typename T> 1644 void Print(const char *name, const pair<bool, boost::array<T, 43>> &data)1644 void Print(const char *name, const pair<bool,array<T, 43>> &data) 1645 1645 { 1646 1646 cout << name << "|" << data.first << "|" << data.second[1] << "|" << data.second[0] << "<x<" << data.second[1] << ":"; … … 1672 1672 if (old.fVersion != h.fVersion || changed) 1673 1673 { 1674 const boost::array<uint16_t,42> ver = Compare(&h, &h.fVersion);1675 1676 boost::array<float,42> data;1674 const array<uint16_t,42> ver = Compare(&h, &h.fVersion); 1675 1676 array<float,42> data; 1677 1677 for (int i=0; i<42; i++) 1678 1678 { … … 1686 1686 if (old.fRunNumber != h.fRunNumber || changed) 1687 1687 { 1688 const boost::array<uint32_t,42> run = Compare(&h, &h.fRunNumber);1688 const array<uint32_t,42> run = Compare(&h, &h.fRunNumber); 1689 1689 fDimRunNumber.Update(run); 1690 1690 } … … 1692 1692 if (old.fTriggerGeneratorPrescaler != h.fTriggerGeneratorPrescaler || changed) 1693 1693 { 1694 const boost::array<uint16_t,42> pre = Compare(&h, &h.fTriggerGeneratorPrescaler);1694 const array<uint16_t,42> pre = Compare(&h, &h.fTriggerGeneratorPrescaler); 1695 1695 fDimPrescaler.Update(pre); 1696 1696 } … … 1698 1698 if (old.fDNA != h.fDNA || changed) 1699 1699 { 1700 const boost::array<uint64_t,42> dna = Compare(&h, &h.fDNA);1700 const array<uint64_t,42> dna = Compare(&h, &h.fDNA); 1701 1701 Update(fDimDNA, dna, 40); 1702 1702 } … … 1704 1704 if (old.fStatus != h.fStatus || changed) 1705 1705 { 1706 const boost::array<uint16_t,42> sts = CompareBits(&h, &h.fStatus);1706 const array<uint16_t,42> sts = CompareBits(&h, &h.fStatus); 1707 1707 Update(fDimStatus, sts); 1708 1708 } … … 1719 1719 // --- RefClock 1720 1720 1721 const boost::array<uint32_t,42> clk = Compare(&h, &h.fFreqRefClock);1721 const array<uint32_t,42> clk = Compare(&h, &h.fFreqRefClock); 1722 1722 Update(fDimRefClock, clk); 1723 1723 1724 1724 // --- Temperatures 1725 1725 1726 const boost::array<int16_t,42> tmp[4] =1726 const array<int16_t,42> tmp[4] = 1727 1727 { 1728 1728 Compare(&h, &h.fTempDrs[0]), … … 1741 1741 for (int j=0; j<=3; j++) 1742 1742 { 1743 const boost::array<int16_t,42> &ref = tmp[j];1743 const array<int16_t,42> &ref = tmp[j]; 1744 1744 1745 1745 // Gloabl min -
trunk/FACT++/src/drivectrl.cc
r11264 r11471 1 1 #include <boost/bind.hpp> 2 #include <boost/array.hpp>3 2 #include <boost/asio/error.hpp> 4 3 #include <boost/asio/deadline_timer.hpp> … … 122 121 // ... 123 122 124 virtual void UpdatePointing(const Time &, const boost::array<double, 2> &)125 { 126 } 127 128 virtual void UpdateTracking(const Time &, const boost::array<double, 7> &)123 virtual void UpdatePointing(const Time &, const array<double, 2> &) 124 { 125 } 126 127 virtual void UpdateTracking(const Time &, const array<double, 7> &) 129 128 { 130 129 } … … 377 376 fState = status1==1 ? armed+1 : status1; 378 377 379 const boost::array<double, 2> point = {{ zd2, az2 }};378 const array<double, 2> point = {{ zd2, az2 }}; 380 379 UpdatePointing(t1, point); 381 380 382 const boost::array<double, 7> track =381 const array<double, 7> track = 383 382 {{ 384 383 ra, dec, ha, … … 536 535 537 536 template<size_t N> 538 void Update(DimDescribedService &svc, const Time &t, const boost::array<double, N> &arr) const537 void Update(DimDescribedService &svc, const Time &t, const array<double, N> &arr) const 539 538 { 540 539 svc.setTimestamp(int(t.UnixTime()), t.ms()); … … 544 543 545 544 virtual void UpdatePointing(const Time &t, 546 const boost::array<double, 2> &arr)545 const array<double, 2> &arr) 547 546 { 548 547 Update(fDimPointing, t, arr); … … 550 549 551 550 virtual void UpdateTracking(const Time &t, 552 const boost::array<double, 7> &arr)551 const array<double, 7> &arr) 553 552 { 554 553 Update(fDimTracking, t, arr); -
trunk/FACT++/src/ftmctrl.cc
r11465 r11471 1 1 #include <boost/bind.hpp> 2 #include < boost/array.hpp>2 #include <array> 3 3 #include <boost/asio/error.hpp> 4 4 #include <boost/asio/deadline_timer.hpp> … … 433 433 434 434 template<size_t N> 435 void PostCmd( boost::array<uint16_t, N> dat, uint16_t u1=0, uint16_t u2=0, uint16_t u3=0, uint16_t u4=0)436 { 437 boost::array<uint16_t, 5> cmd = {{ '@', u1, u2, u3, u4 }};435 void PostCmd(array<uint16_t, N> dat, uint16_t u1=0, uint16_t u2=0, uint16_t u3=0, uint16_t u4=0) 436 { 437 array<uint16_t, 5> cmd = {{ '@', u1, u2, u3, u4 }}; 438 438 439 439 ostringstream msg; … … 457 457 void PostCmd(vector<uint16_t> dat, uint16_t u1=0, uint16_t u2=0, uint16_t u3=0, uint16_t u4=0) 458 458 { 459 boost::array<uint16_t, 5> cmd = {{ '@', u1, u2, u3, u4 }};459 array<uint16_t, 5> cmd = {{ '@', u1, u2, u3, u4 }}; 460 460 461 461 ostringstream msg; … … 479 479 void PostCmd(uint16_t u1=0, uint16_t u2=0, uint16_t u3=0, uint16_t u4=0) 480 480 { 481 PostCmd( boost::array<uint16_t, 0>(), u1, u2, u3, u4);481 PostCmd(array<uint16_t, 0>(), u1, u2, u3, u4); 482 482 } 483 483 public: … … 541 541 void CmdTakeNevents(uint32_t n) 542 542 { 543 const boost::array<uint16_t, 2> data = {{ uint16_t(n>>16), uint16_t(n&0xffff) }};543 const array<uint16_t, 2> data = {{ uint16_t(n>>16), uint16_t(n&0xffff) }}; 544 544 PostCmd(data, FTM::kCmdStartRun, FTM::kTakeNevents); 545 545 … … 553 553 return false; 554 554 555 const boost::array<uint16_t, 2> data = {{ addr, val }};555 const array<uint16_t, 2> data = {{ addr, val }}; 556 556 PostCmd(data, FTM::kCmdWrite, FTM::kCmdRegister); 557 557 … … 570 570 return false; 571 571 572 const boost::array<uint16_t, 1> data = {{ addr }};572 const array<uint16_t, 1> data = {{ addr }}; 573 573 PostCmd(data, FTM::kCmdRead, FTM::kCmdRegister); 574 574 … … 1460 1460 return T::kSM_FatalError; 1461 1461 1462 const map<uint16_t, boost::array<uint64_t, 8>>::const_iterator it =1462 const map<uint16_t,array<uint64_t, 8>>::const_iterator it = 1463 1463 fClockCondSetup.find(evt.GetUShort()); 1464 1464 … … 1969 1969 } 1970 1970 1971 map<uint16_t, boost::array<uint64_t, 8>> fClockCondSetup;1971 map<uint16_t, array<uint64_t, 8>> fClockCondSetup; 1972 1972 1973 1973 template<class V> … … 2027 2027 } 2028 2028 2029 boost::array<uint64_t, 8> &arr = fClockCondSetup[*it];2029 array<uint64_t, 8> &arr = fClockCondSetup[*it]; 2030 2030 2031 2031 arr[0] = conf.GetDef<Hex<uint32_t>>("clock-conditioner.R0.", *it);
Note:
See TracChangeset
for help on using the changeset viewer.