| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Dump::SayWhat Class Reference

Inheritance diagram for Dump::SayWhat:
[legend]
Collaboration diagram for Dump::SayWhat:
[legend]
List of all members.

Public Member Functions

def __init__
def dump_genheader
def dump_roheader
def check_roheader
def execute
def __init__
def initialize
def execute
def finalize
def verbose
def debug
def info
def warning
def error
def fatal
def getAES

Public Attributes

 genPath
 readoutPath
 msgSvc
 archiveSvc
 stats

Detailed Description

Definition at line 8 of file Dump.py.


Member Function Documentation

def Dump::SayWhat::__init__ (   self,
  name = None 
)

Definition at line 10 of file Dump.py.

00010                                    :
00011         DybPythonAlg.__init__(self,name)
00012 
00013         self.genPath = '/Event/Gen/GenHeader'
00014         self.readoutPath = '/Event/Readout/ReadoutHeader'
00015 
00016         return
00017 
    def dump_genheader(self,gh):

def Dump::SayWhat::dump_genheader (   self,
  gh 
)

Definition at line 18 of file Dump.py.

00018                                :
00019         if not gh: 
00020             self.info("GenHeader does not exist")
00021             return
00022 
00023 
00024         evt = gh.event()
00025 
00026         self.info("GenHeader(%s)#%d @ %s" % (gh.generatorName(), evt.event_number(),
00027                                              gh.context().AsString()))
00028         vtx = evt.signal_process_vertex()
00029         for part in irange(vtx.particles_out_const_begin(), vtx.particles_out_const_end()):
00030             self.info('\t%d (%d) %f MeV' % (part.pdg_id(), part.status(), 
00031                                             part.generatedMass()/units.MeV) )
00032             continue
00033         return
00034 
    def dump_roheader(self,rh):

def Dump::SayWhat::dump_roheader (   self,
  rh 
)

Definition at line 35 of file Dump.py.

00035                               :
00036         if not rh: 
00037             self.info("ReadoutHeader does not exist")
00038             return
00039 
00040         self.info("ReadoutHeader @ %s" % rh.context().AsString())
00041 
00042         ro = rh.readout()
00043         if not ro:
00044             self.info("No Readout object in the ReadoutHeader")
00045         else:
00046             self.info("Readout: %s #%d @ %s %d" % (ro.detector().asString(),
00047                                                    ro.triggerNumber(), 
00048                                                    ro.triggerTime().AsString(),
00049                                                    ro.triggerType()) )
00050             pass
00051             
00052         dc = rh.daqCrate()
00053         if not dc:
00054             self.info("No DaqCrate object in the ReadoutHeader")
00055         else:
00056             self.info("DaqCrate: %s #%d[%d] @ %s %d" % (dc.detector().asString(),
00057                                                         dc.eventNumber(), 
00058                                                         dc.localTriggerNumber(),
00059                                                         dc.triggerTime().AsString(), 
00060                                                         dc.triggerType() ))
00061             pass
00062         return
00063 
    def check_roheader(self,roh):

def Dump::SayWhat::check_roheader (   self,
  roh 
)

Definition at line 64 of file Dump.py.

00064                                 :
00065         'Return True if okay'
00066         dt = roh.latest().GetSeconds() - roh.earliest().GetSeconds()
00067         if dt <= 1e-9:
00068             #self.warning('ReadoutHeader at "%s" has too small dt: %f seconds' % \
00069             #                 (roh.context().AsString(),dt))
00070             return False
00071         return True
00072 
    def execute(self):

def Dump::SayWhat::execute (   self  ) 

Definition at line 73 of file Dump.py.

00073                      :
00074         tes = self.evtSvc()
00075 
00076         self.info("Dumping TES")
00077         self.dump_genheader(tes[self.genPath])
00078         roh = tes[self.readoutPath]
00079         self.dump_roheader(roh)
00080         if not self.check_roheader(roh):
00081             pass
00082             #return FAILURE
00083 
00084         self.info("Dumping AES")
00085         ghlist = self.getAES(self.genPath) or []
00086         for gh in ghlist:
00087             self.dump_genheader(gh)
00088         rhlist = self.getAES(self.readoutPath) or []
00089         for rh in rhlist:
00090             self.dump_roheader(rh)
00091 
00092         return SUCCESS
00093 
def configure(argv=None):


Member Data Documentation

Dump::SayWhat::genPath

Definition at line 13 of file Dump.py.

Dump::SayWhat::readoutPath

Definition at line 14 of file Dump.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 Mon Apr 11 20:48:46 2011 for Test15 by doxygen 1.4.7