/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::CoincData::CoincData Class Reference
Inheritance diagram for TaggingExample::CoincData::CoincData:
Inheritance graph
[legend]
Collaboration diagram for TaggingExample::CoincData::CoincData:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def initTagList
def check
def SaveConicData

Detailed Description

Add Coincidence info to UserData

Definition at line 11 of file CoincData.py.


Member Function Documentation

def TaggingExample::CoincData::CoincData::initTagList (   self)

Definition at line 15 of file CoincData.py.

00016                          :
00017         self.addTag('Dummy', '')
00018         self.getTag('Dummy').addData('CoincData'  , '/Event/UserData/Coinc/CoincData')
00019         self.getTag('Dummy').addData('PromptData' , '/Event/UserData/Coinc/PromptData')
00020         self.getTag('Dummy').addData('DelayedData', '/Event/UserData/Coinc/DelayedData')
00021         
00022         myData = self.getTag('Dummy').getData('CoincData')
00023         myData.addInt('multiplicity')
00024         
00025         for name in ['PromptData', 'DelayedData']:
00026             myData = self.getTag('Dummy').getData(name)
00027             myData.addIntArray('t_sec', 't_nsec', 'triggerType', 'detID'
00028                  ).addFloatArray('energy', 'x', 'y', 'z')
        
def TaggingExample::CoincData::CoincData::check (   self,
  evt 
)

Definition at line 30 of file CoincData.py.

00031                         :
00032         coincHdr = evt['/Event/UserTag/Coinc/All']
00033         if not coincHdr:  # not a coincidence event
00034             return False
00035         promptHdr  = evt['/Event/UserTag/Coinc/Prompt']
00036         if not promptHdr: 
00037             self.warning('missing prompt header')
00038             return
00039         delayedHdr = evt['/Event/UserTag/Coinc/Delayed']
00040         if not delayedHdr: 
00041             self.warning('missing delayed header')
00042             return
00043         self.SaveConicData(coincHdr, promptHdr, delayedHdr)            
00044         
00045         self.tagIt('Dummy')
        
def TaggingExample::CoincData::CoincData::SaveConicData (   self,
  coincHdr,
  promptHdr,
  delayedHdr 
)
Save Coincidence Info to UserData

Definition at line 47 of file CoincData.py.

00048                                                             :
00049         '''Save Coincidence Info to UserData'''
00050         
00051         hdr_dispatcher = {
00052             'PromptData' : promptHdr,
00053             'DelayedData' : delayedHdr,
00054         }
00055         
00056         for name, tagHeader in hdr_dispatcher.items():
00057             myData = self.getTag('Dummy').getData(name)
00058             for recHdr in tagHeader.inputHeaders():
00059                 result = recHdr.recTrigger()
00060                 myData.append("energy", result.energy()/units.MeV
00061                     ).append("x", result.position().x()/units.mm
00062                     ).append("y", result.position().y()/units.mm
00063                     ).append("z", result.position().z()/units.mm
00064                     ).append("t_sec", recHdr.timeStamp().GetSec()
00065                     ).append("t_nsec", recHdr.timeStamp().GetNanoSec()
00066                     ).append("triggerType", result.triggerType()
00067                     ).append("detID", result.detector().detectorId())
00068         
00069         coincData = self.getTag('Dummy').getData('CoincData')
00070         coincRecHdrs = coincHdr.inputHeaders()
00071         coincData.set("multiplicity", len(coincRecHdrs))        
            

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