Changeset 20071 for trunk/FACT++


Ignore:
Timestamp:
04/12/21 18:49:01 (4 years ago)
Author:
tbretz
Message:
Allow for different names in fact and famous.
File:
1 edited

Legend:

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

    r20069 r20071  
    3636class ConnectionFPGAFTM : public Connection
    3737{
     38public:
     39    static bool fIsFACT;
     40
    3841private:
    3942    bool fIsVerbose;
     
    674677};
    675678
     679bool ConnectionFPGAFTM::fIsFACT = true;
     680
    676681// ------------------------------------------------------------------------
    677682
     
    687692    ConnectionDimFPGAFTM(ba::io_service& ioservice, MessageImp &imp) :
    688693        ConnectionFPGAFTM(ioservice, imp),
    689         fDimConfig("FTM_CONTROL/CONFIGURATION",
     694        fDimConfig(fIsFACT?"FPGAFTM_CONTROL/CONFIGURATION":"FTM_CONTROL/CONFIGURATION",
    690695                   "X:1;X:1;C:1;X:1;D:1;C:1;X:1;D:1;C:1;C:1;C:1;S:1;S:1;S:1;I:1;I:1;C:1;S:1",
    691696                   "|firmware[uint64]:Firmware ID"
     
    707712                   "|trg_inhibit_state[uint8]:"
    708713                   "|trg_inhibit_time[5ns]:"),
    709         fDimData("FTM_CONTROL/DATA", "I:1;I:1;I:1;I:1;I:1;S:1;F:1",
     714        fDimData(fIsFACT?"FPGAFTM_CONTROL/DATA":"FTM_CONTROL/DATA", "I:1;I:1;I:1;I:1;I:1;S:1;F:1",
    710715                 "|run_time[10ns]:Absolute Run Time"
    711716                 "|dead_time[10ns]:Measured Dead Time"
     
    10871092public:
    10881093    StateMachineFPGAFTM(ostream &out=cout) :
    1089         StateMachineAsio<T>(out, "FTM_CONTROL"), fFTM(*this, *this)
     1094        StateMachineAsio<T>(out, ConnectionFPGAFTM::fIsFACT?"FPGAFTM_CONTROL":"FTM_CONTROL"),
     1095        fFTM(*this, *this)
    10901096    {
    10911097        // State names
     
    15111517int RunShell(Configuration &conf)
    15121518{
     1519#if BOOST_VERSION < 104600
     1520    const string fname = boost::filesystem::path(conf.GetName()).filename();
     1521#else
     1522    const string fname = boost::filesystem::path(conf.GetName()).filename().string();
     1523#endif
     1524
     1525    ConnectionFPGAFTM::fIsFACT = fname!="ftmctrl";
    15131526    return Main::execute<T, StateMachineFPGAFTM<S, R>>(conf);
    15141527}
Note: See TracChangeset for help on using the changeset viewer.