/* * PulserMap.hh * * A class for interfacing SNL code with C++ code. * No object of this class should be defined, this is pretty * much a namespace. * * Created on: Aug 14, 2015 * Author: Hovanes Egiyan */ #ifndef __PULSERMAP_HH__ #define __PULSERMAP_HH__ #include "seqCom.h" #include #include #include #include #include #include #include #include "PulserDetector.hh" #include "PulserPVs.hh" class PulserMap { protected: static std::map pmDetectorMap ; // Map of all detectors PulserMap(); virtual ~PulserMap(); public: static int initDetectorMap(); static bool detectorExists( std::string detName ) ; static bool pulserExists( std::string detName, std::string pulserID ); // Specify the PV arrays structure reserved in the SNL code. static void usePVs( const std::string detName, SS_ID ssID, PulserPVs::pvStruct& pvStruct ) ; // Assign and connect all the PVs that are defined for the pulsers. static void assignPVs( const std::string detName ); // static bool inputsChanged( const std::string detName ); static void registerFlag( const std::string detName, const SS_ID ssID, const EV_ID flagID ); static void switchState( const std::string detName, const std::string pulserID, const short state ); static void setWidth( const std::string detName, const std::string pulserID, const unsigned width ); static void setFrequency( const std::string detName, const std::string pulserID, const double width ); static void setNPulses( const std::string detName, const std::string pulserID, const unsigned n ); static void setDelay( const std::string detName, const std::string pulserID, const unsigned delay ); static void fitWithCauchy( const std::string detName, const std::string pulserID ); static short getStatus( const std::string detName, const std::string pulserID ) ; static unsigned getWidth( const std::string detName, const std::string pulserID ) ; static double getFrequency( const std::string detName, const std::string pulserID ) ; static unsigned getNPulses( const std::string detName, const std::string pulserID ) ; static unsigned getDelay( const std::string detName, const std::string pulserID ) ; }; #endif /* __PULSERMAP_HH__ */