CMS 3D CMS Logo

Functions
findBadModT9 Namespace Reference

Functions

def findpr (options)
 
def findse (options)
 
def printall ()
 

Function Documentation

def findBadModT9.findpr (   options)

Definition at line 11 of file findBadModT9.py.

References relativeConstraints.keys, list(), genParticles_cff.map, and lhef.pop().

Referenced by printall().

11 def findpr(options):
12  BadModpr=open(options.filenamePR,'r')
13  bmpr=BadModpr.read()
14  mod="Module"
15  pcl="PCLBadModule"
16  sub="SubDetector"
17 
18 
19  prf = re.findall(r'(SubDetector.*?\n\n.*?)(?:\n+^$|\Z)',bmpr,re.MULTILINE|re.DOTALL)
20  prf =list(map(lambda x: re.split('\n+',x),prf))
21  findpr.prd={}
22  findpr.pralld={}
23  # create dictionaries
24  prfd={}
25 
26 
27  for k in prf:
28  for l in k[1:]:
29  n=re.split("\W+",l)
30  prfd[n[1]]=(l)
31  findpr.pralld[k[0]]=prfd
32  prfd={}
33 
34 
35  findpr.prd=copy.deepcopy(findpr.pralld)
36  #dictionary with pclbadmodules only
37 
38  for k in findpr.prd.keys():
39 
40  for l in findpr.prd[k].keys():
41  if pcl not in findpr.prd[k][l]:
42  findpr.prd[k].pop(l)
43 
44  #for k in findpr.pralld:
45  # print len(findpr.pralld[k])
46  return 0
47 
static void pop(std::vector< T > &vec, unsigned int index)
Definition: LHEEvent.cc:150
def findpr(options)
Definition: findBadModT9.py:11
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
def findBadModT9.findse (   options)

Definition at line 48 of file findBadModT9.py.

References list(), and genParticles_cff.map.

Referenced by printall().

48 def findse(options):
49  BadModse=open(options.filenameSE,'r')
50  bmse=BadModse.read()
51 
52  sub="SubDetector"
53 
54  sef = re.findall(r'(SubDetector.*?\n\n.*?)(?:\n+^$|\Z)',bmse,re.MULTILINE|re.DOTALL)
55  sef =list(map(lambda x: re.split('\n+',x),sef))
56  findse.sed={}
57 
58  sefd={}
59  for k in sef:
60  for l in k[1:]:
61  n=re.split("\W+",l)
62  sefd[n[1]]=(l)
63  findse.sed[k[0]]=sefd
64  sefd={}
65 
66 
67 
68  return 0
69 
70 
71 
def findse(options)
Definition: findBadModT9.py:48
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
def findBadModT9.printall ( )

Definition at line 72 of file findBadModT9.py.

References findpr(), and findse().

72 def printall():
73  seFile=open('SEinPRBadMod.txt','w')
74  prFile=open('PCLBadMod.txt','w')
75  seFile.write("Bad Modules from stream express which are still bad in Prompt Reco\n\n")
76 
77  for x in findse.sed:
78  seFile.write("\n"+x+"\n\n")
79  for y in findse.sed[x]:
80  if y in findpr.pralld[x]:
81  seFile.write(findpr.pralld[x][y]+"\n")
82 
83 
84  prFile.write("Bad Modules from Prompt Reco (PCLBadModules) that are not bad in Stream Express\n\n")
85 
86  for x in findpr.prd:
87  prFile.write("\n"+x+"\n\n")
88  for y in findpr.prd[x]:
89 
90  if y not in findse.sed[x]:
91 
92  prFile.write(findpr.prd[x][y]+"\n")
93 
94  return 0
95 
96 
def printall()
Definition: findBadModT9.py:72