/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions
TaggingExample::ADCalibData::ADCalibData Class Reference
Inheritance diagram for TaggingExample::ADCalibData::ADCalibData:
Inheritance graph
[legend]
Collaboration diagram for TaggingExample::ADCalibData::ADCalibData:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def initTagList
def check
def SaveCalibData

Detailed Description

Add AD Calibration Info to UserData

Definition at line 11 of file ADCalibData.py.


Member Function Documentation

def TaggingExample::ADCalibData::ADCalibData::initTagList (   self)

Definition at line 15 of file ADCalibData.py.

00015                          :  
00016         self.addTag('Dummy', ''
00017             ).addData('ADCalibData', '/Event/UserData/AD/ADCalibData'
00018             ).addInt('NPESum')
00019 
def TaggingExample::ADCalibData::ADCalibData::check (   self,
  evt 
)

Definition at line 21 of file ADCalibData.py.

00022                         :
00023         ADTag = evt['/Event/UserTag/Detector/AD']
00024         if not ADTag:
00025             return False
00026         
00027         calibHdr = evt['/Event/CalibReadout/CalibReadoutHeader']
00028         if not calibHdr:
00029             self.warning('cannot find calibHdr')
00030             return
00031         self.SaveCalibData(calibHdr)            
00032 
00033         self.tagIt('Dummy')
        
def TaggingExample::ADCalibData::ADCalibData::SaveCalibData (   self,
  calibHdr 
)
Save calibration info to UserData

Definition at line 35 of file ADCalibData.py.

00036                                      :
00037         '''Save calibration info to UserData'''
00038                 
00039         NPESum = 0.            
00040         readout = calibHdr.calibReadout()
00041         for channel in readout.channelReadout():
00042             sensorId = channel.pmtSensorId()
00043             pmtId = gbl.DayaBay.AdPmtSensor(sensorId.fullPackedData())
00044             if pmtId.ring() == 0: continue  # exclude 2'' PMTs
00045             for i in range(channel.size()):
00046                 charge = channel.charge(i)
00047                 NPESum += charge
00048         
00049         myData = self.tagSet.Dummy.dataSet.ADCalibData            
00050         myData.set("NPESum", NPESum)            
00051         # myData.dump()
        

The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:54:29 for TaggingExample by doxygen 1.7.4