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

List of all members.

Public Member Functions

def __init__
def initialize
def execute
def finalize

Detailed Description

Definition at line 33 of file PrintReconData.py.


Constructor & Destructor Documentation

def PrintReconData::PrintReconDataAlg::__init__ (   self,
  name 
)

Definition at line 35 of file PrintReconData.py.

00036                            :
00037         DybPythonAlg.__init__(self,name)
00038         return


Member Function Documentation

def PrintReconData::PrintReconDataAlg::initialize (   self)

Definition at line 39 of file PrintReconData.py.

00040                         :
00041         status = DybPythonAlg.initialize(self)
00042         if status.isFailure(): return status
00043         self.info("initializing")
00044 
00045         # Example histogram: Total raw ADC sum for each trigger
00046         self.stats["/file1/myhists/energy"] = TH1F("energy",
00047                                    "Reconstructed energy for each trigger",
00048                                    2000,0,20000)
00049         return SUCCESS

def PrintReconData::PrintReconDataAlg::execute (   self)

Definition at line 50 of file PrintReconData.py.

00051                      :
00052         self.info("executing")
00053 
00054         evt = self.evtSvc()
00055 
00056         # Access the Recon Header.  This is a container for the reconstructed data
00057         reconHdr = evt["/Event/Rec/AdSimple"]
00058         if reconHdr == None:
00059             self.error("Failed to get current recon header")
00060             return FAILURE
00061 
00062         result = reconHdr.recTrigger()
00063 
00064         # Get the detector ID for this trigger
00065         detector = result.detector()
00066         self.info("Detector Name: "+detector.detName())
00067         
00068         # Trigger Type: This is an integer of the type for this trigger
00069         self.info("Trigger Type: "+str( result.triggerType() ))
00070         # Trigger Number: A count of the trigger, according to the DAQ
00071         self.info("Trigger Number: "+str( result.triggerNumber() ))
00072         
00073         # Trigger Time: Absolute time of trigger for this raw data
00074         triggerTime = result.triggerTime()
00075         # Trigger Time [Seconds]: Trigger time in seconds from some day in 1990
00076         self.info("Trigger Time [Seconds part]: "
00077                   +str( triggerTime.GetSec() ))
00078         # Trigger Time [Nanoseconds]: Nanoseconds part of trigger time
00079         self.info("Trigger Time [Nanoseconds part]: "
00080                   +str( triggerTime.GetNanoSec() ))
00081         # Full Trigger Time: Seconds + nanoseconds
00082         # Warning: When you add this together, it will lose some precision.
00083         self.info("Full Trigger Time: "
00084                   +str( triggerTime.GetSec()
00085                         +triggerTime.GetNanoSec()*1.0e-9 ))
00086         
00087         # Energy information
00088         self.info("Energy Status: "+str( result.energyStatus() ))
00089         self.info("Energy: "+str( result.energy()/units.MeV )+" MeV")
00090         self.info("Energy Quality: "+str( result.energyQuality() ))
00091         # Add this trigger to histogram of energy
00092         self.stats["/file1/myhists/energy"].Fill( result.energy()/units.MeV )
00093         
00094         # Position information
00095         self.info("Position Status: "+str( result.positionStatus() ))
00096         self.info("Position (X,Y,Z): %f, %f, %f [mm]" % (result.position().x()/units.mm,
00097                                                          result.position().y()/units.mm,
00098                                                          result.position().z()/units.mm) )
00099         self.info("Position Quality: "+str( result.positionQuality() ))
00100         
00101         # Direction information, for tracks
00102         self.info("Direction Status: "+str( result.directionStatus() ))
00103         self.info("Direction (X,Y,Z): %f, %f, %f" % (result.direction().x(),
00104                                                      result.direction().y(),
00105                                                      result.direction().z()) )
00106         self.info("Direction Quality: "+str( result.directionQuality() ))
00107         
00108         
00109         # Covariance Matrix, if one is generated
00110         result.errorMatrix()
00111 
00112         return SUCCESS
        
def PrintReconData::PrintReconDataAlg::finalize (   self)

Definition at line 113 of file PrintReconData.py.

00114                       :
00115         self.info("finalizing")
00116         status = DybPythonAlg.finalize(self)
00117         return status


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:54:33 for Quickstart by doxygen 1.7.4