Commit 64fbeb9e authored by Vincent Michel's avatar Vincent Michel

Add get_detectors to interface

parent 0ab803ff
......@@ -20,11 +20,22 @@ def new_detector(alias):
return handel.xiaNewDetector(alias)
#int xiaAddDetectorItem(char *alias, char *name, void *value);
#int xiaModifyDetectorItem(char *alias, char *name, void *value);
#int xiaGetDetectorItem(char *alias, char *name, void *value);
# int xiaAddDetectorItem(char *alias, char *name, void *value);
# int xiaModifyDetectorItem(char *alias, char *name, void *value);
# int xiaGetDetectorItem(char *alias, char *name, void *value);
def get_num_detectors():
num ='unsigned int *')
return num[0]
def get_detectors():
n = get_num_detectors()
arg = ['char []', 80) for _ in range(n)]
return [ffi.string(x) for x in arg]
# int xiaGetNumDetectors(unsigned int *numDet);
# int xiaGetDetectors(char *detectors[]);
# int xiaGetDetectors_VB(unsigned int index, char *alias);
# int xiaRemoveDetector(char *alias);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment