/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 | Public Attributes
Tagger::SpecialEvents::SpecialEvents Class Reference
Inheritance diagram for Tagger::SpecialEvents::SpecialEvents:
Inheritance graph
[legend]
Collaboration diagram for Tagger::SpecialEvents::SpecialEvents:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def initTagList
def check

Public Attributes

 location
 tag_location
 identifier
 ids
 eventlist_file
 myTag
 ids_dict

Detailed Description

Definition at line 17 of file SpecialEvents.py.


Constructor & Destructor Documentation

def Tagger::SpecialEvents::SpecialEvents::__init__ (   self,
  name 
)

Definition at line 20 of file SpecialEvents.py.

00021                             :
00022         UserTaggingAlg.__init__(self, name)
00023         self.location = '/Event/Readout/ReadoutHeader'
00024         self.tag_location = '/Event/UserTag/SpecialEvent'
00025         self.identifier = 'execNumber()'
00026         self.ids = ['1', '2', '3']
00027         self.eventlist_file = None
                

Member Function Documentation

def Tagger::SpecialEvents::SpecialEvents::initTagList (   self)

Definition at line 29 of file SpecialEvents.py.

00029                          :        
00030         self.myTag = self.addTag('SpecialEvent', self.tag_location)
00031         
00032         if self.eventlist_file:
00033             try:
00034                 self.ids = open(self.eventlist_file).read().split()
00035             except IOError:
00036                 self.error(self.eventlist_file  + ' does not exist.')
00037                 return FAILURE
00038         self.ids_dict = {}
00039         for eventId in self.ids:
00040             self.ids_dict.setdefault(eventId, 1)
00041         # self.info(str(self.ids_dict))
00042         
def Tagger::SpecialEvents::SpecialEvents::check (   self,
  evt 
)

Definition at line 44 of file SpecialEvents.py.

00045                         :
00046         header = evt[self.location]
00047         if not header:
00048             self.warning('cannot find %s' % self.location)
00049             return FAILURE
00050         
00051         try:
00052             eventId = str(eval('header.'+self.identifier))
00053         except AttributeError:
00054             self.error('identifier function %s does not exist', self.identifier)
00055             return FAILURE
00056         
00057         if (eventId in self.ids_dict):
00058             self.myTag.addInputHeader(header)
00059             recHeader = evt['/Event/Rec/AdSimple']
00060             if recHeader:
00061                 self.myTag.addInputHeader(recHeader)
00062             self.myTag.tagIt()
00063             self.info('spectial event #%s tagged' % eventId)
        

Member Data Documentation

Definition at line 20 of file SpecialEvents.py.

Definition at line 20 of file SpecialEvents.py.

Definition at line 20 of file SpecialEvents.py.

Definition at line 20 of file SpecialEvents.py.

Definition at line 20 of file SpecialEvents.py.

Definition at line 29 of file SpecialEvents.py.

Definition at line 29 of file SpecialEvents.py.


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:18 for Tagger by doxygen 1.7.4