81 def __init__(self, sqlite_file_name):
82 self._file_name = sqlite_file_name
85 connection = sqlite3.connect(self._file_name)
86 cursor = connection.cursor()
87 if query_object ==
None:
89 tables = cursor.execute(
"select name from sqlite_master where type = 'table'")
93 for table
in tables.fetchall():
94 table_to_columns[table[0]] = []
96 columns = cursor.execute(
"pragma table_info(%s)" % table[0])
97 for column
in columns.fetchall():
98 table_to_columns[table[0]].
append(
str(column[1]))
102 for table
in table_to_columns:
104 column_string =
",".
join(table_to_columns[table])
105 sql_query =
"select %s from %s" % (column_string, table)
106 results = cursor.execute(sql_query).fetchall()
107 for n
in range(0, len(results)):
108 results[n] = dict(list(
zip(table_to_columns[table], list(
map(str, results[n])))))
109 table_to_data[
str(table)] = results
110 self._data = json_data_node.make(table_to_data)
112 sql_query = query_object.to_sql()
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
static std::string join(char **cmd)