#ifndef __JTRIGGER__JTRIGGERNB_T__ #define __JTRIGGER__JTRIGGERNB_T__ #include "JTrigger/JPMTIdentifier_t.hh" #include "JTrigger/JPrescaler.hh" #include "JTrigger/JPMTSelector.hh" /** * \author rgruiz */ namespace JTRIGGER {} namespace JPP { using namespace JTRIGGER; } namespace JTRIGGER { /** * Nano-beacon trigger parameters. */ struct JTriggerNB_t { /** * Trigger parameters. */ class JParameters { public: /** * Default constructor. */ JParameters() { reset(); } /** * Virtual destructor. */ virtual ~JParameters() {} /** * Reset trigger parameters. * * Note that this method set the default reference PMTs with the wildcard for the module identifier. */ void reset() { enabled = false; write = 1; pmts.clear(); pmts.push_back(JPMTIdentifier_t(-1, 0)); pmts.push_back(JPMTIdentifier_t(-1, 3)); pmts.push_back(JPMTIdentifier_t(-1, 4)); DMax_m = 100; } /** * Equality * * \param parameters trigger parameters * \return true if equals; else false */ bool equals(const JParameters& parameters) const { return (enabled == parameters.enabled && write.equals (parameters.write) && pmts == parameters.pmts && DMax_m == parameters.DMax_m); } ClassDef(JParameters,11); bool enabled; ///< enabled status of trigger JPrescaler write; JPMTSelector pmts; ///< PMT selection double DMax_m; ///< maximal distance between PMTs [m] }; }; } #endif