CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
das.DASOptionParser Class Reference

Public Member Functions

def __init__ (self, usage=None)
 
def get_opt (self)
 

Public Attributes

 parser
 

Detailed Description

DAS cache client option parser

Definition at line 21 of file das.py.

Constructor & Destructor Documentation

◆ __init__()

def das.DASOptionParser.__init__ (   self,
  usage = None 
)

Definition at line 25 of file das.py.

25  def __init__(self, usage = None):
26  if usage is None:
27  usage = 'usage: %prog [options] --query "dataset=/HT/Run2011A-*/AOD"'
28  self.parser = OptionParser(usage=usage)
29  group = OptionGroup(self.parser,"Das options","These options relate to the Das client interface.")
30  group.add_option("-v", "--verbose", action="store",
31  type="int", default=0, dest="verbose",
32  help="verbose output")
33  group.add_option("--query", action="store", type="string",
34  default=False, dest="query",
35  help="specify query for your request")
36  group.add_option("--host", action="store", type="string",
37  default='https://cmsweb.cern.ch', dest="host",
38  help="specify host name of DAS cache server, default https://cmsweb.cern.ch")
39  group.add_option("--idx", action="store", type="int",
40  default=0, dest="idx",
41  help="start index for returned result set, aka pagination, use w/ limit")
42  group.add_option("--limit", action="store", type="int",
43  default=10, dest="limit",
44  help="number of returned results (results per page)")
45  group.add_option("--format", action="store", type="string",
46  default="json", dest="format",
47  help="specify return data format (json or plain), default json")
48  self.parser.add_option_group(group)

Member Function Documentation

◆ get_opt()

def das.DASOptionParser.get_opt (   self)
Returns parse list of options

Definition at line 49 of file das.py.

49  def get_opt(self):
50  """
51  Returns parse list of options
52  """
53  return self.parser.parse_args()
54 

References main.parse_args(), HcalPatternXMLParserImpl.parser, query.DDOptionParser.parser, batchHippy.MyBatchManager.parser, das.DASOptionParser.parser, main.SkeletonOptionParser.parser, lhef::XMLDocument.parser, das_client.DASOptionParser.parser, and XMLDOMBlock.parser.

Member Data Documentation

◆ parser

das.DASOptionParser.parser

Definition at line 28 of file das.py.

Referenced by das.DASOptionParser.get_opt().

main.parse_args
def parse_args(args)
Definition: main.py:63