/* * VioletFCALPulser.cpp * * Created on: Aug 14, 2015 * Author: Hovanes Egiyan */ #include "VioletFCALPulser.hh" #include using namespace std; // Mask that defines the range where the changes from this pulser occur unsigned VioletFCALPulser::vfpRangeMask = 0x00007800 | 0x7F8000 ; // Mask that would be used to apply switching to the channels unsigned VioletFCALPulser::vfpChannelMask = 0x00004000 | 0x7F8000 ; // ID for this particular pulser std::string VioletFCALPulser::vfpPulserID = "VIOLET" ; // Channel number on board for the pulser static unsigned dummyArray[] = {46}; // Channel numbers on board for the pulser std::vector VioletFCALPulser::vfpChannelVector( dummyArray, dummyArray + sizeof(dummyArray)/ sizeof(unsigned) ); // Constructor, use vfpPulserID as the type of the pulser VioletFCALPulser::VioletFCALPulser( const std::string id ) : FCALLEDPulser( vfpPulserID ) { // If the requested ID does not match then throw an exception if ( id != vfpPulserID ) { // throw an exception std::stringstream errStream; errStream << "VioletFCALPulser::VioletFCALPulser: requested pulser id " << id << " does not match " << vfpPulserID ; throw std::runtime_error( errStream.str()); } else { vpID = id; } return; }