Changeset 16532 for trunk/FACT++


Ignore:
Timestamp:
05/31/13 15:19:27 (11 years ago)
Author:
tbretz
Message:
Renamed state WritingData of fadctrl to RunInProgress
Location:
trunk/FACT++/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/HeadersFAD.h

    r16056 r16532  
    6767            kConfiguring2,
    6868            kConfigured,
    69             kWritingData
     69            kRunInProgress
    7070        };
    7171    }
  • trunk/FACT++/src/fadctrl.cc

    r16106 r16532  
    15731573
    15741574            // FIXME: Rename WritingData to TakingData
    1575             return IsRunInProgress() ? FAD::State::kWritingData : FAD::State::kConnected;
     1575            return IsRunInProgress() ? FAD::State::kRunInProgress : FAD::State::kConnected;
    15761576        }
    15771577
     
    16701670                        "The configuration of all boards was successfully cross checked. Waiting for events with a new run number to receive.");
    16711671
    1672         T::AddStateName(FAD::State::kWritingData, "WritingData",
    1673                         "The event builder has an open file which belongs to the last run started (that does not mean that new events are currently received)");
     1672        T::AddStateName(FAD::State::kRunInProgress, "RunInProgress",
     1673                        "Events currently received by the event builder will be flagged to be written, no end-of-run event occured yet.");
    16741674
    16751675        // FAD Commands
    1676         T::AddEvent("SEND_CMD", "I:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1676        T::AddEvent("SEND_CMD", "I:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    16771677            (bind(&StateMachineFAD::SendCmd, this, placeholders::_1))
    16781678            ("Send a command to the FADs. Values between 0 and 0xffff are allowed."
    16791679             "|command[uint16]:Command to be transmittted.");
    1680         T::AddEvent("SEND_DATA", "I:2", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1680        T::AddEvent("SEND_DATA", "I:2", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    16811681            (bind(&StateMachineFAD::SendCmdData, this, placeholders::_1))
    16821682            ("Send a command with data to the FADs. Values between 0 and 0xffff are allowed."
     
    16841684             "|data[uint16]:Data to be sent with the command.");
    16851685
    1686         T::AddEvent("ENABLE_SRCLK", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1686        T::AddEvent("ENABLE_SRCLK", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    16871687            (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdSrclk))
    16881688            ("Set SRCLK");
    1689         T::AddEvent("ENABLE_BUSY_OFF", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1689        T::AddEvent("ENABLE_BUSY_OFF", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    16901690            (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdBusyOff))
    16911691            ("Set BUSY continously low");
    1692         T::AddEvent("ENABLE_BUSY_ON", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1692        T::AddEvent("ENABLE_BUSY_ON", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    16931693            (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdBusyOn))
    16941694            ("Set BUSY constantly high (has priority over BUSY_OFF)");
    1695         T::AddEvent("ENABLE_SCLK", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1695        T::AddEvent("ENABLE_SCLK", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    16961696            (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdSclk))
    16971697            ("Set SCLK");
    1698         T::AddEvent("ENABLE_DRS", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1698        T::AddEvent("ENABLE_DRS", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    16991699            (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdDrsEnable))
    17001700            ("Switch Domino wave");
    1701         T::AddEvent("ENABLE_DWRITE", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1701        T::AddEvent("ENABLE_DWRITE", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    17021702            (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdDwrite))
    17031703            ("Set Dwrite (possibly high / always low)");
    1704         T::AddEvent("ENABLE_CONTINOUS_TRIGGER", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1704        T::AddEvent("ENABLE_CONTINOUS_TRIGGER", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    17051705            (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdContTrigger))
    17061706            ("Enable continous (internal) trigger.");
    1707         T::AddEvent("ENABLE_TRIGGER_LINE", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1707        T::AddEvent("ENABLE_TRIGGER_LINE", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    17081708            (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdTriggerLine))
    17091709            ("Incoming triggers can be accepted/will not be accepted");
    1710         T::AddEvent("ENABLE_COMMAND_SOCKET_MODE", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1710        T::AddEvent("ENABLE_COMMAND_SOCKET_MODE", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    17111711            (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdSocket))
    17121712            ("Set debug mode (yes: dump events through command socket, no=dump events through other sockets)");
    17131713
    1714         T::AddEvent("SET_TRIGGER_RATE", "I:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1714        T::AddEvent("SET_TRIGGER_RATE", "I:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    17151715            (bind(&StateMachineFAD::SetTriggerRate, this, placeholders::_1))
    17161716            ("Enable continous trigger");
     
    17181718            (bind(&StateMachineFAD::Trigger, this, 1))
    17191719            ("Issue software triggers");
    1720         T::AddEvent("SEND_N_TRIGGERS", "I", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1720        T::AddEvent("SEND_N_TRIGGERS", "I", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    17211721            (bind(&StateMachineFAD::SendTriggers, this, placeholders::_1))
    17221722            ("Issue N software triggers (note that these are the triggers sent, not the triggers executed)"
    17231723             "|N[int]: Number of triggers to be sent to the board.");
    17241724        /*
    1725         T::AddEvent("START_RUN", "", FAD::kConnecting, FAD::kConnected, FAD::kWritingData)
     1725        T::AddEvent("START_RUN", "", FAD::kConnecting, FAD::kConnected, FAD::kRunInProgress)
    17261726            (bind(&StateMachineFAD::StartRun, this, placeholders::_1, true))
    17271727            ("Set FAD DAQ mode. when started, no configurations must be send.");
    1728         T::AddEvent("STOP_RUN", FAD::kConnecting, FAD::kConnected, FAD::kWritingData)
     1728        T::AddEvent("STOP_RUN", FAD::kConnecting, FAD::kConnected, FAD::kRunInProgress)
    17291729            (bind(&StateMachineFAD::StartRun, this, placeholders::_1, false))
    17301730            ("");
    17311731            */
    1732         T::AddEvent("PHASE_SHIFT", "S:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1732        T::AddEvent("PHASE_SHIFT", "S:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    17331733            (bind(&StateMachineFAD::PhaseShift, this, placeholders::_1))
    17341734            ("Adjust ADC phase (in 'steps')"
    17351735             "|phase[short]");
    17361736
    1737         T::AddEvent("RESET_EVENT_COUNTER", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1737        T::AddEvent("RESET_EVENT_COUNTER", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    17381738            (bind(&StateMachineFAD::Cmd, this, FAD::kCmdResetEventCounter))
    17391739            ("Reset the FAD boards' event counter to 0.");
    17401740
    1741         T::AddEvent("SET_RUN_NUMBER", "X:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1741        T::AddEvent("SET_RUN_NUMBER", "X:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    17421742            (bind(&StateMachineFAD::SetRunNumber, this, placeholders::_1))
    17431743            ("Sent a new run-number to the boards"
     
    17491749             "|memory[short]:Buffer size in Mega-bytes.");
    17501750
    1751         T::AddEvent("SET_REGISTER", "I:2", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1751        T::AddEvent("SET_REGISTER", "I:2", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    17521752            (bind(&StateMachineFAD::SetRegister, this, placeholders::_1))
    17531753            ("set register to value"
     
    17561756
    17571757        // FIXME:  Maybe add a mask which channels should be set?
    1758         T::AddEvent("SET_REGION_OF_INTEREST", "I:2", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1758        T::AddEvent("SET_REGION_OF_INTEREST", "I:2", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    17591759            (bind(&StateMachineFAD::SetRoi, this, placeholders::_1))
    17601760            ("Set region-of-interest to value"
     
    17631763
    17641764        // FIXME:  Maybe add a mask which channels should be set?
    1765         T::AddEvent("SET_DAC_VALUE", "I:2", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1765        T::AddEvent("SET_DAC_VALUE", "I:2", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    17661766            (bind(&StateMachineFAD::SetDac, this, placeholders::_1))
    17671767            ("Set DAC numbers in range to value"
     
    17691769            "|val[short]:Value to be set");
    17701770
    1771         T::AddEvent("CONFIGURE", "X:2;C", FAD::State::kConnected, FAD::State::kConfigured, FAD::State::kWritingData)
     1771        T::AddEvent("CONFIGURE", "X:2;C", FAD::State::kConnected, FAD::State::kConfigured, FAD::State::kRunInProgress)
    17721772            (bind(&StateMachineFAD::StartConfigure, this, placeholders::_1))
    17731773            ("Configure a new run. If the internla trigger is enabled this might even start a new run."
     
    18321832             "|enable[bool]:Whether the event builder should ignore data from this slot (yes) or allowed (no)");
    18331833
    1834         T::AddEvent("CLOSE_OPEN_FILES", FAD::State::kDisconnected, FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1834        T::AddEvent("CLOSE_OPEN_FILES", FAD::State::kDisconnected, FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    18351835            (bind(&StateMachineFAD::CloseOpenFiles, this))
    18361836            ("Close all run files opened by the EventBuilder.");
     
    18471847            ("Start EventBuilder thread and connect all valid slots.");
    18481848
    1849         T::AddEvent("STOP",  FAD::State::kDisconnected, FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1849        T::AddEvent("STOP",  FAD::State::kDisconnected, FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    18501850            (bind(&StateMachineFAD::StopConnection, this))
    18511851            ("Stop EventBuilder thread (still write buffered events) and disconnect all slots.");
    18521852
    1853         T::AddEvent("ABORT", FAD::State::kDisconnected, FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kWritingData)
     1853        T::AddEvent("ABORT", FAD::State::kDisconnected, FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
    18541854            (bind(&StateMachineFAD::AbortConnection, this))
    18551855            ("Immediately abort EventBuilder thread and disconnect all slots.");
    18561856
    1857         T::AddEvent("SOFT_RESET", FAD::State::kConnected, FAD::State::kWritingData)
     1857        T::AddEvent("SOFT_RESET", FAD::State::kConnected, FAD::State::kRunInProgress)
    18581858            (bind(&StateMachineFAD::Reset, this, true))
    18591859            ("Wait for buffers to drain, close all files and reinitialize event builder thread.");
    18601860
    1861         T::AddEvent("HARD_RESET", FAD::State::kConnected, FAD::State::kWritingData)
     1861        T::AddEvent("HARD_RESET", FAD::State::kConnected, FAD::State::kRunInProgress)
    18621862            (bind(&StateMachineFAD::Reset, this, false))
    18631863            ("Free all buffers, close all files and reinitialize event builder thread.");
  • trunk/FACT++/src/mcp.cc

    r16527 r16532  
    403403            }
    404404
    405             if (fDimFAD.state() != FAD::State::kWritingData)
     405            if (fDimFAD.state() != FAD::State::kRunInProgress)
    406406                return MCP::State::kTriggerOn;
    407407
     
    415415        {
    416416            if (/*fDimFTM.state()==FTM::State::kTriggerOn &&*/
    417                 fDimFAD.state()==FAD::State::kWritingData)
     417                fDimFAD.state()==FAD::State::kRunInProgress)
    418418                return MCP::State::kTakingData;
    419419
  • trunk/FACT++/src/smartfact.cc

    r16282 r16532  
    21802180                if (hrz.zd<65)
    21812181                    col = HTML::kYellow;
    2182                 if (hrz.zd<30)
     2182                if (hrz.zd<30)                                                                  #
    21832183                    col = HTML::kGreen;
    21842184
     
    24382438            case MCP::State::kTakingData:
    24392439                col = HTML::kBlue;
    2440                 if (fDimFadControl.state()==FAD::State::kWritingData)
     2440                if (fDimFadControl.state()==FAD::State::kRunInProgress)
    24412441                    col = HTML::kGreen;
    24422442                break;
Note: See TracChangeset for help on using the changeset viewer.