#include "JSystem/JStat.hh" #include "JROOT/JRootStreamer.hh" #include "JLang/JStringStream.hh" #include "JTrigger/JTriggerParameters.hh" #include "JTrigger/JTriggerDictionary.hh" /** * \author mdejong */ /** * Streamer version of JTriggerParameters as obtained from ROOT file. */ int JTRIGGER::JTriggerParameters::ROOT_IO_VERSION = -1; /** * Read L2 parameters from input. * * \param in input stream * \param parameters L2 parameters * \return input stream */ std::istream& operator>>(std::istream& in, JTRIGGER::JL2Parameters& parameters) { using namespace JPP; JRootReader(in, JEquationParameters(), JTriggerDictionary::getInstance()).get(parameters); return in; } /** * Write L2 parameters to output. * * \param out output stream * \param parameters L2 parameters * \return output stream */ std::ostream& operator<<(std::ostream& out, const JTRIGGER::JL2Parameters& parameters) { using namespace JPP; JRootWriter(out, JEquationParameters(), JTriggerDictionary::getInstance()).put(parameters); return out; } /** * Read trigger parameters from input. * * \param in input stream * \param parameters trigger parameters * \return input stream */ std::istream& operator>>(std::istream& in, JTRIGGER::JTriggerParameters& parameters) { using namespace JPP; JStringStream is(in); if (getFileStatus(is.str().c_str())) { is.load(); } JRootReader(is, JEquationParameters(), JTriggerDictionary::getInstance()).get(parameters); return in; } /** * Write trigger parameters to output. * * \param out output stream * \param parameters trigger parameters * \return output stream */ std::ostream& operator<<(std::ostream& out, const JTRIGGER::JTriggerParameters& parameters) { using namespace JPP; JRootWriter(out, JEquationParameters(), JTriggerDictionary::getInstance()).put(parameters); return out; }