CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Attributes
SelectRuns.SelectRuns Class Reference

Public Member Functions

def makeList
 

Static Public Attributes

string BaseDir = "/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/HDQM/Cron/Scripts/RunSelection/Test"
 
string FileName = BaseDir+"/SelectedGoodRuns.txt"
 
string FirstRun = "1"
 
string Group = "Collisions10"
 
string HLTNameFilter = ""
 
string QualityFlag = "Strip:GOOD"
 

Detailed Description

Definition at line 3 of file SelectRuns.py.

Member Function Documentation

def SelectRuns.SelectRuns.makeList (   self)

Definition at line 13 of file SelectRuns.py.

References SelectRuns.SelectRuns.BaseDir, HDQMDatabaseProducerConfiguration.HDQMDatabaseProducerConfiguration.BaseDir, SelectRuns.SelectRuns.FileName, SelectRuns.SelectRuns.FirstRun, HDQMDatabaseProducerConfiguration.HDQMDatabaseProducerConfiguration.FirstRun, SelectRuns.SelectRuns.Group, HDQMDatabaseProducerConfiguration.HDQMDatabaseProducerConfiguration.Group, SelectRuns.SelectRuns.HLTNameFilter, SelectRuns.SelectRuns.QualityFlag, HDQMDatabaseProducerConfiguration.HDQMDatabaseProducerConfiguration.QualityFlag, and python.rootplot.root2matplotlib.replace().

13 
14  def makeList(self):
15  # Save the old run list file
16  os.system("mv "+self.FileName+" "+self.FileName+".old")
17 
18  # Create the cfg for the run registry script
19  inputFile = open(self.BaseDir+"/runreg_template.cfg", "r")
20  # print "OutputFileName = ", self.FileName
21  outputFileContent = inputFile.read().replace("GROUP", self.Group).replace("FIRSTRUN", self.FirstRun).replace("OUTPUTFILENAME", self.FileName).replace("HLTNAMEFILTER", self.HLTNameFilter).replace("QUALITYFLAG", self.QualityFlag)
22  outputFile = open(self.BaseDir+"/runreg.cfg", "w")
23  outputFile.write(outputFileContent)
24  outputFile.close()
25 
26  # Produce the new run list file
27  os.system("source /afs/cern.ch/cms/ccs/wm/scripts/Crab/crab.sh; python "+self.BaseDir+"/runregparse.py")
28 
29  # Check if the file changed
30  import filecmp
31  if os.path.isfile(self.FileName+".old"):
32  if filecmp.cmp(self.FileName, self.FileName+".old"):
33  # They are equal
34  return 1
35  return 0

Member Data Documentation

string SelectRuns.SelectRuns.BaseDir = "/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/HDQM/Cron/Scripts/RunSelection/Test"
static

Definition at line 5 of file SelectRuns.py.

Referenced by SelectRuns.SelectRuns.makeList().

string SelectRuns.SelectRuns.FileName = BaseDir+"/SelectedGoodRuns.txt"
static

Definition at line 9 of file SelectRuns.py.

Referenced by SelectRuns.SelectRuns.makeList(), and PopulateDB.PopulateDB.run().

string SelectRuns.SelectRuns.FirstRun = "1"
static
string SelectRuns.SelectRuns.Group = "Collisions10"
static
string SelectRuns.SelectRuns.HLTNameFilter = ""
static

Definition at line 10 of file SelectRuns.py.

Referenced by SelectRuns.SelectRuns.makeList().

string SelectRuns.SelectRuns.QualityFlag = "Strip:GOOD"
static