/** @class SigCorrectOutput.cpp @author Brian Magill @creation date 11/13/2006 $Date:$ $Revision:$ @copyright (©) Copyright 2006 by GATS Inc. 11864 Canon Blvd., Suite 101, Newport News, VA 23606 All Rights Reserved. No part of this software or publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise without the prior written permission of GATS Inc. @brief This class transfers the objects for signal corrections to an event */ #include #include "SigCorrectOutput.h" #include "DarkSigCoder.h" #include "DriftCoder.h" #include "PointingCoder.h" #include "SOFIE_namespace.h" using namespace std; /// /// @param outEvent - event to which the signals are written /// // Note: The way in which the siganls are copied to the output Event // object must match the way SigCorrectIn transfers the signals in from // the input Event object. (SOFIE::AllGasTypes in SOFIE_namespace.h // has the ordering of each individual channel SOFIE uses.) // void SigCorrectOutput::outputToEvent(Event &outEvent) const { EventVar timeArrayIn(multiSig.size() ); EventVar strongSig(multiSig.size() ); EventVar weakSig(multiSig.size() ); EventVar diffSig(multiSig.size() ); EventVar pointingCutoff(1); EventVarVect SignalsOut; SigCorrectOutput correctOutput; DarkSigCoder outputDarkParam(dark_Param); DriftCoder outputDriftParam(drift_Param); PointingCoder outputPointingParam(pointing_Param); multiSig.getTime(timeArrayIn); timeArrayIn.setName("Final_Signal_Time"); outEvent.addEventVar(timeArrayIn); ChannelSignals channel; for(int indx = SOFIE::O3; indx <= SOFIE::NO; indx++) { channel = multiSig.getChannel(indx); strongSig = EventVar("", channel.getSignal(SOFIE::Strong) ); weakSig = EventVar("", channel.getSignal(SOFIE::Weak) ); // handle the special cases where the ordering is reversed if(indx == SOFIE::H2O || indx == SOFIE::NO) { SignalsOut.addEventVar(weakSig); SignalsOut.addEventVar(strongSig); } else { SignalsOut.addEventVar(strongSig); SignalsOut.addEventVar(weakSig); } } for(int indx = SOFIE::O3; indx <= SOFIE::NO; indx++) { channel = multiSig.getChannel(indx); diffSig = EventVar("", channel.getSignal(SOFIE::Diff)); SignalsOut.addEventVar(diffSig); } SignalsOut.setName("Corrected_Signals"); outEvent.addEventVar(SignalsOut); outputDarkParam(outEvent); outputDriftParam(outEvent); outputPointingParam(outEvent); //std::cout << "\nPointingCutoff = " << cutoff << std::endl << std::endl; pointingCutoff[0] = cutoff; pointingCutoff.setName("PointingCorrectionCutoffTime"); outEvent.addEventVar(pointingCutoff); }; SigCorrectOutput const & SigCorrectOutput ::operator = (SigCorrectOutput const &rhs) { if(&rhs == this) return *this; multiSig = rhs.multiSig; dark_Param = rhs.dark_Param; drift_Param = rhs.drift_Param; pointing_Param = rhs.pointing_Param; return *this; };