#ifndef PARAMETER_H #define PARAMETER_H enum Type { DIG = 0, CH = 1, LVDS = 2, VGA = 3}; enum RW { ReadWrite = 0, ReadONLY = 1, WriteONLY = 2}; class Par{ public: Par( const char * string, unsigned short type, unsigned short readWrite = RW::ReadWrite){ this->str = string; this->type = type; this->ReadWrite = readWrite; } ~Par(){}; operator const char * () const {return this->str;} unsigned short IsReadWrtie() const {return this->ReadWrite;} unsigned short GetType() const {return this->type;} private: const char * str; /// 32bits unsigned short type; unsigned short ReadWrite; }; namespace Parameter{ //######### PHA ///======= board settings const Par CUPVersion ("CupVer" , Type::DIG, RW::ReadONLY); const Par FPGAVersion ("FPGA_FwVer" , Type::DIG, RW::ReadONLY); const Par DPPType ("FwType" , Type::DIG, RW::ReadONLY); const Par ModelCode ("ModelCode" , Type::DIG, RW::ReadONLY); const Par PiggyBackCode ("PBCode" , Type::DIG, RW::ReadONLY); const Par ModelName ("ModelName" , Type::DIG, RW::ReadONLY); const Par FormFactor ("FormFactor" , Type::DIG, RW::ReadONLY); const Par FamilyCode ("FamilyCode" , Type::DIG, RW::ReadONLY); const Par SerialNumber ("SerialNum" , Type::DIG, RW::ReadONLY); const Par PCBrevision_MB ("PCBrev_MB" , Type::DIG, RW::ReadONLY); /// mother board const Par PCBrevision_PB ("PCBrev_PB" , Type::DIG, RW::ReadONLY); /// piggy back const Par Licence ("License" , Type::DIG, RW::ReadONLY); const Par LicenceStatus ("LicenseStatus" , Type::DIG, RW::ReadONLY); const Par LicenceRemainingTime ("LicenseRemainingTime" , Type::DIG, RW::ReadONLY); const Par NumCh ("NumCh" , Type::DIG, RW::ReadONLY); const Par ADC_Nbit ("ADC_Nbit" , Type::DIG, RW::ReadONLY); const Par ADC_SampleRate ("ADC_SamplRate" , Type::DIG, RW::ReadONLY); const Par InputRange ("InputRate" , Type::DIG, RW::ReadONLY); /// input dynamic range const Par Inputtype ("InputType" , Type::DIG, RW::ReadONLY); const Par InputImpedance ("Zin" , Type::DIG, RW::ReadONLY); const Par IPAddress ("IPAddress" , Type::DIG, RW::ReadONLY); const Par Netmask ("Netmask" , Type::DIG, RW::ReadONLY); const Par Gateway ("Gateway" , Type::DIG, RW::ReadONLY); const Par ClockSource ("ClockSource" , Type::DIG, RW::ReadWrite); const Par EnableClockOutputP0 ("EnClockOutP0" , Type::DIG, RW::ReadWrite); /// P0 connector, backplane const Par EnableClockOutputFP ("EnClockOutFP" , Type::DIG, RW::ReadWrite); /// front panel ///======= Acquistion, trigger and VETO const Par StartSource ("StartSource" , Type::DIG, RW::ReadWrite); const Par GlobalTriggerSource ("GlobalTriggerSource" , Type::DIG, RW::ReadWrite); const Par WaveTriggerSource ("WaveTriggerSource" , Type::CH , RW::ReadWrite); const Par EventTriggerSource ("EventTriggerSource" , Type::CH , RW::ReadWrite); const Par ChannelsTriggerSource ("ChannelsTriggerSource" , Type::CH , RW::ReadWrite); const Par WaveSaving ("WaveSaving" , Type::CH , RW::ReadWrite); const Par TrgOutMode ("TrgOutMode" , Type::DIG, RW::ReadWrite); const Par GPIOMode ("GPIOtMode" , Type::DIG, RW::ReadWrite); const Par BusyInSource ("BusyInSource" , Type::DIG, RW::ReadWrite); const Par SyncOutMode ("SyncOutMode" , Type::DIG, RW::ReadWrite); const Par BoardVetoSource ("BoardVetoSource" , Type::DIG, RW::ReadWrite); const Par BoardVetoWidth ("BoardVetoWidth" , Type::DIG, RW::ReadWrite); const Par BoardVetoPolarity ("BoardVetoPolarity" , Type::DIG, RW::ReadWrite); const Par ChannelsVetoSource ("ChannelsVetoSource" , Type::CH , RW::ReadWrite); const Par ADCVetoWidth ("ADCVetoWidth" , Type::CH , RW::ReadWrite); const Par EnableAutoDisarmACQ ("EnAutoDisarmAcq" , Type::DIG, RW::ReadWrite); const Par LedStatus ("LedStatus" , Type::DIG, RW::ReadONLY); const Par AcquistionStatus ("AcquistionStatus" , Type::DIG, RW::ReadONLY); const Par EnableDataReduction ("EnDataReduction" , Type::DIG, RW::ReadWrite); const Par EnableStatEvents ("EnStatEvents" , Type::DIG, RW::ReadWrite); const Par VolatileClockOutDelay ("VolatileClockOutDelay" , Type::DIG, RW::ReadWrite); const Par PermanentClockOutDelay("PermanentClockOutDelay" , Type::DIG, RW::ReadWrite); ///======= Waveform parameters const Par WaveDataSource ("WaveDataSource" , Type::CH, RW::ReadWrite); const Par ChRecordLengthS ("ChRecordLengthS" , Type::CH, RW::ReadWrite); /// in sample const Par ChRecordLengthT ("ChRecordLengthT" , Type::CH, RW::ReadWrite); /// in time [ns] const Par WaveResolution ("WaveResolution" , Type::CH, RW::ReadWrite); const Par WaveAnalogProbes0 ("WaveAnalogProbes0" , Type::CH, RW::ReadWrite); const Par WaveAnalogProbes1 ("WaveAnalogProbes1" , Type::CH, RW::ReadWrite); const Par WaveDigitalProbes0 ("WaveDigitalProbes0" , Type::CH, RW::ReadWrite); const Par WaveDigitalProbes1 ("WaveDigitalProbes1" , Type::CH, RW::ReadWrite); const Par WaveDigitalProbes2 ("WaveDigitalProbes2" , Type::CH, RW::ReadWrite); const Par WaveDigitalProbes3 ("WaveDigitalProbes3" , Type::CH, RW::ReadWrite); const Par ChPreTriggerS ("ChPreTriggerS" , Type::CH, RW::ReadWrite); const Par ChPreTriggerT ("ChPreTriggerT" , Type::CH, RW::ReadWrite); ///======= Service parameters const Par TestPulsePeriod ("TestPulsePeriod" , Type::DIG, RW::ReadWrite); const Par TestPulseWdith ("TestPulseWidth" , Type::DIG, RW::ReadWrite); const Par TestPulseLowLevel ("TestPulseLowLevel" , Type::DIG, RW::ReadWrite); const Par TestPulseHighLevel ("TestPulseHighLevel" , Type::DIG, RW::ReadWrite); const Par IOlevel ("IOlevel" , Type::DIG, RW::ReadWrite); const Par TempSensAirIn ("TempSensAirIn" , Type::DIG, RW::ReadONLY); const Par TempSensAirOut ("TempSensAirOut" , Type::DIG, RW::ReadONLY); const Par TempSensCore ("TempSensCore" , Type::DIG, RW::ReadONLY); const Par TempSensFirstADC ("TempSensFirstADC" , Type::DIG, RW::ReadONLY); const Par TempSensLastADC ("TempSensLastADC" , Type::DIG, RW::ReadONLY); const Par TempSensHottestADC ("TempSensHottestADC" , Type::DIG, RW::ReadONLY); const Par TempSensADC0 ("TempSensADC0" , Type::DIG, RW::ReadONLY); const Par TempSensADC1 ("TempSensADC1" , Type::DIG, RW::ReadONLY); const Par TempSensADC2 ("TempSensADC2" , Type::DIG, RW::ReadONLY); const Par TempSensADC3 ("TempSensADC3" , Type::DIG, RW::ReadONLY); const Par TempSensADC4 ("TempSensADC4" , Type::DIG, RW::ReadONLY); const Par TempSensADC5 ("TempSensADC5" , Type::DIG, RW::ReadONLY); const Par TempSensADC6 ("TempSensADC6" , Type::DIG, RW::ReadONLY); const Par TempSensADC7 ("TempSensADC7" , Type::DIG, RW::ReadONLY); const Par TempSensDCDC ("TempSensDCDC" , Type::DIG, RW::ReadONLY); const Par VInSensDCDC ("VInSensDCDC" , Type::DIG, RW::ReadONLY); const Par VOutSensDCDC ("VOutSensDCDC" , Type::DIG, RW::ReadONLY); const Par IOutSensDCDC ("IOutSensDCDC" , Type::DIG, RW::ReadONLY); const Par FreqSensCore ("FreqSensCore" , Type::DIG, RW::ReadONLY); const Par DutyCycleSensDCDC ("DutyCycleSensDCDC" , Type::DIG, RW::ReadONLY); const Par SpeedSensFan1 ("SpeedSensFan1" , Type::DIG, RW::ReadONLY); const Par SpeedSensFan2 ("SpeedSensFan2" , Type::DIG, RW::ReadONLY); const Par ErrorFlagMask ("ErrorFlagMask" , Type::DIG, RW::ReadONLY); const Par ErrorFlagDataMask ("ErrorFlagDataMask" , Type::DIG, RW::ReadONLY); const Par ErrorFlags ("ErrorFlags" , Type::DIG, RW::ReadONLY); const Par BoardReady ("BoardReady" , Type::DIG, RW::ReadONLY); ///======= Indiviual trigger parameters const Par ITLAMainLogic ("ITLAMainLogic" , Type::DIG, RW::ReadWrite); const Par ITLAMajorityLev ("ITLAMajorityLev" , Type::DIG, RW::ReadWrite); const Par ITLAPairLogic ("ITLAPairLogic" , Type::DIG, RW::ReadWrite); const Par ITLAPolarity ("ITLAPolarity" , Type::DIG, RW::ReadWrite); const Par ITLAMask ("ITLAMask" , Type::DIG, RW::ReadWrite); const Par ITLAGateWdith ("ITLAGateWidth" , Type::DIG, RW::ReadWrite); const Par ITLConnect ("ITLConnect" , Type::CH, RW::ReadWrite); const Par ITLBMainLogic ("ITLBMainLogic" , Type::DIG, RW::ReadWrite); const Par ITLBMajorityLev ("ITLBMajorityLev" , Type::DIG, RW::ReadWrite); const Par ITLBPairLogic ("ITLBPairLogic" , Type::DIG, RW::ReadWrite); const Par ITLBPolarity ("ITLBPolarity" , Type::DIG, RW::ReadWrite); const Par ITLBMask ("ITLBMask" , Type::DIG, RW::ReadWrite); const Par ITLBGateWdith ("ITLBGateWidth" , Type::DIG, RW::ReadWrite); ///======== Front Panel LEMO ///======== Input signal conditioning const Par VGAGain ("VGAGain" , Type::VGA, RW::ReadWrite); /// 2745 only const Par EnableOffsetCalibration ("EnOffsetCalibration" , Type::DIG, RW::ReadWrite); const Par ChannelEnable ("ChEnable" , Type::CH , RW::ReadWrite); const Par SelfTrgRate ("SelfTrgRate" , Type::CH , RW::ReadONLY); const Par ChannelStatus ("ChStatus" , Type::CH , RW::ReadONLY); const Par DCOffset ("DCOffset" , Type::CH , RW::ReadWrite); const Par GainFactor ("GainFactor" , Type::CH , RW::ReadONLY); const Par ADCToVolts ("ADCToVolts" , Type::CH , RW::ReadONLY); const Par TriggerThreshold ("TriggerThr" , Type::CH , RW::ReadWrite); const Par PulsePolarity ("PulsePolarity" , Type::CH , RW::ReadWrite); ///======= Event Selection ///======== PHA parameters const Par TimeFilterRiseTimeS ("TimeFilterRiseTimeS" , Type::CH , RW::ReadWrite); const Par TimeFilterRetriggerGuardS ("TimeFilterRetriggerGuardS" , Type::CH , RW::ReadWrite); const Par EnergyFilterRiseTimeS ("EnergyFilterRiseTimeS" , Type::CH , RW::ReadWrite); const Par EnergyFilterFlatTopS ("EnergyFilterFlatTopS" , Type::CH , RW::ReadWrite); const Par EnergyFilterPoleZeroS ("EnergyFilterPoleZeroS" , Type::CH , RW::ReadWrite); const Par EnergyFilterBaselineGuardS ("EnergyFilterBaselineGuardS" , Type::CH , RW::ReadWrite); const Par EnergyFilterPileUpGuardS ("EnergyFilterPileUpGuardS" , Type::CH , RW::ReadWrite); const Par TimeFilterRiseTimeT ("TimeFilterRiseTimeT" , Type::CH , RW::ReadWrite); const Par TimeFilterRetriggerGuardT ("TimeFilterRetriggerGuardT" , Type::CH , RW::ReadWrite); const Par EnergyFilterRiseTimeT ("EnergyFilterRiseTimeT" , Type::CH , RW::ReadWrite); const Par EnergyFilterFlatTopT ("EnergyFilterFlatTopT" , Type::CH , RW::ReadWrite); const Par EnergyFilterPoleZeroT ("EnergyFilterPoleZeroT" , Type::CH , RW::ReadWrite); const Par EnergyFilterBaselineGuardT ("EnergyFilterBaselineGuardT" , Type::CH , RW::ReadWrite); const Par EnergyFilterPileUpGuardT ("EnergyFilterPileUpGuardT" , Type::CH , RW::ReadWrite); const Par EnergyFilterPeakingPosition ("EnergyFilterPeakingPosition" , Type::CH , RW::ReadWrite); const Par EnergyFilterPeakingAvg ("EnergyFilterPeakingAvg" , Type::CH , RW::ReadWrite); const Par EnergyFilterFineGain ("EnergyFilterFineGain" , Type::CH , RW::ReadWrite); const Par EnergyFilterLowPassFilter ("EnergyFilterLFLimitation" , Type::CH , RW::ReadWrite); const Par EnergyFilterBaselineAvg ("EnergyFilterBaselineAvg" , Type::CH , RW::ReadWrite); const Par Energy_Nbit ("Energy_Nbit" , Type::CH , RW::ReadONLY); const Par ChRealtimeMonitor ("ChRealtimeMonitor" , Type::CH , RW::ReadONLY); const Par ChDeadtimeMonitor ("ChDeadtimeMonitor" , Type::CH , RW::ReadONLY); const Par ChTriggerCnt ("ChTriggerCnt" , Type::CH , RW::ReadONLY); const Par ChSavedEventCnt ("ChSavedEventCnt" , Type::CH , RW::ReadONLY); const Par ChWaveCnt ("ChWaveCnt" , Type::CH , RW::ReadONLY); ///====== Command const Par Reset ("Reset" , Type::CH , RW::WriteONLY); const Par ClearData ("ClearData" , Type::CH , RW::WriteONLY); const Par ArmAcquisition ("ArmAcquisition" , Type::CH , RW::WriteONLY); const Par DisarmAcquisition ("DisarmAcquisition" , Type::CH , RW::WriteONLY); const Par SwStartAcquisition ("SwStartAcquisition" , Type::CH , RW::WriteONLY); const Par SwStopAcquisition ("SwStopAcquisition" , Type::CH , RW::WriteONLY); const Par SendSWTrigger ("SendSWTrigger" , Type::CH , RW::WriteONLY); const Par ReloadCalibration ("ReloadCalibration" , Type::CH , RW::WriteONLY); } #endif