10         return '/GLOBAL/DETSTATUS/LBSUMM' 
   12         return '/GLOBAL/DETSTATUS/TISUMM' 
   27     "Translate traffic light string (numerical literal or letter) to number" 
   31         if uplight 
in [
"R",
"RED"]:
 
   33         elif uplight 
in [
"Y",
"YELLOW"]:
 
   35         elif uplight 
in [
"G",
"GREEN"]:
 
   37         elif uplight 
in [
"U",
"UNKNOWN"]:
 
   39         elif uplight 
in [
"B",
"BLACK"]:
 
   53         self.
namedict={
'PIXB':101,
'PIX0':102,
'PIXEA':104,
'PIXEC':105,
 
   54                        'SCTB':111,
'SCTEA':114,
'SCTEC':115,
 
   55                        'TRTB':121,
'TRTEA':124,
'TRTEC':125,
'TRTTR':126,
 
   59                        'IDPF':160,
'IDVX':161,
 
   61                        'EMBA':202,
'EMBC':203,
'EMECA':204,
'EMECC':205,
 
   62                        'HECA':214,
'HECC':215,
'FCALA':224,
'FCALC':225,
 
   64                        'TILBA':232,
'TILBC':233,
'TIEBA':234,
'TIEBC':235,
 
   65                        'MBTSA':244,
'MBTSC':245,
 
   66                        'CALBA':251,
'CALEA':254,
'CALEC':255,
 
   67                        'MDTBA':302,
'MDTBC':303,
'MDTEA':304,
'MDTEC':305,
 
   68                        'RPCBA':312,
'RPCBC':313,
 
   69                        'TGCEA':324,
'TGCEC':325,
 
   70                        'CSCEA':334,
'CSCEC':335,
 
   71                        'LCD':350,
'LCDA':353,
'LCDC':354,
 
   73                        'L1CAL':401,
'L1MUB':402,
'L1MUE':403,
'L1CTP':404,
 
   76                        'TRBJT':421,
'TRBPH':422,
'TRCOS':423,
'TRELE':424,
 
   77                        'TRGAM':425,
'TRJET':426,
'TRMET':427,
'TRMBI':428,
 
   78                        'TRMUO':429,
'TRTAU':430,
'TRIDT':431,
 
   79                        'LUMI':450,
'LUMIONL':451,
 
   82                        'ATLGL':480,
'ATLSOL':481,
'ATLTOR':482,
 
   83                        'EIDB':501,
'EIDCR':502,
'EIDE':503,
 
   84                        'PIDB':505,
'PIDCR':506,
'PIDE':507,
 
   85                        'EIDF':508,
'EIDSOFT':509,
 
   86                        'MSTACO':510,
'MMUIDCB':511,
'MMUIDVX':512,
 
   87                        'MMUGIRL':513,
'MMUBOY':514,
'MMUIDSA':515,
 
   88                        'MMUTAG':516,
'MMTIMO':517,
'MCMUTAG':518,
 
   90                        'JETB':521,
'JETEA':524,
'JETEC':525,
 
   91                        'JETFA':526,
'JETFC':527,
 
   92                        'MET':530,
'METCALO':531,
'METMUON':532,
 
   93                        'BTGLIFE':541,
'BTGSOFTE':544,
'BTGSOFTM':545,
 
   94                        'TAUB':551,
'TAUCR':552,
'TAUE':553}
 
  105         "Return the numeric channel identifier which exactly matches name" 
  109         "Return a list of all numeric channel identifiers which match name" 
  112             if (name==iname[:len(name)]):
 
  127     "Class to hold a list of detector status requirements" 
  130         "Initialise to empty set of requirements" 
  137         """Set requirements from a space-separated string with flag req pairs 
  138         e.g. 'SCTB 3 EMEC G' (numbers or letters for status)""" 
  140         namelist=self.
names.allNames()
 
  143         while (ix+1<len(tokens)):
 
  146             if (val 
is not None):
 
  149                 for name 
in namelist:
 
  150                     if (flagname==name[0:len(flagname)]):
 
  154                     print (
"Name %s does not match any status flag" % flagname)
 
  156                 print (
"Value %s does not define a status" % tokens[ix+1])
 
  160         "Return the dictionary holding the requirements (channel/value pairs)" 
  164         "Print representation of status requirements" 
  167             result+=
"%s %i " % (self.
names.
name(key),val)
 
  171     "Transient representation of one detector status" 
  172     def __init__(self,start,stop,code,deadfrac,thrust,nconfig=-1,nworking=-1,comment=''):
 
  189     "Transient representation of detector status list (code,deadfrac,thrust)" 
  191         "Initialise to empty sequence" 
  195     def merge(self,mobj,override=False):
 
  196         "Merge the given StatusObj into the list, ANDing (default) or override" 
  197         if (mobj.start>=mobj.stop):
 
  202         while (ix<len(self.
_seq)):
 
  205             if (mobj.start<self.
_seq[ix].start 
and mobj.stop>oldstop):
 
  207                 nstart=
max(oldstop,mobj.start)
 
  208                 nstop=
min(self.
_seq[ix].start,mobj.stop)
 
  212                     self.
_seq.insert(ix,
StatusObj(nstart,nstop,mobj.code,mobj.deadfrac,mobj.thrust,mobj.nconfig,mobj.nworking,mobj.comment))
 
  215             if (mobj.start<self.
_seq[ix].stop 
and mobj.stop>self.
_seq[ix].start):
 
  220                     (mobj.code<=self.
_seq[ix].code 
and mobj.code!=0) 
or 
  221                     (self.
_seq[ix].code==0)):
 
  223                     ecode=self.
_seq[ix].code
 
  224                     edeadfrac=self.
_seq[ix].deadfrac
 
  225                     ethrust=self.
_seq[ix].thrust
 
  226                     enconfig=self.
_seq[ix].nconfig
 
  227                     enworking=self.
_seq[ix].nworking
 
  228                     ecomment=self.
_seq[ix].comment
 
  229                     estart=self.
_seq[ix].start
 
  230                     estop=self.
_seq[ix].stop
 
  233                     if (mobj.start>estart):
 
  235                         self.
_seq.insert(ix,
StatusObj(estart,mobj.start,ecode,edeadfrac,ethrust,enconfig,enworking,ecomment))
 
  238                     if (mobj.stop<estop):
 
  240                         self.
_seq.insert(ix+1,
StatusObj(mobj.stop,estop,ecode,edeadfrac,ethrust,enconfig,enworking,ecomment))
 
  243                     self.
_seq[iy]=
StatusObj(
max(mobj.start,estart),
min(mobj.stop,estop),mobj.code,mobj.deadfrac,mobj.thrust,mobj.nconfig,mobj.nworking,mobj.comment)
 
  245             oldstop=self.
_seq[ix].stop
 
  249         if (len(self.
_seq)>0):
 
  250             oldstop=self.
_seq[-1].stop
 
  251         if (mobj.stop>oldstop):
 
  252             nstart=
max(oldstop,mobj.start)
 
  253             self.
_seq+=[
StatusObj(nstart,mobj.stop,mobj.code,mobj.deadfrac,mobj.thrust,mobj.nconfig,mobj.nworking,mobj.comment)]
 
  256         "Compress StatusList removing redundant entries with IoVs which can be combined" 
  258         while (ix<len(self.
_seq)):
 
  261             if (self.
_seq[ix].start==self.
_seq[ix-1].stop 
and  
  262                 self.
_seq[ix].code==self.
_seq[ix-1].code 
and 
  263                 self.
_seq[ix].deadfrac==self.
_seq[ix-1].deadfrac 
and 
  264                 self.
_seq[ix].thrust==self.
_seq[ix-1].thrust 
and 
  265                 self.
_seq[ix].nconfig==self.
_seq[ix-1].nconfig 
and 
  266                 self.
_seq[ix].nworking==self.
_seq[ix-1].nworking 
and 
  267                 self.
_seq[ix].comment==self.
_seq[ix-1].comment):
 
  268                 self.
_seq[ix].updateStart(self.
_seq[ix-1].start)
 
  272         return len(self.
_seq)
 
  275         "Return size of list" 
  276         return len(self.
_seq)
 
  279         "Return the list itself" 
  283         "Print representation of StatusList" 
  286             rep+=
'[%i %i] : %i %6.3f %6.3f %s\n' % (i.start,i.stop,i.code,i.deadfrac,i.thrust,i.comment)