Changeset 19697 for trunk/Mars


Ignore:
Timestamp:
09/27/19 21:54:32 (5 years ago)
Author:
tbretz
Message:
Added a function to shift the signal.
Location:
trunk/Mars/melectronics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/melectronics/MAnalogSignal.cc

    r19693 r19697  
    148148    return rc;
    149149}
     150
     151void MAnalogSignal::ShiftSignal(Double_t shift)
     152{
     153    Float_t *arr = GetArray();
     154    for (UInt_t i=0; i<fN; i++)
     155        arr[i] += shift;
     156}
     157
    150158
    151159// ------------------------------------------------------------------------
  • trunk/Mars/melectronics/MAnalogSignal.h

    r19693 r19697  
    2323    void   AddSignal(const MAnalogSignal &s, Int_t delay=0,Float_t dampingFact=1.0);
    2424    void   CopySignal(const MAnalogSignal &s);
     25    void   ShiftSignal(Double_t s);
    2526
    2627    // Deprecated. Use MSimRandomPhotons instead
Note: See TracChangeset for help on using the changeset viewer.