Changeset 10745


Ignore:
Timestamp:
May 19, 2011, 8:52:00 AM (9 years ago)
Author:
tbretz
Message:
Renamed kTimeMarker to kClockConditioner; fixed Enable/DisablePixel
File:
1 edited

Legend:

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

    r10734 r10745  
    157157            kMaxSequence        = 0x1f,
    158158            kMaxDAC             = 0xfff,
     159            kMaxAddr            = 0xfff,
    159160            kMaxPixelIdx        = 1439,
    160161            kMaskSettings       = 0xf,
     
    171172            kExt1       = 0x04,  ///< External trigger signal 1
    172173            kVeto       = 0x02,  ///< Veto trigger decision / artifical triggers
    173             // -===> ClockCond
    174             kTimeMarker = 0x01,  ///< Select clock conditioner frequency (1) / time marker (0) as output
     174            kClockConditioner = 0x01,  ///< Select clock conditioner frequency (1) / time marker (0) as output
    175175        };
    176176
     
    238238        void EnablePixel(int idx, bool enable)
    239239        {
    240             const int board =  idx%40;
    241             const int patch = (idx/40)/9;
    242             const int pixel = (idx/40)%9;
     240            const int pixel = idx%9;
     241            const int patch = (idx/9)%4;
     242            const int board = (idx/9)/4;
    243243
    244244            uint16_t &pix = fBoard[board/10][board%10].fEnable[patch];
     
    248248            else
    249249                pix &= ~(1<<pixel);
     250        }
     251
     252        bool Enabled(uint16_t idx)
     253        {
     254            const int pixel = idx%9;
     255            const int patch = (idx/9)%4;
     256            const int board = (idx/9)/4;
     257
     258            return (fBoard[board/10][board%10].fEnable[patch]>>pixel)&1;
    250259        }
    251260
     
    296305        bool HasExt1() const        { return fGeneralSettings & StaticData::kExt1; }
    297306        bool HasVeto() const        { return fGeneralSettings & StaticData::kVeto; }
    298         bool HasTimeMarker() const  { return fGeneralSettings & StaticData::kTimeMarker; }
     307        bool HasClockConditioner() const { return fGeneralSettings & StaticData::kClockConditioner; }
    299308
    300309        bool IsActive(int i) const { return fActiveFTU&(uint64_t(1)<<i); }
Note: See TracChangeset for help on using the changeset viewer.