Changeset 13585 for trunk/FACT++


Ignore:
Timestamp:
05/07/12 13:35:53 (13 years ago)
Author:
tbretz
Message:
Added two new states: trigger on and taking data
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/mcp.cc

    r13571 r13585  
    5656        kStateConfiguring3,
    5757        kStateConfigured,
     58        kStateTriggerOn,
     59        kStateTakingData,
    5860//        kStateRunInProgress,
    5961    };
     
    388390                    return GetCurrentState();
    389391
     392                Update(kStateTriggerOn);
     393
     394                return kStateTriggerOn;
     395            }
     396
     397            if (GetCurrentState()==kStateTriggerOn)
     398            {
     399                if (fStatusFTM.second != FAD::kWritingData)
     400                    return GetCurrentState();
     401
     402                Update(kStateTakingData);
     403
     404                return kStateTakingData;
     405            }
     406
     407            if (GetCurrentState()==kStateTakingData)
     408            {
     409                if (fStatusFTM.second==FTM::kTriggerOn && fStatusFAD.second==FAD::kWritingData)
     410                    return kStateTakingData;
     411
    390412                Update(kStateIdle);
    391 
    392                 // Now we are taking data... we could now wait for
    393                 // the fad to go back to -1
    394413            }
    395414
     
    467486
    468487        AddStateName(kStateConfiguring3, "Configuring3",
    469                      "Waiting for FAD to get ready");
     488                     "Waiting for FADs and reate control to get ready");
    470489
    471490        AddStateName(kStateConfigured, "Configured",
    472                      ".");
     491                     "Everything is configured, trigger will be switched on now");
     492
     493        AddStateName(kStateTriggerOn, "TriggerOn",
     494                     "The trigger is switched on, waiting for FAD to receive data");
     495
     496        AddStateName(kStateTakingData, "TakingData",
     497                     "The trigger is switched on, FADs are sending data");
    473498
    474499
Note: See TracChangeset for help on using the changeset viewer.