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

List of all members.

Public Member Functions

def __init__
def initialize
def execute
def finalize

Public Attributes

 runDataSvc

Detailed Description

Definition at line 19 of file PrintRunData.py.


Constructor & Destructor Documentation

def PrintRunData::PrintRunDataAlg::__init__ (   self,
  name 
)

Definition at line 21 of file PrintRunData.py.

00022                            :
00023         DybPythonAlg.__init__(self,name)
00024         return


Member Function Documentation

def PrintRunData::PrintRunDataAlg::initialize (   self)

Definition at line 25 of file PrintRunData.py.

00026                         :
00027         status = DybPythonAlg.initialize(self)
00028         if status.isFailure(): return status
00029         self.info("initializing")
00030 
00031         # Initialize run data service
00032         #  Statistics Service: Use for histograms, graphs, trees
00033         self.runDataSvc = self.svc('IRunDataSvc','RunDataSvc')
00034         if self.runDataSvc == None:
00035             self.error("Failed to initialize run data service.")
00036             return FAILURE        
00037 
00038         return SUCCESS

def PrintRunData::PrintRunDataAlg::execute (   self)

Definition at line 39 of file PrintRunData.py.

00040                      :
00041         self.info("executing")
00042         return SUCCESS
        
def PrintRunData::PrintRunDataAlg::finalize (   self)

Definition at line 43 of file PrintRunData.py.

00044                       :
00045         self.info("finalizing")
00046         # Print the run data
00047         self.info("===========================================================")
00048         runDataList = self.runDataSvc.cachedRunData()
00049         self.info("Service has cached data for %d runs." % len(runDataList))
00050         for runData in runDataList:
00051             self.info("   Run Number: "+str(runData.runNumber()))
00052             self.info("   Run Type:   "
00053                       +RunType.AsString(runData.runType()))
00054             self.info("   Active Detectors: "
00055                       +str([det.detName() for det in runData.detectors()]))
00056             self.info("   Start Time: "+runData.startTime().AsString())
00057             self.info("   End Time:   "+runData.endTime().AsString())
00058             self.info("   Calibration Sources:")
00059             for calibSource in runData.calibSources():
00060                 self.info("     "+calibSource.id().name())
00061                 if calibSource.id().type() == SourceType.kLED:
00062                     self.info("        LED Freq [Hz]:      "
00063                               +str(calibSource.ledFrequency()/units.hertz))
00064                 if calibSource.id().isAD():
00065                     self.info("        AD Z Position [mm]: "
00066                               +str(calibSource.adZPosition()/units.mm))
00067             self.info("")
00068         self.info("===========================================================")
00069         status = DybPythonAlg.finalize(self)
00070         return status
00071 


Member Data Documentation

Definition at line 25 of file PrintRunData.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:00:22 for RunDataSvc by doxygen 1.7.4