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

List of all members.

Public Member Functions

def __init__
def initialize
def execute
def finalize

Detailed Description

Definition at line 17 of file ViktorsTest.py.


Constructor & Destructor Documentation

def ViktorsTest::ExampleAlg::__init__ (   self,
  name 
)

Definition at line 19 of file ViktorsTest.py.

00020                            :
00021         DybPythonAlg.__init__(self,name)
00022         return


Member Function Documentation

def ViktorsTest::ExampleAlg::initialize (   self)

Definition at line 23 of file ViktorsTest.py.

00024                         :
00025         status = DybPythonAlg.initialize(self)
00026         if status.isFailure(): return status
00027         self.info("initializing")
00028 
00029         self.stats.defaultPath = "/file1/examples/"
00030         # Make the trigger time histogram
00031         self.stats["TrigTime"] = TH1F("TrigTime","Trigger Time [s]",
00032                                       100,0.0,10.0)
00033         # Make the TDC histogram
00034         self.stats["Tdc"] = TH1F("Tdc","TDC Values",300,0,300)
00035 
00036         return SUCCESS

def ViktorsTest::ExampleAlg::execute (   self)

Definition at line 37 of file ViktorsTest.py.

00038                      :
00039         self.info("executing")
00040 
00041         evt = self.evtSvc()
00042         hdr = evt["/Event/Readout/ReadoutHeader"]
00043         # Exercise 1: Print detector name
00044         ro = hdr.readout()
00045         if ro == None:
00046             self.info("No Readout this cycle")
00047             return SUCCESS
00048         print ro.detector().detName()
00049         # Exercise 2: Histogram the readout trigger time
00050         self.stats["TrigTime"].Fill( ro.triggerTime().GetSeconds() )        
00051         # Exercise 3: Histogram the TDC values
00052         channelIDs = ro.channels() # Get list of channel IDs in the readout
00053         for channelID in channelIDs:
00054             channel = ro.channel(channelID) # get the data from the channel
00055             for tdc in channel.tdc(): # loop over list of TDC values on channel
00056                 self.stats["Tdc"].Fill( tdc )
00057             for adcClock in channel.adcClocks():
00058                 adc = channel.adcByClock(adcClock)
00059                 print adcClock, adc
00060         return SUCCESS
        
def ViktorsTest::ExampleAlg::finalize (   self)

Definition at line 61 of file ViktorsTest.py.

00061                       :        
00062         self.info("finalizing")
00063         status = DybPythonAlg.finalize(self)
00064         return status
00065 

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:50 for DivingIn by doxygen 1.7.4