CMS 3D CMS Logo

Public Member Functions | Static Public Attributes

SelectRuns::SelectRuns Class Reference

List of all members.

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 = "/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.

00014                       :
00015         # Save the old run list file
00016         os.system("mv "+self.FileName+" "+self.FileName+".old")
00017 
00018         # Create the cfg for the run registry script
00019         inputFile = open(self.BaseDir+"/runreg_template.cfg", "r")
00020         # print "OutputFileName = ", self.FileName
00021         outputFileContent = inputFile.read().replace("GROUP", self.Group).replace("FIRSTRUN", self.FirstRun).replace("OUTPUTFILENAME", self.FileName).replace("HLTNAMEFILTER", self.HLTNameFilter).replace("QUALITYFLAG", self.QualityFlag)
00022         outputFile = open(self.BaseDir+"/runreg.cfg", "w")
00023         outputFile.write(outputFileContent)
00024         outputFile.close()
00025 
00026         # Produce the new run list file
00027         os.system("source /afs/cern.ch/cms/ccs/wm/scripts/Crab/crab.sh; python "+self.BaseDir+"/runregparse.py")
00028 
00029         # Check if the file changed
00030         import filecmp
00031         if os.path.isfile(self.FileName+".old"):
00032             if filecmp.cmp(self.FileName, self.FileName+".old"):
00033                 # They are equal
00034                 return 1
00035             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.

string SelectRuns::SelectRuns::FileName = "/SelectedGoodRuns.txt" [static]

Definition at line 9 of file SelectRuns.py.

string SelectRuns::SelectRuns::FirstRun = "1" [static]

Definition at line 8 of file SelectRuns.py.

string SelectRuns::SelectRuns::Group = "Collisions10" [static]

Definition at line 6 of file SelectRuns.py.

Definition at line 10 of file SelectRuns.py.

string SelectRuns::SelectRuns::QualityFlag = "Strip:GOOD" [static]

Definition at line 11 of file SelectRuns.py.