ATLAS Offline Software
MetaDataMT.py
Go to the documentation of this file.
1 #! /usr/bin/python
2 
3 import os
4 import threading
5 import logging
6 
7 log = logging.getLogger("myCentralPageLogger")
8 
9 
10 class StoreMetaData(threading.Thread):
11 
12  def __init__(self, threadID, q):
13 
14  threading.Thread.__init__(self)
15  self.threadID = threadID
16  self.q = q
17 
18  def run(self):
19  while True:
20 
21  entry = self.q.get()
22  self.process_data(entry)
23  self.q.task_done()
24 
25  def process_data(self, entry):
26 
27  inputList = entry[0]
28  outFile_meta = entry[1]
29  query_fields = entry[2]
30 
31  cmd = "getMetadata.py --allowBadStatus --inDS="+inputList+" --outFile="+outFile_meta+" --delim=\";;;\" --fields="+query_fields
32 
33  os.system(cmd)
MetaDataMT.StoreMetaData.run
def run(self)
Definition: MetaDataMT.py:18
MetaDataMT.StoreMetaData.process_data
def process_data(self, entry)
Definition: MetaDataMT.py:25
MetaDataMT.StoreMetaData.__init__
def __init__(self, threadID, q)
Definition: MetaDataMT.py:12
MetaDataMT.StoreMetaData
Definition: MetaDataMT.py:10
MetaDataMT.StoreMetaData.threadID
threadID
Definition: MetaDataMT.py:15
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
MetaDataMT.StoreMetaData.q
q
Definition: MetaDataMT.py:16