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

In This Package:

ReadoutDumper::ReadoutDumperAlg Class Reference

List of all members.

Public Member Functions

def __init__
def initialize
def execute
def finalize

Public Attributes

 plot
 eventNumber
 cableSvc

Detailed Description

Definition at line 20 of file ReadoutDumper.py.


Member Function Documentation

def ReadoutDumper::ReadoutDumperAlg::__init__ (   self,
  name 
)

Definition at line 22 of file ReadoutDumper.py.

00022                            :
00023         DybPythonAlg.__init__(self,name)
00024         self.plot={}
00025         return
00026 
    def initialize(self):

def ReadoutDumper::ReadoutDumperAlg::initialize (   self  ) 

Definition at line 27 of file ReadoutDumper.py.

00027                         :
00028         status = DybPythonAlg.initialize(self)
00029         if status.isFailure(): return status
00030         self.info("initializing")
00031         
00032         self.eventNumber = 0
00033 
00034         # Initialize services
00035         #self.cableSvc = self.svc('ICableSvc','StaticCableSvc')
00036 
00037         #self.stats.defaultPath = "/file1/waves/"
00038         # Make the trigger time histogram
00039         #self.stats["waveform"] = TGraph
00040 
00041         return SUCCESS
00042 
    def execute(self):

def ReadoutDumper::ReadoutDumperAlg::execute (   self  ) 

Definition at line 43 of file ReadoutDumper.py.

00043                      :
00044         self.info("executing")
00045         
00046         self.eventNumber+=1
00047 
00048         evt = self.evtSvc()
00049         hdr = evt["/Event/Readout/ReadoutHeader"]
00050         
00051         if (hdr.__class__ != gbl.DayaBay.ReadoutHeader ): 
00052             self.warning("Readout Header not found for this event")
00053             return SUCCESS
00054         
00055         readout = hdr.readout()
00056         #readout.__class__=gbl.DayaBay.ReadoutPmtCrate
00057         self.debug(str(readout.channelReadout()))
00058         det = readout.detector()
00059         
00060         # This works 
00061         
00062         #for channel,ro in readout.channelReadout():
00063         #    self.verbose("channel: "+str(channel))
00064         #    self.debug("size="+str(ro.size())) 
00065 
00066         dt = 1
00067         
00068         for channel,fadcRo in readout.fadcReadout():
00069             self.debug("FADC channel: " + str(channel.connector()) )
00070             tmp="["
00071             for adc in fadcRo: tmp=tmp+str(adc)+","
00072             self.verbose(tmp[:-1]+"]")
00073 
00074             path="/file1/event_%d/%s/"%(self.eventNumber, det.detName())
00075 
00076             # fadc = fadcRo
00077             clock = [tick*dt for tick in range(fadcRo.size())]
00078             print fadcRo
00079             graph = TGraph(fadcRo.size(), array('f',clock), array('f',fadcRo))
00080             graph.SetMarkerStyle(8)
00081             graph.SetMarkerColor(600)
00082             graph.SetTitle("FADC")
00083             graph.GetXaxis().SetTitle("Time (ns)")
00084             graph.GetYaxis().SetTitle("FADC Value")
00085             self.verbose("array size" + str(len(clock)))
00086             #graph.GetXaxis().SetLimits(200,600)
00087             self.stats[path+"connector_%d/fadc"%channel.connector()] = graph
00088                
00089         return SUCCESS
00090         
    def finalize(self):        

def ReadoutDumper::ReadoutDumperAlg::finalize (   self  ) 

Definition at line 91 of file ReadoutDumper.py.

00091                       :        
00092         self.info("finalizing")
00093         
00094         status = DybPythonAlg.finalize(self)
00095         return status
00096 
00097 


Member Data Documentation

ReadoutDumper::ReadoutDumperAlg::plot

Definition at line 24 of file ReadoutDumper.py.

ReadoutDumper::ReadoutDumperAlg::eventNumber

Definition at line 32 of file ReadoutDumper.py.

ReadoutDumper::ReadoutDumperAlg::cableSvc

Definition at line 35 of file ReadoutDumper.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:06:07 2011 for ElecTutorial by doxygen 1.4.7