Changeset 12210
- Timestamp:
- 10/20/11 01:14:57 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/ratescan.cc
r12203 r12210 128 128 return; 129 129 130 if (fCounter<0 || fStatusFTM.second!=FTM::kTakingData)130 if (fCounter<0/* || fStatusFTM.second!=FTM::kTakingData*/) 131 131 return; 132 132 133 133 const FTM::DimTriggerRates &sdata = *static_cast<FTM::DimTriggerRates*>(curr->getData()); 134 134 135 if ( fSeconds++<0)135 if (++fSeconds<0) 136 136 return; 137 137 … … 168 168 sout2 << float(fTriggersPatch[i])/fSeconds << " "; 169 169 sout3 << fSeconds << " "; 170 sout3 << float(sdata.fOnTimeCounter-fOnTimeStart)/fSeconds ;170 sout3 << float(sdata.fOnTimeCounter-fOnTimeStart)/fSeconds/1000000; 171 171 172 172 cout << sout1.str() << sout3.str() << endl; … … 178 178 179 179 fCounter++; 180 fSeconds = -2; 181 182 if (fThresholdMin+fCounter*fThresholdStep>fThresholdMax) 180 181 if (fSeconds>=fSecondsMax || fThresholdMin+fCounter*fThresholdStep>fThresholdMax) 183 182 { 184 183 fCounter = -1; 185 DimClient::sendCommandNB("FTM_CONTROL/STOP_RUN", NULL, 0); 184 cout << "The END" << endl; 185 //DimClient::sendCommandNB("FTM_CONTROL/STOP_RUN", NULL, 0); 186 186 return; 187 187 } 188 189 fSeconds = -2; // FIXME: In principle one missed report is enough 188 190 189 191 const int32_t data[2] = { -1, fThresholdMin+fCounter*fThresholdStep }; … … 223 225 224 226 Message("Starting Trigger (FTM)"); 225 Dim::SendCommand("FTM_CONTROL/SET_PRESCALING", int32_t( 0));227 Dim::SendCommand("FTM_CONTROL/SET_PRESCALING", int32_t(20)); 226 228 Dim::SendCommand("FTM_CONTROL/SET_THRESHOLD", data); 227 Dim::SendCommand("FTM_CONTROL/START_RUN");229 //Dim::SendCommand("FTM_CONTROL/STOP_RUN"); 228 230 229 231 fCounter = 0; … … 237 239 fCounter = -1; 238 240 239 if (fStatusFTM.second==FTM::kTakingData)241 //if (fStatusFTM.second==FTM::kTakingData) 240 242 { 241 243 Message("Stopping FTM"); 242 Dim::SendCommand("FTM_CONTROL/STOP_RUN");244 //Dim::SendCommand("FTM_CONTROL/STOP_RUN"); 243 245 } 244 246 … … 273 275 fDim("DIS_DNS/VERSION_NUMBER", (void*)NULL, 0, this), 274 276 fFTM("FTM_CONTROL/STATE", (void*)NULL, 0, this), 275 fRates("FTM_CONTROL/TRIGGER_RATES", (void*)NULL, 0, this) 277 fRates("FTM_CONTROL/TRIGGER_RATES", (void*)NULL, 0, this), 278 fCounter(-1) 276 279 { 277 280 // ba::io_service::work is a kind of keep_alive for the loop. … … 355 358 }*/ 356 359 357 fThresholdMin = 100; 358 fThresholdMax = 1000; 359 fThresholdStep = 25; 360 fThresholdMin = 0; 361 fThresholdMax = 100; 362 fThresholdStep = 1; 363 360 364 fSecondsMax = 150; 361 365 fResolution = 0.05;
Note:
See TracChangeset
for help on using the changeset viewer.