Changeset 11539
- Timestamp:
- 07/22/11 13:05:21 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilderWrapper.h
r11537 r11539 1728 1728 const array<int16_t,42> tmp[4] = 1729 1729 { 1730 Compare(&h, &h.fTempDrs[0]), 1731 Compare(&h, &h.fTempDrs[1]), 1732 Compare(&h, &h.fTempDrs[2]), 1733 Compare(&h, &h.fTempDrs[3]) 1730 Compare(&h, &h.fTempDrs[0]), // 0-39:val, 40:min, 41:max 1731 Compare(&h, &h.fTempDrs[1]), // 0-39:val, 40:min, 41:max 1732 Compare(&h, &h.fTempDrs[2]), // 0-39:val, 40:min, 41:max 1733 Compare(&h, &h.fTempDrs[3]) // 0-39:val, 40:min, 41:max 1734 1734 }; 1735 1735 1736 1736 vector<int16_t> data; 1737 1737 data.reserve(82); 1738 data.push_back(tmp[0][ 0]);1739 data.insert(data.end(), tmp[0].data() +2, tmp[0].data()+42);1740 data.push_back(tmp[0][ 1]);1741 data.insert(data.end(), tmp[0].data() +2, tmp[0].data()+42);1738 data.push_back(tmp[0][40]); // min: 0 1739 data.insert(data.end(), tmp[0].data(), tmp[0].data()+40); // val: 1-40 1740 data.push_back(tmp[0][41]); // max: 41 1741 data.insert(data.end(), tmp[0].data(), tmp[0].data()+40); // val: 42-81 1742 1742 1743 1743 for (int j=0; j<=3; j++) … … 1746 1746 1747 1747 // Gloabl min 1748 if (ref[40]<data[0]) 1748 if (ref[40]<data[0]) // 40=min 1749 1749 data[0] = ref[40]; 1750 1750 1751 1751 // Global max 1752 if (ref[41]>data[40]) 1752 if (ref[41]>data[40]) // 41=max 1753 1753 data[40] = ref[41]; 1754 1754 1755 for (int i=0; i<40; i++) 1755 for (int i=0; i<40; i++) 1756 1756 { 1757 1757 // min per board 1758 if (ref[i]<data[ j+1])1759 data[ j+1] = ref[i];1758 if (ref[i]<data[i+1]) // data: 1-40 1759 data[i+1] = ref[i]; // ref: 0-39 1760 1760 1761 1761 // max per board 1762 if (ref[i]>data[ j+41])1763 data[ j+41] = ref[i];1762 if (ref[i]>data[i+42]) // data: 42-81 1763 data[i+42] = ref[i]; // ref: 0-39 1764 1764 } 1765 1765 } 1766 1766 1767 vector<float> deg(82); 1768 for (int i=0; i<82; i++) 1767 vector<float> deg(82); // 0: global min, 1-40: min 1768 for (int i=0; i<82; i++) // 41: global max, 42-81: max 1769 1769 deg[i] = data[i]/16.; 1770 1770 fDimTemperature.Update(deg);
Note:
See TracChangeset
for help on using the changeset viewer.