CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
framework_test2.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import pprint
4 import datetime
5 
6 if __name__ == "__main__":
7  # this class should extend a framework base class that
8  # provides default implementations of important methods
9  import sys
10  from CondCore.Utilities.CondDBFW import querying_framework_api
11  import CondCore.Utilities.CondDBFW.data_sources as data_sources, CondCore.Utilities.CondDBFW.data_formats as format
12  from CondCore.Utilities.CondDBFW.querying import connect
13 
14  class query_script():
15 
16  def script(self, connection):
17  gt = connection.global_tag(name="74X_dataRun1_HLT_frozen_v2")
18  tags = gt.tags(30)
19  return tags
20 
21  secrets_file = "/afs/cern.ch/cms/DB/conddb/.cms_cond/netrc"
22  secrets_file_1 = "netrc_test"
23 
24  connection_data = {"db_alias" : "orapro", "schema" : "cms_conditions", "host" : "oracle", "secrets" : secrets_file}
25  qf = querying_framework_api(connection_data)
26  data = qf.run_script(query_script())
27 
28  data.as_table()