/** @class NonLinOutput.cpp @author Greg Paxton @creation date 4/30/2009 $Date:$ $Revision:$ @copyright (©) Copyright 2009 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 linearity corrections to an event */ #include #include "NonLinOutput.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 NonLinOutput::outputToEvent(Event &outEvent) const { EventVar strongSig(multiSig.size() ); EventVar weakSig(multiSig.size() ); EventVar diffSig(multiSig.size() ); EventVarVect SignalsOut; 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("Linear_Signals"); outEvent.addEventVar(SignalsOut); } NonLinOutput const & NonLinOutput ::operator = (NonLinOutput const &rhs) { if(&rhs == this) { return *this; } multiSig = rhs.multiSig; return *this; }