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

List of all members.

Public Member Functions

def initTagList
def check

Detailed Description

Different Detector Events

Definition at line 12 of file DetectorTag.py.


Member Function Documentation

def TaggingExample::DetectorTag::DetectorTag::initTagList (   self)

Definition at line 16 of file DetectorTag.py.

00017                          :
00018         
00019         # define three detector tags for AD, WP and RPC
00020         # this algorithm only defines tags, do not save any user data
00021         # syntax: self.addTag('tagName', 'tagPath')
00022         # after this call self.tagSet.tagName will be available
00023         self.addTag('AD' , '/Event/UserTag/Detector/AD')
00024         self.addTag('WP' , '/Event/UserTag/Detector/WP')
00025         self.addTag('RPC', '/Event/UserTag/Detector/RPC')
00026         
00027         # or use Brett's preferred pythonic syntax
00028         # self.tagSet.AD  = Tag('/Event/UserTag/Detector/AD')
00029         # self.tagSet.WP  = Tag('/Event/UserTag/Detector/WP')
00030         # self.tagSet.RPC = Tag('/Event/UserTag/Detector/RPC')
00031         
00032         # trigger python to load the namespace of DetectorId
00033         gbl.DayaBay.Detector()
        
def TaggingExample::DetectorTag::DetectorTag::check (   self,
  evt 
)

Definition at line 35 of file DetectorTag.py.

00036                         :
00037         readoutHdr = evt["/Event/Readout/ReadoutHeader"]
00038         if not readoutHdr:
00039             self.warning('cannot find readoutHdr')
00040             return
00041         
00042         detectorId = readoutHdr.context().GetDetId()
00043         if (   detectorId == gbl.DetectorId.kAD1 
00044             or detectorId == gbl.DetectorId.kAD2
00045             or detectorId == gbl.DetectorId.kAD3
00046             or detectorId == gbl.DetectorId.kAD4):
00047             self.tagIt('AD')
00048             # or use Brett's preferred pythonic syntax
00049             # self.tagSet.AD.tagIt()
00050         elif ( detectorId == gbl.DetectorId.kIWS
00051             or detectorId == gbl.DetectorId.kOWS):
00052             self.tagIt('WP')
00053         elif (detectorId == gbl.DetectorId.kRPC):
00054             self.tagIt('RPC')
                   

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