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

List of all members.

Public Member Functions

def __init__
def initialize
def execute
def finalize

Public Attributes

 hist
 histSvc

Detailed Description

Definition at line 20 of file checkIBD.py.


Constructor & Destructor Documentation

def checkIBD::plotIbdBasics::__init__ (   self,
  name 
)

Definition at line 22 of file checkIBD.py.

00023                            :
00024         GaudiAlgo.__init__(self,name)
00025         self.hist = {}
00026         # Counters
00027         return
    

Member Function Documentation

def checkIBD::plotIbdBasics::initialize (   self)

Definition at line 28 of file checkIBD.py.

00029                         :
00030         print "Initializing the IBD basic ploter", self.name()
00031         status = GaudiAlgo.initialize(self)
00032         if status.isFailure(): return status
00033 
00034         # What services do you need?
00035         self.histSvc = self.svc('ITHistSvc', 'THistSvc')
00036 
00037         self.hist["TrigTime"] = TH1F("TrigTime","Trigger Time [s]",100,0.0,10.0)
00038         self.hist["Tdc"] = TH1F("Tdc","TDC Values",300,0,300)
00039         self.hist["Adc"] = TH1F("Adc","Adc Values",75,0,30000)
00040         
00041         status = self.histSvc.regHist('/file1/basics/TrigTime', \
00042                                           self.hist["TrigTime"])
00043         if status.isFailure(): return status
00044         
00045         status = self.histSvc.regHist('/file1/basics/tdc', \
00046                                           self.hist["Tdc"])
00047         if status.isFailure(): return status
00048         
00049         status = self.histSvc.regHist('/file1/basics/adc', \
00050                                           self.hist["Adc"])
00051         if status.isFailure(): return status
00052         
00053         return SUCCESS

def checkIBD::plotIbdBasics::execute (   self)

Definition at line 54 of file checkIBD.py.

00055                      :
00056         print "Executing plotIbdBasics", self.name()
00057         evt = self.evtSvc()
00058         rohdr = evt['/Event/Readout/ReadoutHeader']
00059         if rohdr == None:
00060             print "No ReadoutHeader in this Event"
00061             return SUCCESS
00062         ro = rohdr.readout()
00063         if ro == None:
00064             self.info("No Readout this cycle")
00065             return SUCCESS
00066         
00067         print ro.detector().detName()
00068         # Exercise 2: Histogram the readout trigger time
00069         self.hist["TrigTime"].Fill( ro.triggerTime().GetSeconds() )        
00070         # Exercise 3: Histogram the TDC values
00071         
00072         adcSum=0
00073         
00074         channelIDs = ro.channels() # Get list of channel IDs in the readout
00075         for channelID in channelIDs:
00076             channel = ro.channel(channelID) # get the data from the channel
00077             for tdc in channel.tdc(): # loop over list of TDC values on channel
00078                 self.hist["Tdc"].Fill( tdc )
00079             
00080             for adcClock in channel.adcClocks():
00081                 adc = channel.adcByClock(adcClock)
00082                 adcSum+=adc-500
00083                 # print adcClock, adc
00084         self.hist["Adc"].Fill( adcSum )
00085         print "AdcSum: ", adcSum
00086             
00087         return SUCCESS
00088     
    
def checkIBD::plotIbdBasics::finalize (   self)

Definition at line 89 of file checkIBD.py.

00090                       :
00091         print "Finalizing ", self.name()
00092         status = GaudiAlgo.finalize(self)
00093         return status


Member Data Documentation

Definition at line 22 of file checkIBD.py.

Definition at line 28 of file checkIBD.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 10:14:31 for SimSequencer by doxygen 1.7.4