Changeset 16577


Ignore:
Timestamp:
06/02/13 15:38:25 (12 years ago)
Author:
tbretz
Message:
Changed again the logic how the scale is calculated.
File:
1 edited

Legend:

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

    r16572 r16577  
    15941594        const uint32_t trig = d.GetQoS() & FAD::EventHeader::kLPext;
    15951595
    1596         switch (fFadControlDrsStep)
    1597         {
    1598         case -1: WriteCam(d, "cam-fadcontrol-eventdata", max, 2,   -1); break; // [-1;+1]
    1599         case  0: WriteCam(d, "cam-fadcontrol-eventdata", max, 2,    0); break; // [ 0;+2]
    1600         case  1: WriteCam(d, "cam-fadcontrol-eventdata", max, 2,   -1); break; // [-1;+1]
    1601         default: WriteCam(d, "cam-fadcontrol-eventdata", max, trig?2:0.25, 0); break; // [ 0;0.25]
    1602         }
     1596        float scale = 2;
     1597        float min   = fFadControlDrsRuns[0]==0 ? -1 : 0;
     1598
     1599        if (trig&FAD::EventHeader::kLPext)
     1600            scale = 1;
     1601        if (trig==0 || (trig&FAD::EventHeader::kPedestal))
     1602            scale = 0.25;
     1603
     1604        // assume it is drs-gain
     1605        //if ((trig&FAD::EventHeader::kPedestal) && fFadControlDrsRuns[0]>0 && fFadControlDrsRuns[1]==0)
     1606        //    min = 0.75;
     1607
     1608        WriteCam(d, "cam-fadcontrol-eventdata", max, scale, min);
    16031609
    16041610        return GetCurrentState();
Note: See TracChangeset for help on using the changeset viewer.