00001 #!/usr/local/bin/python 00002 # 00003 # Copyright 2004 00004 # by 00005 # The Board of Trustees of the 00006 # Leland Stanford Junior University. 00007 # All rights reserved. 00008 # 00009 00010 __facility__ = "Online" 00011 __abstract__ = "GLAST LAT Coincidence based Trigger System Interface classes" 00012 __author__ = "Jim Panetta <panetta@slac.stanford.edu> SLAC - GLAST I&T" 00013 __date__ = "2/14/04" 00014 __version__ = "$Revision: 2.3 $" 00015 __release__ = "$Name: R04-12-00 $" 00016 __credits__ = "SLAC" 00017 00018 import LATTE.copyright_SLAC 00019 00020 """TrgGemAbstract: Abstract interface for GEM based systems. """ 00021 00022 from TrgObject import TrgObject 00023 from TrgAbstract import TrgAbstract 00024 from TrgPeriodic import TrgPeriodicCondition 00025 00026 class TrgGemAbstract(TrgAbstract): 00027 """\brief Trigger Global trigger Electronics Module Interface class definition 00028 """ 00029 def __init__(self): 00030 """\brief TrgGemAbstract constructor 00031 """ 00032 TrgAbstract.__init__(self) 00033 00034 00035 ############# Pure Virtual functions 00036 def width(self): 00037 """\brief width 'pure virtual' method 00038 00039 \return An int. 00040 00041 This value specifies the window of the GEM's trigger window 00042 (see [4]). The width is specified in units of system clock, where one 00043 system clock is 50 nanoseconds. 00044 """ 00045 raise NotImplementedError 00046 pass 00047 00048 def useAcdAsTrigger(self): 00049 """\brief UseAcdAsTrigger 'pure virtual' method 00050 00051 \return A boolean 00052 00053 This value specifies whether or not the the ROI generator and its ACD 00054 tile signals are be used as a trigger or as a veto. 00055 If the value returned is TRUE, the ROI generator is used as a trigger. 00056 If the value returned is FALSE, the ROI generator is used as a veto. 00057 """ 00058 raise NotImplementedError 00059 pass 00060 00061 def redundantPPS(self): 00062 """\brief RedundantPPS 'pure virtual' method 00063 00064 \return A boolean 00065 00066 This value specifies whether or not the GEM should use the redundant 00067 1-PPS signal. If the value returned is TRUE, the redundant 1-PPS signal 00068 will be used. If the value returned is FALSE, the primary 00069 1-PPS signal will not be used. 00070 """ 00071 raise NotImplementedError 00072 pass 00073 00074 def responseHeaderParityEven(self): 00075 """\brief responseHeaderParityEven 'pure virtual' method 00076 00077 \return A boolean 00078 00079 This value specifies whether or not the parity associated with a command 00080 responsepacket header should be sent with odd or even parity. If the value returned is 00081 TRUE, response headers will have even parity. If the value returned is FALSE, 00082 responses will have odd parity. 00083 """ 00084 raise NotImplementedError 00085 pass 00086 00087 def responseDataParityEven(self): 00088 """\brief responseDataParityEven 'pure virtual' method 00089 00090 \return A boolean 00091 00092 This value specifies whether or not the parity associated with a command 00093 response packet body should be sent with odd or even parity. If the value returned is 00094 TRUE, response bodies will have even parity. If the value returned is FALSE, 00095 responses will have odd parity. 00096 """ 00097 raise NotImplementedError 00098 pass 00099 00100 def eventHeaderParityEven(self): 00101 """\brief eventHeaderParityEven 'pure virtual' method 00102 00103 \return A boolean 00104 00105 This value specifies whether or not the parity associated with a trigger 00106 message header initiated by the GEM should be sent with odd or even parity. 00107 If the value returned is TRUE, trigger message headers will have even parity. 00108 If the value returned is FALSE, trigger message headers will have odd parity. 00109 """ 00110 raise NotImplementedError 00111 pass 00112 00113 def eventDataParityEven(self): 00114 """\brief eventDataParityEven 'pure virtual' method 00115 00116 \return A boolean 00117 00118 This value specifies whether or not the parity associated with a trigger 00119 message body initiated by the GEM should be sent with odd or even parity. 00120 If the value returned is TRUE, trigger message bodies will have even parity. 00121 If the value returned is FALSE, trigger message bodies will have odd parity. 00122 """ 00123 raise NotImplementedError 00124 pass 00125 00126 def triggerParityEven(self): 00127 """\brief TriggerParityEven 'pure virtual' method 00128 00129 \return A boolean 00130 00131 This value specifies whether or not the parity associated with a trigger 00132 message initiated by the GEM should be sent with odd or even parity. 00133 If the value returned is TRUE, trigger messages will have even parity. 00134 If the value returned is FALSE, trigger messages will have odd parity. 00135 """ 00136 raise NotImplementedError 00137 pass 00138 00139 def inhibitContribution(self): 00140 """\brief inhibitContribution 'pure virtual' method 00141 00142 \return A boolean 00143 00144 This value specifies whether or not the GEM transmits a contribution 00145 to the event. 00146 If the value returned is TRUE, GEM contributions are inhibited. 00147 If the value returned is FALSE, GEM contributions are sent with the event. 00148 """ 00149 raise NotImplementedError 00150 pass 00151 00152 def periodicCondition(self): 00153 """\brief PeriodicCondition 'pure virtual' method 00154 00155 \return A TrgPeriodicCondition object 00156 00157 This object specifies the initial and current definition of 00158 the periodic condition 00159 """ 00160 raise NotImplementedError 00161 pass 00162 00163 def roi(self): 00164 """\brief Roi 'pure virtual' method 00165 00166 \return A TrgRoi object 00167 00168 This object specifies the definition of the GEM's ROI generator 00169 """ 00170 raise NotImplementedError 00171 pass 00172 00173 def triggerCounters(self): 00174 """\brief triggerCounters 'pure virtual' method 00175 00176 \return A TrgTriggerCounters object 00177 00178 This object specifies an implementation of the GEM's trigger counters 00179 """ 00180 raise NotImplementedError 00181 pass 00182 00183 def cnoCounters(self): 00184 """\brief cnoCounters 'pure virtual' method 00185 00186 \return A TrgCnoCounters object 00187 00188 This object specifies an implementation of the GEM's cno counters 00189 """ 00190 raise NotImplementedError 00191 pass 00192 00193 def tileCounters(self): 00194 """\brief tileCounters 'pure virtual' method 00195 00196 \return A TrgTileCounters object 00197 00198 This object specifies an implementation of the GEM's tile counters 00199 """ 00200 raise NotImplementedError 00201 pass 00202 00203 def cmdCounters(self): 00204 """\brief cmdCounters 'pure virtual' method 00205 00206 \return A TrgCmdCounters object 00207 00208 This object specifies an implementation of the GEM's Command/Response counters 00209 """ 00210 raise NotImplementedError 00211 pass 00212 00213 def eventCounter(self): 00214 """\brief eventCounter 'pure virtual' method 00215 00216 \return A TrgEventCounter object 00217 00218 This object specifies an implementation of the GEM's events sent counter 00219 """ 00220 raise NotImplementedError 00221 pass 00222 00223 def ppsTimer(self): 00224 """\brief ppsTimer 'pure virtual' method 00225 00226 \return A TrgPPSTimer object 00227 00228 This object specifies an implementation of the GEM's 1-PPS timer 00229 """ 00230 raise NotImplementedError 00231 pass 00232 00233 00234 ############### Pure virtual function implementation 00235 def maxEngines(self): 00236 return (TrgObject.ENGINE_NUMBER_MAX + 1) 00237 00238 def maxConditions(self): 00239 return (TrgObject.CONDITIONS_NUMBER_MAX + 1) 00240