- Timestamp:
- 10/23/11 14:37:55 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/ratescan.cc
r12237 r12238 169 169 reference = fTriggersPatch[fReferenceIdx]; 170 170 171 if ( sqrt(reference)>fResolution*reference&& fSeconds<fSecondsMax)171 if ((reference==0 || sqrt(reference)>fResolution*reference) && fSeconds<fSecondsMax) 172 172 { 173 173 ostringstream out; … … 176 176 out << " (" << sqrt(reference)/reference << ")"; 177 177 Info(out); 178 178 179 return; 179 180 } … … 238 239 } 239 240 240 int StartRateScan() 241 { 241 int StartRateScan(const EventImp &evt) 242 { 243 if (!CheckEventSize(evt.GetSize(), "StartRateScan", 12)) 244 return kSM_FatalError; 245 246 fThresholdMin = evt.Get<uint32_t>(); 247 fThresholdMax = evt.Get<uint32_t>(4); 248 fThresholdStep = evt.Get<uint32_t>(8); 249 242 250 ofstream fout("ratescan.txt", ios::app); 243 251 fout << "# ----- " << Time() << " -----" << endl; … … 257 265 258 266 Message("Starting Trigger (FTM)"); 259 Dim::SendCommand("FTM_CONTROL/SET_PRESCALING", int32_t(20));267 //Dim::SendCommand("FTM_CONTROL/SET_PRESCALING", int32_t(20)); 260 268 Dim::SendCommand("FTM_CONTROL/SET_THRESHOLD", data); 261 269 //Dim::SendCommand("FTM_CONTROL/STOP_RUN"); … … 371 379 "Rate scan in progress."); 372 380 373 AddEvent("START", kStateConnected) 374 (bind(&StateMachineRateScan::StartRateScan, this)) 375 (""); 376 377 AddEvent("START", kStateConnected) 378 (bind(&StateMachineRateScan::StartRateScan, this)) 379 (""); 381 AddEvent("START", "I:3", kStateConnected) 382 (bind(&StateMachineRateScan::StartRateScan, this, placeholders::_1)) 383 ("Start rate scan for the defined range" 384 "|min[int]:Start value in DAC counts" 385 "|max[int]:Limiting value in DAC counts" 386 "|step[int]:Single step in DAC counts"); 380 387 381 388 AddEvent("STOP", kStateInProgress) … … 428 435 // "|verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data"); 429 436 */ 437 /* 438 AddEvent("SET_RANGE", "I:3") 439 (bind(&StateMachineRateScan::SetRange, this, placeholders::_1)) 440 ("Set raneg for ratescane" 441 "|min[int]:Start value in DAC counts" 442 "|max[int]:Limiting value in DAC counts" 443 "|step[int]:Single step in DAC counts"); 444 */ 430 445 AddEvent("PRINT") 431 446 (bind(&StateMachineRateScan::Print, this)) … … 441 456 return 1; 442 457 }*/ 443 444 fThresholdMin = 0;445 fThresholdMax = 100;446 fThresholdStep = 1;447 458 448 459 fSecondsMax = 150;
Note:
See TracChangeset
for help on using the changeset viewer.