Public Member Functions | |
def | findDetector |
def | __init__ |
def | initialize |
def | execute |
def | finalize |
Public Attributes | |
cableSvc | |
Static Public Attributes | |
list | detList |
Definition at line 21 of file ReadoutDetector.py.
def ReadoutDetector::ReadoutDetectorAlg::findDetector | ( | instance, | ||
detname, | ||||
detlist = detList | ||||
) |
Definition at line 26 of file ReadoutDetector.py.
00026 : 00027 for i in range(0,len(detlist)): 00028 if (detlist[i] == detname): 00029 instance.stats["/file0/readout/DetectorName"].Fill(detlist[i],scale) 00030 def __init__(self,name):
def ReadoutDetector::ReadoutDetectorAlg::__init__ | ( | self, | ||
name | ||||
) |
Definition at line 31 of file ReadoutDetector.py.
00031 : 00032 DybPythonAlg.__init__(self,name) 00033 return 00034 def initialize(self):
def ReadoutDetector::ReadoutDetectorAlg::initialize | ( | self | ) |
Definition at line 35 of file ReadoutDetector.py.
00035 : 00036 status = DybPythonAlg.initialize(self) 00037 if status.isFailure(): return status 00038 self.info("initializing") 00039 00040 self.cableSvc = self.svc('ICableSvc','StaticCableSvc') 00041 if self.cableSvc == None: 00042 self.error("Failed to get StaticCableSvc") 00043 return FAILURE 00044 00045 hist = TH1F("Events","The Readout Detector" ,16, 0.0, 16.0) 00046 hist.GetXaxis().SetTitle("Readout Detector") 00047 hist.GetYaxis().SetTitle("Events/Day") 00048 for i in range(0,len(self.detList)): 00049 hist.GetXaxis().SetBinLabel(2 * (i + 1),self.detList[i]) 00050 self.stats["/file0/readout/DetectorName"] = hist 00051 00052 return SUCCESS 00053 def execute(self):
def ReadoutDetector::ReadoutDetectorAlg::execute | ( | self | ) |
Definition at line 54 of file ReadoutDetector.py.
00054 : 00055 self.info("executing") 00056 evt = self.evtSvc() 00057 00058 readoutHdr = evt["/Event/Readout/ReadoutHeader"] 00059 if readoutHdr == None: 00060 self.error("Failed to get ReadoutHeader") 00061 return FAILURE 00062 00063 readout = readoutHdr.readout() 00064 if readout != None: 00065 detectorName = readout.detector().detName() 00066 self.findDetector(detectorName) 00067 00068 return SUCCESS 00069 def finalize(self):
def ReadoutDetector::ReadoutDetectorAlg::finalize | ( | self | ) |
Definition at line 70 of file ReadoutDetector.py.
00070 : 00071 self.info("finalizing") 00072 status = DybPythonAlg.finalize(self) 00073 return status 00074 00075 ##### Job Configuration for nuwa.py ########################################
list ReadoutDetector::ReadoutDetectorAlg::detList [static] |
Initial value:
['DayaBayAD1', 'DayaBayAD2','LingAoAD1','LingAoAD2', 'FarAD1','FarAD2','FarAD3','FarAD4']
Definition at line 23 of file ReadoutDetector.py.
Definition at line 40 of file ReadoutDetector.py.