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 85 of file confdbOfflineConverter.py.

Referenced by main().

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

Definition at line 127 of file confdbOfflineConverter.py.

References help().

128 def main():
129  args = sys.argv[1:]
130  db = 'hltdev'
131 
132  if not args:
133  help()
134  sys.exit(1)
135 
136  if '--help' in args or '-h' in args:
137  help()
138  sys.exit(0)
139 
140  if '--orcoff' in args and '--hltdev' in args:
141  sys.stderr.write( "ERROR: conflicting database specifications \"--hltdev\" and \"--orcoff\"\n" )
142  sys.exit(1)
143 
144  if '--runNumber' in args and '--hltdev' in args:
145  sys.stderr.write( "ERROR: conflicting database specifications \"--hltdev\" and \"--runNumber\"\n" )
146  sys.exit(1)
147 
148  if '--hltdev' in args:
149  db = 'hltdev'
150  args.remove('--hltdev')
151 
152  if '--orcoff' in args:
153  db = 'orcoff'
154  args.remove('--orcoff')
155 
156  if '--runNumber' in args:
157  db = 'orcoff'
158 
159  converter = OfflineConverter(database = db)
160  out, err = converter.query( * args )
161  if 'ERROR' in err:
162  sys.stderr.write( "%s: error while retriving the HLT menu\n\n%s\n\n" % (sys.argv[0], err) )
163  sys.exit(1)
164  else:
165  sys.stdout.write( out )
166