Public Member Functions | |
def | __init__ |
def | execute |
Simple algorithm which implicitely book&Fill Event Tag collection
Definition at line 30 of file EvtColWrite.py.
def EvtColWrite::EvtColEx::__init__ | ( | self, | ||
name = 'EvtColEx' | ||||
) |
Constructor
Definition at line 32 of file EvtColWrite.py.
00032 : 00033 """ Constructor """ 00034 TupleAlgo.__init__( self , name ) 00035 self.s_nEvt = 0 00036 self.s_nRun = 0 00037 00038 def execute( self ) :
def EvtColWrite::EvtColEx::execute | ( | self | ) |
The major method 'execute', it is invoked for each event
Definition at line 39 of file EvtColWrite.py.
00039 : 00040 """ The major method 'execute', it is invoked for each event """ 00041 00042 self.s_nEvt += 1 00043 if 1 == self.s_nEvt % 50 : self.s_nRun += 1 00044 00045 rSvc = self.randSvc() 00046 00047 gauss = Numbers ( rSvc , Rndm.Gauss ( 0.0 , 1.0 ) ) 00048 flat = Numbers ( rSvc , Rndm.Flat ( -10 , 10 ) ) 00049 expo = Numbers ( rSvc , Rndm.Exponential ( 1.0 ) ) 00050 breit = Numbers ( rSvc , Rndm.BreitWigner ( 0.0 , 1.0 ) ) 00051 poisson = Numbers ( rSvc , Rndm.Poisson ( 2.0 ) ) 00052 binom = Numbers ( rSvc , Rndm.Binomial ( 8 , 0.25 ) ) 00053 00054 address = self.get('/Event') 00055 address = address.registry().address() 00056 00057 # get the event tag collection itself 00058 tup = self.evtCol( 'COL1' , 'My trivial N-tuple' ) 00059 00060 tup.column ( 'Address' , address ) 00061 00062 tup.column ( 'evtNum' , self.s_nEvt ) 00063 tup.column ( 'runNum' , self.s_nRun ) 00064 00065 tup.column ( 'gauss' , gauss () ) 00066 tup.column ( 'flat' , flat () ) 00067 tup.column ( 'expo' , expo () ) 00068 tup.column ( 'poisson' , int ( poisson () ) ) 00069 tup.column ( 'binom' , int ( binom () ) ) 00070 tup.column ( 'flag' , 0 > gauss () ) 00071 00072 return SUCCESS 00073 00074 def _evtcolsvc_(self, name='EvtTupleSvc') :