/** @class SigCorrectOutputNoDrift.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 Special version of SigCorrectOutputNoDrift for testing algorithms without drift */ #include #include "SigCorrectOutputNoDrift.h" #include "DarkSigCoder.h" #include "DriftCoder.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 SigCorrectOutputNoDrift::outputToEvent(Event &outEvent) const { EventVar timeArrayIn(multiSig.size() ); EventVar strongSig(multiSig.size() ); EventVar weakSig(multiSig.size() ); EventVar diffSig(multiSig.size() ); EventVarVect SignalsOut; // SigCorrectOutput correctOutput; 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("NoDrift_Signals"); outEvent.addEventVar(SignalsOut); }; SigCorrectOutputNoDrift const & SigCorrectOutputNoDrift::operator = (SigCorrectOutputNoDrift const &rhs) { if(&rhs == this) return *this; multiSig = rhs.multiSig; dark_Param = rhs.dark_Param; drift_Param = rhs.drift_Param; return *this; };