Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/common/Util/InstrumentDB.py
diff options
context:
space:
mode:
Diffstat (limited to 'common/Util/InstrumentDB.py')
-rw-r--r--common/Util/InstrumentDB.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/Util/InstrumentDB.py b/common/Util/InstrumentDB.py
index 82c0e56..d11fed8 100644
--- a/common/Util/InstrumentDB.py
+++ b/common/Util/InstrumentDB.py
@@ -100,6 +100,13 @@ class InstrumentDB:
def getInstrument( self, id ):
return self.inst[id]
+ def getInstrumentByName( self, name ):
+ try:
+ return self.instNamed[ name ]
+ except:
+ print "Instrument not found: ", name
+ return self.inst[0]
+
def debug_summarize(self):
for i in self.inst:
print i.id, i.name