예제 #1
0
 public PMTInfo(DetectionChannel id)
 {
     _id             = id;
     _name           = string.Empty;
     _voltage        = float.NaN; // default to unknown
     _defaultVoltage = -1;        // default to unknown
 }
예제 #2
0
        /// <summary>
        /// if specified PMT exist
        /// </summary>
        /// <param name="laser"></param>
        /// <returns></returns>
        public bool Exist(DetectionChannel pmt)
        {
            if (pmt == DetectionChannel.APD1 || pmt == DetectionChannel.APD2)
            {
                return(true);
            }

            return(_list.Count(p => p.ID == pmt) > 0);
        }
예제 #3
0
 /// <summary>
 /// get pmt info by specified id
 /// </summary>
 /// <param name="id"></param>
 /// <returns>null if does not exists</returns>
 public PMTInfo this[DetectionChannel id]
 {
     get { return(_list.FirstOrDefault(info => info.ID == id)); }
 }
예제 #4
0
 /// <summary>
 /// get fl channel id from laser and detection channel
 /// </summary>
 public static FLChannelID FromLaserAndDetectionChannel(Laser laser, LaserConfig laserCfg, DetectionChannel dchannel)
 {
     for (FLChannelID id = FLChannelID.BL1; id < FLChannelID.Count; id++)
     {
         if (GetLaser(id, laserCfg) == laser && GetDetectionChannel(id) == dchannel)
         {
             return(id);
         }
     }
     return(FLChannelID.NonFL);
 }