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

List of all members.

Public Member Functions

def __init__
def initialize
def execute
def finalize

Public Attributes

 plot
 eventNumber

Detailed Description

Definition at line 20 of file ReadoutDumper.py.


Constructor & Destructor Documentation

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

Definition at line 22 of file ReadoutDumper.py.

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


Member Function Documentation

def ReadoutDumper::ReadoutDumperAlg::initialize (   self)

Definition at line 27 of file ReadoutDumper.py.

00028                         :
00029         status = DybPythonAlg.initialize(self)
00030         if status.isFailure(): return status
00031         self.info("initializing")
00032         
00033         self.eventNumber = 0
00034 
00035         return SUCCESS

def ReadoutDumper::ReadoutDumperAlg::execute (   self)

Definition at line 36 of file ReadoutDumper.py.

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

Definition at line 84 of file ReadoutDumper.py.

00084                       :        
00085         self.info("finalizing")
00086         
00087         status = DybPythonAlg.finalize(self)
00088         return status
00089 
00090 

Member Data Documentation

Definition at line 22 of file ReadoutDumper.py.

Definition at line 27 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 Fri May 16 2014 09:49:56 for ElecTutorial by doxygen 1.7.4