Commit c655e480 authored by Javier Montejo's avatar Javier Montejo
Browse files

Proper headers, author, version


Former-commit-id: 8fbe90e4
parent f0eaca13
#!/usr/bin/env python
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
__author__ = 'Javier Montejo'
__version__="$Revision: 1.00 $"
__doc__="Interface to retrieve lists of unprescaled triggers according to types and periods"
import sys, pickle
from TriggerMenu.api.TriggerInfo import TriggerInfo
......
#!/usr/bin/env python
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
__author__ = 'Javier Montejo'
__version__="$Revision: 1.00 $"
__doc__="Access to Trigger DB and TriggerMenu to read past and future prescales"
import sys
from TriggerMenu.api.TriggerEnums import TriggerPeriod, LBexceptions
......
#!/usr/bin/env python
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
__author__ = 'Javier Montejo'
__version__="$Revision: 1.00 $"
__doc__="Enumerations for trigger types and periods"
from enum import IntEnum
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
__author__ = 'Javier Montejo'
__version__="$Revision: 1.00 $"
__doc__="Class containing all the information of an HLT chain"
import re
from TriggerMenu.api.TriggerEnums import TriggerType
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
__author__ = 'Javier Montejo'
__version__="$Revision: 1.00 $"
__doc__="Class defining data periods and access to GRLs"
import sys
import xml.etree.ElementTree as ET
from TriggerMenu.api.TriggerEnums import TriggerPeriod
......
#!/usr/bin/env python
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
__author__ = 'Javier Montejo'
__version__="$Revision: 1.00 $"
__doc__="Script generating lists of future unprescaled triggers when the package is built"
from TriggerMenu.api.TriggerAPI import TriggerAPI
from TriggerMenu.api.TriggerEnums import TriggerPeriod, TriggerType
def main(outfolder):
with open(outfolder+"/list_unprescaled1p8e34.py","w") as outfile:
#outfile.write(header())
outfile.write(header())
for triggerType in TriggerType:
outfile.write( to_nice_list( TriggerAPI.getUnprescaled(TriggerPeriod.future1p8e34, triggerType), triggerType.name) )
#outfile.write(end())
with open(outfolder+"/list_unprescaled2e34.py","w") as outfile:
#outfile.write(header())
outfile.write(header())
for triggerType in TriggerType:
outfile.write( to_nice_list( TriggerAPI.getUnprescaled(TriggerPeriod.future2e34, triggerType), triggerType.name ) )
#outfile.write(end())
def to_nice_list( alist, name ):
thestr = "list_%s = [\n"%name
......@@ -23,6 +25,11 @@ def to_nice_list( alist, name ):
thestr += "]\n\n"
return thestr
def header():
thestr = '# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration\n'
thestr += '# File was auto-generated with generateUnprescaledLists.py\n\n'
return thestr
if __name__ == "__main__":
import sys
sys.exit( main(sys.argv[1]) )
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment