/* * ProfilerPlaneSlice.cpp * * Created on: Oct 14, 2015 * Author: Hovanes Egiyan */ #include "ProfilerPlaneSlice.hh" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; // Main constructor ProfilerPlaneSlice::ProfilerPlaneSlice( const std::string name, const std::vector& xAxis, const std::vector& yAxis ) : MutexedClass(), ppsName( name ), ppsAxis( xAxis ), ppsValues( yAxis ), ppsAmpl(), ppsMean(), ppsWidth(), ppsSignal(), ppsBkg(), ppsBkgSlope(), ppsAmplErr(), ppsMeanErr(), ppsWidthErr(), ppsSignalErr(), ppsBkgErr(), ppsBkgSlopeErr(), ppsSum( accumulate( yAxis.begin(), yAxis.end(), 0.0 ) ) { return; } // Copy constructor ProfilerPlaneSlice::ProfilerPlaneSlice( const ProfilerPlaneSlice& p ) : MutexedClass(), ppsName( p.ppsName ), ppsAmpl( p.ppsAmpl ), ppsMean( p.ppsMean ), ppsWidth( p.ppsWidth ), ppsSignal( p.ppsSignal ), ppsBkg( p.ppsBkg ), ppsBkgSlope( p.ppsBkgSlope ), ppsAmplErr( p.ppsAmplErr ), ppsMeanErr( p.ppsMeanErr ), ppsWidthErr( p.ppsWidthErr ), ppsSignalErr( p.ppsSignalErr ), ppsBkgErr( p.ppsBkgErr ), ppsBkgSlopeErr( p.ppsBkgSlopeErr ), ppsSum( p.ppsSum ) { return; } // destructor ProfilerPlaneSlice::~ProfilerPlaneSlice() { return; } //Assignment operator ProfilerPlaneSlice& ProfilerPlaneSlice::operator =( const ProfilerPlaneSlice& p ) { MtxLock objLock( mcMutex ); ppsName = p.ppsName; ppsMean = p.ppsMean; ppsWidth = p.ppsWidth; ppsAmpl = p.ppsAmpl; ppsSignal = p.ppsSignal; ppsBkg = p.ppsBkg; ppsBkgSlope = p.ppsBkgSlope; ppsMeanErr = p.ppsMeanErr; ppsWidthErr = p.ppsWidthErr; ppsAmplErr = p.ppsAmplErr; ppsSignalErr = p.ppsSignalErr; ppsBkgErr = p.ppsBkgErr; ppsBkgSlopeErr = p.ppsBkgSlopeErr; ppsSum = p.ppsSum; return *this; }