CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
confdbOfflineConverter Namespace Reference

Classes

class  OfflineConverter
 

Functions

def help
 
def main
 

Function Documentation

def confdbOfflineConverter.help ( )

Definition at line 99 of file confdbOfflineConverter.py.

Referenced by main().

99 
100 def help():
101  sys.stdout.write("""Usage: %s OPTIONS
102 
103  --hltdev|--orcoff (target db [default: hltdev])
104 
105  --configId <id> (specify configuration by id)
106  --configName <name> (specify configuration by name)
107  --runNumber <run> (specify configuration by run)
108  [exactly one of --configId OR --configName OR --runNumber is required]
109 
110  --cff (retrieve configuration *fragment*)
111  --input <f1.root[,f2.root]> (insert PoolSource with specified fileNames)
112  --input <files.list> (read a text file which lists input ROOT files)
113  --output <out.root> (insert PoolOutputModule w/ specified fileName)
114  --nopsets (exclude all globale psets)
115  --noedsources (exclude all edsources)
116  --noes (exclude all essources *and* esmodules)
117  --noessources (exclude all essources)
118  --noesmodules (exclude all esmodules)
119  --noservices (exclude all services)
120  --nooutput (exclude all output modules)
121  --nopaths (exclude all paths [+=referenced seqs&mods])
122  --nosequences (don't define sequences [+=referenced s&m])
123  --nomodules (don't define modules)
124  --psets <pset1[,pset2]> (include only specified global psets)
125  --psets <-pset1[,-pset2]> (include all global psets but the specified)
126  --essources <ess1[,ess2]> (include only specified essources)
127  --essources <-ess1[,-ess2]> (include all essources but the specified)
128  --esmodules <esm1[,esm2]> (include only specified esmodules)
129  --esmodules <-esm1[,-esm2]> (include all esmodules but the specified)
130  --services <svc1[,svc2]> (include only specified services)
131  --services <-svc1[,-svc2]> (include all services but the specified)
132  --paths <p1[,p2]> (include only specified paths)
133  --paths <-p1[,-p2]> (include all paths but the specified)
134  --streams <s1[,s2]> (include only specified streams)
135  --datasets <d1[,d2]> (include only specified datasets)
136  --sequences <s1[,s2]> (include sequences, referenced or not!)
137  --modules <p1[,p2]> (include modules, referenced or not!)
138  --blocks <m1::p1[,p2][,m2]> (generate parameter blocks)
139 """)
140 
def confdbOfflineConverter.main ( )

Definition at line 141 of file confdbOfflineConverter.py.

References help().

142 def main():
143  args = sys.argv[1:]
144  db = 'hltdev'
145 
146  if not args:
147  help()
148  sys.exit(1)
149 
150  if '--help' in args or '-h' in args:
151  help()
152  sys.exit(0)
153 
154  if '--orcoff' in args and '--hltdev' in args:
155  sys.stderr.write( "ERROR: conflicting database specifications \"--hltdev\" and \"--orcoff\"\n" )
156  sys.exit(1)
157 
158  if '--runNumber' in args and '--hltdev' in args:
159  sys.stderr.write( "ERROR: conflicting database specifications \"--hltdev\" and \"--runNumber\"\n" )
160  sys.exit(1)
161 
162  if '--hltdev' in args:
163  db = 'hltdev'
164  args.remove('--hltdev')
165 
166  if '--orcoff' in args:
167  db = 'orcoff'
168  args.remove('--orcoff')
169 
170  if '--runNumber' in args:
171  db = 'orcoff'
172 
173  converter = OfflineConverter(database = db)
174  out, err = converter.query( * args )
175  if 'ERROR' in err:
176  sys.stderr.write( "%s: error while retriving the HLT menu\n\n%s\n\n" % (sys.argv[0], err) )
177  sys.exit(1)
178  else:
179  sys.stdout.write( out )
180