/* * ProfilerMap.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: Sep 30, 2015 * Author: Hovanes Egiyan */ #ifndef PROFILERMAP_HH_ #define PROFILERMAP_HH_ #include "seqCom.h" #include #include #include #include #include #include #include #include "ProfilerDetector.hh" #include "ProfilerPVs.hh" class ProfilerMap { protected: // Map of all detectors static std::map pmDetectorMap ; ProfilerMap(); virtual ~ProfilerMap(); public: static int initDetectorMap(); static bool detectorExists( std::string detName ) ; static bool planeExists( std::string detName, std::string profilerID ); // Specify the PV arrays structure reserved in the SNL code. static void usePVs( const std::string detName, SS_ID ssID, ProfilerPVs::pvStruct& pvStruct ) ; // Assign and connect all the PVs that are defined for the profilers. static void assignPVs( const std::string detName ); // Register event flag static void registerFlag( const std::string detName, const std::string planeID, const SS_ID ssID, const EV_ID flagID, const std::string flagName ); static bool isSimulation( const std::string detName, const std::string plane ); // Methods for interfacing with sequence for control parameters static void setSmoothOption( const std::string detName, const std::string plane, const short opt ); static void setAccumulateOption( const std::string detName, const std::string plane, const short opt ); static void resetScalers( const std::string detName, const std::string plane, const short reset ); // Methods for interfacing with the scaler collection sequence static void fitWithCauchy( const std::string detName, const std::string plane ); static void getMean( const std::string detName, const std::string plane, double* meanArrayPtr ); static void getWidth( const std::string detName, const std::string plane, double* widthArrayPtr ); static void getAmplitude( const std::string detName, const std::string plane, double* amplArrayPtr ); static void getSignal( const std::string detName, const std::string plane, double* sigArrayPtr ); static void getBkg( const std::string detName, const std::string plane, double* bkgArrayPtr ); static void getSum( const std::string detName, const std::string plane, double* sumArrayPtr ); static double getTotalRate( const std::string detName, const std::string plane ); static double getSummedMean( const std::string detName, const std::string plane ); static double getSummedWidth( const std::string detName, const std::string plane ); static double getSummedAmplitude( const std::string detName, const std::string plane ); static double getSummedSignal( const std::string detName, const std::string plane ); static double getSummedBkg( const std::string detName, const std::string plane ); static double getSummedMeanErr( const std::string detName, const std::string plane ); static double getSummedWidthErr( const std::string detName, const std::string plane ); static double getSummedAmplitudeErr( const std::string detName, const std::string plane ); static double getSummedSignalErr( const std::string detName, const std::string plane ); static double getSummedBkgErr( const std::string detName, const std::string plane ); static void getValues( const std::string detName, const std::string plane, double* valueArrayPtr ); static void getAxis( const std::string detName, const std::string plane, double* valueArrayPtr ); }; #endif /* PROFILERMAP_HH_ */