Changeset 10727


Ignore:
Timestamp:
05/17/11 16:05:30 (13 years ago)
Author:
tbretz
Message:
Some fixes about LPext and LPint; DimStaticData::fEnable is now 90 not 80.
File:
1 edited

Legend:

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

    r10721 r10727  
    685685            return false;
    686686
    687 
    688687        bool ident = true;
    689688        for (int i=0; i<40; i++)
     
    795794        const uint16_t oldseq = fStaticData.fTriggerSequence;
    796795
     796        if (d[0]>FTM::StaticData::kMaxSequence ||
     797            d[1]>FTM::StaticData::kMaxSequence ||
     798            d[2]>FTM::StaticData::kMaxSequence)
     799            return false;
     800
    797801        fStaticData.Enable(FTM::StaticData::kPedestal, d[0]>0);
    798802        fStaticData.Enable(FTM::StaticData::kLPext,    d[1]>0);
    799803        fStaticData.Enable(FTM::StaticData::kLPint,    d[2]>0);
    800804
    801         if (d[0]>FTM::StaticData::kMaxSequence ||
    802             d[1]>FTM::StaticData::kMaxSequence ||
    803             d[2]>FTM::StaticData::kMaxSequence)
    804             return false;
    805 
    806805        fStaticData.fTriggerSequence =
    807             (uint16_t(d[0])<<10) | (uint16_t(d[1])<<5) | uint16_t(d[2]);
     806            (uint16_t(d[0])<<10) | (uint16_t(d[2])<<5) | uint16_t(d[1]);
    808807
    809808        if (oldseq!=fStaticData.fTriggerSequence || oldset!=fStaticData.fGeneralSettings)
     
    974973        fDimError         ("FTM_CONTROL/ERROR",           "X:1;S:1;S:28", ""),
    975974        fDimFtuList       ("FTM_CONTROL/FTU_LIST",        "X:1;X:1;S:1;C:4;X:40;C:40;C:40",  ""),
    976         fDimStaticData    ("FTM_CONTROL/STATIC_DATA",     "X:1;S:1;S:1;X:1;S:1;S:3;S:1;S:1;S:1;S:1;S:1;S:1;I:1;S:8;S:80;S:160;S:40;S:40", ""),
     975        fDimStaticData    ("FTM_CONTROL/STATIC_DATA",     "X:1;S:1;S:1;X:1;S:1;S:3;S:1;S:1;S:1;S:1;S:1;S:1;I:1;S:8;S:90;S:160;S:40;S:40", ""),
    977976        fDimDynamicData   ("FTM_CONTROL/DYNAMIC_DATA",    "X:1;X:1;F:4;I:160;I:40;S:40;S:40", ""),
    978977        fDimCounter       ("FTM_CONTROL/COUNTER",         "I:6", "")
     
    12341233            return T::kSM_FatalError;
    12351234
    1236         if (!fFTM.SetPrescaling(evt.GetInt()))
     1235        if (!fFTM.SetPrescaling(evt.GetInt()-1))
    12371236            T::Warn("SetPrescaling -  Value out of range.");
    12381237
     
    15811580
    15821581        fFTM.StartConnect();
    1583     }
    1584 
    1585         /// Just for test purpose, do not touch
    1586     int Test(const Event &evt)
    1587     {
    1588         const Converter conv(T::Out(), evt.GetFormat(), false);
    1589         T::Out() << kBlue << evt.GetName();
    1590         T::Out() << " " << conv.GetString(evt.GetData(), evt.GetSize());
    1591         T::Out() << endl;
    1592 
    1593         return T::GetCurrentState();
    15941582    }
    15951583
Note: See TracChangeset for help on using the changeset viewer.