/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
WaveDumper::WaveDumperAlg Class Reference
Inheritance diagram for WaveDumper::WaveDumperAlg:
Inheritance graph
[legend]
Collaboration diagram for WaveDumper::WaveDumperAlg:
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 WaveDumper.py.


Constructor & Destructor Documentation

def WaveDumper::WaveDumperAlg::__init__ (   self,
  name 
)

Definition at line 22 of file WaveDumper.py.

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


Member Function Documentation

def WaveDumper::WaveDumperAlg::initialize (   self)

Definition at line 27 of file WaveDumper.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 WaveDumper::WaveDumperAlg::execute (   self)

Definition at line 36 of file WaveDumper.py.

00037                      :
00038         self.info("executing")
00039         
00040         self.eventNumber+=1
00041         
00042         evt = self.evtSvc()
00043         hdr = evt["/Event/Elec/ElecHeader"]
00044         
00045         if (hdr.__class__ != gbl.DayaBay.ElecHeader ): 
00046             self.warning("ElecHeader not found for this event")
00047             return SUCCESS
00048         
00049         crateHeader = hdr.crateHeader()
00050         hitDt = 12.5
00051         energyDt = 5
00052         adcDt = 25
00053         tdcDt = 25./16
00054         for det,crate in crateHeader.crates():
00055             self.debug("Processing " + det.detName())
00056             crate.__class__=gbl.DayaBay.ElecFeeCrate
00057             
00058             boardpath="/file1/event_%d/%s/"%(self.eventNumber,
00059                                                            det.detName())                
00060             esumAdc = crate.esumADC()
00061             energyClock = [tick*energyDt for tick in range(esumAdc.size())]
00062             print esumAdc
00063             graph = TGraph(esumAdc.size(),
00064                            array('f',energyClock),
00065                            array('f',esumAdc))
00066             graph.SetMarkerStyle(8)   # large circle
00067             graph.SetMarkerColor(600) # blue
00068             graph.SetTitle("esumADC")
00069             self.stats[boardpath+"esumAdc"] = graph
00070            
00071             esumUpper = crate.esumUpper()
00072             energyClock = [tick*energyDt for tick in range(esumUpper.size())]
00073             graph = TGraph(esumAdc.size(),
00074                            array('f',energyClock),
00075                            array('f',esumUpper))
00076             graph.SetMarkerStyle(8)   # large circle
00077             graph.SetMarkerColor(600) # blue
00078             graph.SetTitle("esumUpper")
00079             self.stats[boardpath+"esumUpper"] = graph
00080 
00081             esumLower = crate.esumLower()
00082             energyClock = [tick*energyDt for tick in range(esumLower.size())]
00083             graph = TGraph(esumLower.size(),
00084                            array('f',energyClock),
00085                            array('f',esumLower))
00086             graph.SetMarkerStyle(8)   # large circle
00087             graph.SetMarkerColor(600) # blue
00088             graph.SetTitle("esumLower")
00089             self.stats[boardpath+"esumLower"] = graph
00090            
00091             esumTotal = crate.esumTotal()
00092             energyClock = [tick*energyDt for tick in range(esumTotal.size())]
00093             graph = TGraph(esumTotal.size(),
00094                            array('f',energyClock),
00095                            array('f',esumTotal))
00096             graph.SetMarkerStyle(8)   # large circle
00097             graph.SetMarkerColor(600) # blue
00098             graph.SetTitle("esumTotal")
00099             self.stats[boardpath+"esumTotal"] = graph
00100                            
00101            
00102             for chID,channel in crate.channelData():
00103                 path="/file1/"
00104                 path+="event_%d/%s/board_%d/connector_%d/"%(self.eventNumber,
00105                                                            det.detName(),
00106                                                            chID.board(),
00107                                                            chID.connector())
00108 #                self.debug(path)
00109                 # only proceed if the channel was hit
00110                 tdc = channel.tdc()
00111                 if tdc.size() > 0:
00112                     adcHigh = channel.adcHigh()
00113                     adcHighClock = [tick*adcDt for tick in range(adcHigh.size())]
00114                     graph=TGraph(adcHigh.size(),
00115                                  array('f',adcHighClock),
00116                                  array('f',adcHigh))
00117                     graph.SetMarkerStyle(8)   # large circle
00118                     graph.SetMarkerColor(600) # blue
00119                     graph.SetTitle("adcHigh")
00120                     self.stats[path+"adcHigh"] = graph
00121                    
00122                     hit = channel.hit()
00123                     hitClock = [tick*hitDt for tick in range(hit.size())]
00124                     graph= TGraph(hit.size(),
00125                                                     array('f',hitClock),
00126                                                     array('f',hit))
00127                     graph.SetMarkerStyle(8)   # large circle
00128                     graph.SetMarkerColor(600) # blue
00129                     graph.SetTitle("nhit")
00130                     self.stats[path+"nhit"]=graph
00131                     
00132                     adcLow = channel.adcLow()
00133                     adcLowClock = [tick*adcDt for tick in range(adcLow.size())]
00134                     graph = TGraph(adcLow.size(),
00135                                    array('f',adcLowClock),
00136                                    array('f',adcLow))
00137                     graph.SetMarkerStyle(8)   # large circle
00138                     graph.SetMarkerColor(600) # blue
00139                     graph.SetTitle("adcLow")
00140                     self.stats[path+"adcLow"] = graph                                  
00141                                                   
00142         return SUCCESS
        
def WaveDumper::WaveDumperAlg::finalize (   self)

Definition at line 143 of file WaveDumper.py.

00143                       :        
00144         self.info("finalizing")
00145         status = DybPythonAlg.finalize(self)
00146         return status
00147 
00148 

Member Data Documentation

Definition at line 22 of file WaveDumper.py.

Definition at line 27 of file WaveDumper.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