Changeset 17672


Ignore:
Timestamp:
04/16/14 21:07:29 (11 years ago)
Author:
tbretz
Message:
Replaced one agilentctrl by three; fixed the calculatio of the power; display all pixels, and use ch8 at TM channel
File:
1 edited

Legend:

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

    r17520 r17672  
    536536    DimDescribedState fDimFscControl;
    537537    DimDescribedState fDimGpsControl;
    538     DimDescribedState fDimAgilentControl;
     538    DimDescribedState fDimAgilentControl24;
     539    DimDescribedState fDimAgilentControl50;
     540    DimDescribedState fDimAgilentControl80;
    539541    DimDescribedState fDimPwrControl;
    540542    DimDescribedState fDimLidControl;
     
    10991101                double UdrpApd = (R5+2000)*Iout;  // Voltage seen by G-APD
    11001102
    1101                 const double pwrCam = Iapd * (fBiasControlVoltageVec[i]-UdrpCam);
    1102                 const double pwrApd = Iapd * (fBiasControlVoltageVec[i]-UdrpApd);
     1103                const double pwrCam = Iout * (fBiasControlVoltageVec[i]-UdrpCam);
     1104                const double pwrApd = Iout * (fBiasControlVoltageVec[i]-UdrpApd);
    11031105
    11041106                // Total power participated in the camera at the G-APD
     
    18751877    }
    18761878
    1877     int HandleAgilentData(const EventImp &d)
    1878     {
    1879         if (!CheckDataSize(d, "Agilent:Data", 4*sizeof(float)))
     1879    int HandleAgilentData(const EventImp &d, const string &ext)
     1880    {
     1881        if (!CheckDataSize(d, "Agilent"+ext+":Data", 4*sizeof(float)))
    18801882            return GetCurrentState();
    18811883
     
    18921894        out << HTML::kWhite << '\t' << data[3] << '\n';
    18931895
    1894         ofstream(fPath+"/agilent.data") << out.str();
     1896        ofstream(fPath+"/agilent"+ext+".data") << out.str();
    18951897
    18961898        return GetCurrentState();
     
    20342036        Out() << fDimRateControl    << endl;
    20352037        Out() << fDimFscControl     << endl;
    2036         Out() << fDimAgilentControl << endl;
     2038        Out() << fDimAgilentControl24 << endl;
     2039        Out() << fDimAgilentControl50 << endl;
     2040        Out() << fDimAgilentControl80 << endl;
    20372041        Out() << fDimPwrControl     << endl;
    20382042        Out() << fDimLidControl     << endl;
     
    29472951            out << GetStateHtml(fDimFscControl,     FSC::State::kConnected);
    29482952            out << GetStateHtml(fDimGpsControl,     GPS::State::kConnected);
    2949             out << GetStateHtml(fDimAgilentControl, Agilent::State::kVoltageOff);
     2953            out << GetStateHtml(fDimAgilentControl24, Agilent::State::kVoltageOff);
     2954            out << GetStateHtml(fDimAgilentControl50, Agilent::State::kVoltageOff);
     2955            out << GetStateHtml(fDimAgilentControl80, Agilent::State::kVoltageOff);
    29502956            out << GetStateHtml(fDimPwrControl,     Power::State::kSystemOff);
    29512957            out << GetStateHtml(fDimLidControl,     Lid::State::kConnected);
     
    30193025        fDimFscControl    ("FSC_CONTROL"),
    30203026        fDimGpsControl    ("GPS_CONTROL"),
    3021         fDimAgilentControl("AGILENT_CONTROL"),
     3027        fDimAgilentControl24("AGILENT_CONTROL_24V"),
     3028        fDimAgilentControl50("AGILENT_CONTROL_50V"),
     3029        fDimAgilentControl80("AGILENT_CONTROL_80V"),
    30223030        fDimPwrControl    ("PWR_CONTROL"),
    30233031        fDimLidControl    ("LID_CONTROL"),
     
    30433051        fDimFscControl.Subscribe(*this);
    30443052        fDimGpsControl.Subscribe(*this);
    3045         fDimAgilentControl.Subscribe(*this);
     3053        fDimAgilentControl24.Subscribe(*this);
     3054        fDimAgilentControl50.Subscribe(*this);
     3055        fDimAgilentControl80.Subscribe(*this);
    30463056        fDimPwrControl.Subscribe(*this);
    30473057        fDimLidControl.Subscribe(*this);
     
    30813091
    30823092        Subscribe("TEMPERATURE/DATA")
    3083             (bind(&StateMachineSmartFACT::HandleTemperatureData,    this, placeholders::_1));
    3084 
    3085         Subscribe("AGILENT_CONTROL/DATA")
    3086             (bind(&StateMachineSmartFACT::HandleAgilentData,        this, placeholders::_1));
     3093            (bind(&StateMachineSmartFACT::HandleTemperatureData,     this, placeholders::_1));
     3094
     3095        Subscribe("AGILENT_CONTROL_24V/DATA")
     3096            (bind(&StateMachineSmartFACT::HandleAgilentData,         this, placeholders::_1, "24"));
     3097        Subscribe("AGILENT_CONTROL_50V/DATA")
     3098            (bind(&StateMachineSmartFACT::HandleAgilentData,         this, placeholders::_1, "50"));
     3099        Subscribe("AGILENT_CONTROL_80V/DATA")
     3100            (bind(&StateMachineSmartFACT::HandleAgilentData,         this, placeholders::_1, "80"));
    30873101
    30883102        Subscribe("MAGIC_WEATHER/DATA")
Note: See TracChangeset for help on using the changeset viewer.