Changeset 13878 for trunk/FACT++/src
- Timestamp:
- 05/24/12 19:14:51 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/smartfact.cc
r13872 r13878 365 365 366 366 float fFtmPatchThresholdMed; 367 float fFtmBoardThresholdMed; 367 368 368 369 bool fFtmControlFtuOk; … … 1120 1121 int HandleFtmStaticData(const EventImp &d) 1121 1122 { 1122 if (!CheckDataSize(d, "FtmControl:StaticData", 740))1123 if (!CheckDataSize(d, "FtmControl:StaticData", sizeof(FTM::DimStaticData))) 1123 1124 return GetCurrentState(); 1124 1125 1125 const uint16_t *ptr = d.Ptr<uint16_t>(260); 1126 vector<uint16_t> vec(ptr, ptr+160); 1127 1128 WriteBinary(d, "ftmcontrol-thresholds", vec, 1000); 1129 1130 const Statistics stat(vec); 1131 1132 fFtmPatchThresholdMed = stat.med; 1126 const FTM::DimStaticData &dat = d.Ref<FTM::DimStaticData>(); 1127 1128 vector<uint16_t> vecp(dat.fThreshold, dat.fThreshold+160); 1129 vector<uint16_t> vecb(dat.fMultiplicity, dat.fMultiplicity+40); 1130 1131 WriteBinary(d, "ftmcontrol-thresholds-patch", vecp, 1000); 1132 WriteBinary(d, "ftmcontrol-thresholds-board", vecb, 1000); 1133 1134 const Statistics statp(vecp); 1135 const Statistics statb(vecb); 1136 1137 fFtmPatchThresholdMed = statp.med; 1138 fFtmBoardThresholdMed = statb.med; 1133 1139 1134 1140 ostringstream out; 1135 1141 out << d.GetJavaDate() << '\n'; 1136 out << kHtmlWhite << '\t' << stat.min << '\n'; 1137 out << kHtmlWhite << '\t' << stat.med << '\n'; 1138 out << kHtmlWhite << '\t' << stat.avg << '\n'; 1139 out << kHtmlWhite << '\t' << stat.max << '\n'; 1142 out << kHtmlWhite << '\t' << statb.min << '\n'; 1143 out << kHtmlWhite << '\t' << statb.med << '\n'; 1144 //out << kHtmlWhite << '\t' << statb.avg << '\n'; 1145 out << kHtmlWhite << '\t' << statb.max << '\n'; 1146 out << kHtmlWhite << '\t' << statp.min << '\n'; 1147 out << kHtmlWhite << '\t' << statp.med << '\n'; 1148 //out << kHtmlWhite << '\t' << statp.avg << '\n'; 1149 out << kHtmlWhite << '\t' << statp.max << '\n'; 1140 1150 ofstream(fPath+"/thresholds.txt") << out.str(); 1151 1152 out.str(""); 1153 out << d.GetJavaDate() << '\n'; 1154 out << kHtmlWhite << '\t' << dat.fTriggerInterval << '\n'; 1155 out << kHtmlWhite << '\t'; 1156 if (dat.HasPedestal()) 1157 out << dat.fTriggerSeqPed; 1158 else 1159 out << "–"; 1160 out << ':'; 1161 if (dat.HasLPext()) 1162 out << dat.fTriggerSeqLPext; 1163 else 1164 out << "–"; 1165 out << ':'; 1166 if (dat.HasLPint()) 1167 out << dat.fTriggerSeqLPint; 1168 else 1169 out << "–"; 1170 out << '\n'; 1171 1172 out << kHtmlWhite << '\t' << (dat.HasTrigger()?"on":"off") << " / " << (dat.HasExt1()?"on":"off") << " / " << (dat.HasExt2()?"on":"off") << '\n'; 1173 out << kHtmlWhite << '\t' << (dat.HasVeto()?"on":"off") << " / " << (dat.HasClockConditioner()?"time cal":"marker") << '\n'; 1174 out << kHtmlWhite << '\t' << dat.fMultiplicityPhysics << " / " << dat.fMultiplicityCalib << '\n'; 1175 out << kHtmlWhite << '\t' << dat.fWindowPhysics << '\t' << dat.fWindowCalib << '\n'; 1176 out << kHtmlWhite << '\t' << dat.fDelayTrigger << '\t' << dat.fDelayTimeMarker << '\n'; 1177 out << kHtmlWhite << '\t' << dat.fDeadTime << '\n'; 1178 1179 int64_t vp = dat.fPrescaling[0]; 1180 for (int i=1; i<40; i++) 1181 if (vp!=dat.fPrescaling[i]) 1182 vp = -1; 1183 1184 if (vp<0) 1185 out << kHtmlYellow << "\tdifferent\n"; 1186 else 1187 out << kHtmlWhite << "\t" << 0.5*vp << "\n"; 1188 1189 ofstream(fPath+"/ftm.txt") << out.str(); 1190 1191 // Active FTUs: IsActive(i) 1192 // Enabled Pix: IsEnabled(i) 1141 1193 1142 1194 return GetCurrentState(); … … 1329 1381 out << setprecision(3); 1330 1382 out << d.GetJavaDate() << '\n'; 1383 out << "#ffffff\t" << fFtmBoardThresholdMed << '\n'; 1331 1384 out << "#ffffff\t" << fFtmPatchThresholdMed << '\n'; 1332 1385 out << "#ffffff\t" << pow(10, fRateScanDataHist[0].back()) << '\n';
Note:
See TracChangeset
for help on using the changeset viewer.