// we have 4 cases: 1) start of a scan 2) first scan 3) first iteration after an error 4) middle of a scan.
// cases 2 and 3 are the same as the scheduler is reset, so the procedure (if not NULL) is retrieved, the components loaded, the backend configured and the transfer enabled
// cases 2 and 3 are the same as the scheduler is reset, so the procedure (if not NULL) is retrieved, the components loaded,
// the backend configured and the transfer enabled
// case 1 : the transfer is disabled, the procedure (if not NULL) retrieved, if it is different from the previous one , component are loaded(if necessary), bck configured and transfer enabled again
// case 4: we are in this case if the currentBackendProcedure is the same of the current subscan...so nothing to do
if(m_lastScanID!=0){//if this is the first scan...nothing to do
// otherwise if current scanid is different from the previous one, or the current scan is consequence of a schedule rewind (to deal with the case just one scan is present in the schedule and it will be executed continuously)