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

List of all members.

Public Member Functions

def __init__
def initialize
def execute

Detailed Description

Algorithm to test RPC readout simulation

Definition at line 17 of file CheckAlg.py.


Constructor & Destructor Documentation

def ReadoutSim::CheckAlg::CheckAlg::__init__ (   self,
  myname 
)

Definition at line 22 of file CheckAlg.py.

00023                              :
00024         ''' '''
00025         DybPythonAlg.__init__(self,myname)
00026         return


Member Function Documentation

def ReadoutSim::CheckAlg::CheckAlg::initialize (   self)

Definition at line 27 of file CheckAlg.py.

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

def ReadoutSim::CheckAlg::CheckAlg::execute (   self)

Definition at line 41 of file CheckAlg.py.

00042                      :
00043         self.info("executing")
00044         evt = self.evtSvc()
00045 
00046         # Elec header info dump
00047         elhdr = evt["/Event/Elec/ElecHeader"]
00048         self.info("===== ElecSim =====")
00049         if elhdr == None:
00050             self.info("No ElecSim header this cycle")
00051         else :
00052             # pulses:
00053             pulhdr = elhdr.pulseHeader()
00054             # signals:
00055             crhdr = elhdr.crateHeader()
00056 
00057             self.info( "Elec time: %s"%(elhdr.timeStamp().GetSeconds()) )
00058             if pulhdr == None:
00059                 self.info("No pulse header stored this cycle")
00060             else :
00061                 self.info( "Number of pulse collections: %d"%(pulhdr.pulseCollection().size()) )
00062 
00063             if crhdr == None:
00064                 self.info("No crate header this cycle")
00065             else :
00066                 self.info( "Number of crates: %d"%(crhdr.crates().size()) )
00067                 det = crhdr.crates().begin().first
00068                 feccr = crhdr.crates()[det]
00069                 self.info("%d FEC boards stored in the crate."%feccr.fecBoards().size())
00070 
00071         # SimTrig header info dump
00072         trighdr = evt["/Event/SimTrig/SimTrigHeader"]
00073         self.info("===== TrigSim =====")
00074         if trighdr == None:
00075             self.info("No SimElec header this cycle")
00076         else :
00077             cmdhdr = trighdr.commandHeader()
00078             cmdcoll= cmdhdr.collections()[cmdhdr.collections().begin().first]
00079 
00080             if cmdcoll == None:
00081                 self.info("No trigger command collection")
00082             else :
00083                 self.info("SimTrig: Detector: %s"%(cmdcoll.detector().detName()))
00084                 self.info( "SimTrig: %d commands in TriggerCommandCollection."%(cmdcoll.commands().size()) )
00085                 for cmd in cmdcoll.commands() :
00086                     self.info("%d input triggers in this command."%cmd.inTriggers().size())
00087                     self.info("%d output triggers in this command."%cmd.outTriggers().size())
00088 
00089         # SimReadout header info dump
00090         self.info("===== SimReadout =====")
00091         simrohdr = evt["/Event/SimReadout/SimReadoutHeader"]
00092         if simrohdr == None:
00093             self.info("No SimReadoutHeader header this cycle")
00094         else :
00095             simros = simrohdr.readouts()
00096             self.info("SimReadout: Got %d simreadouts."%simros.size())
00097             for simro in simros :
00098                 ro = simro.readout()
00099                 if ro == None:
00100                     self.info("No Readout this cycle")
00101                 else :
00102                     self.info("Readout: Detector: %s"%(ro.detector().detName()))
00103                     self.info("Readout: Trigger time: %f"%(ro.triggerTime().GetSeconds()))
00104                     self.info("Readout: TriggerType: 0x%x"%ro.triggerType())
00105                     if (ro.detector().isRPC()) :
00106                         self.info("Readout: RPC readouts: %d"%(ro.fecReadouts().size()))
00107                         self.info("Readout: Hitmaps: ")
00108                         i = 0
00109                         for fec in ro.fecReadouts() :
00110                             hitmap = fec.second.hitMap()
00111                             print "%d: 0x%0x"%(i,hitmap)
00112                             i += 1
00113                 simdaq = ro.daqCrate(1,1,1)
00114                 self.info("DaqCrate: Detector: %s"%(simdaq.detector().detName()))
00115                 self.info("DaqCrate: Trigger time: %f"%(simdaq.triggerTime().GetSeconds()))
00116                 self.info("DaqCrate: TriggerType: 0x%x"%simdaq.triggerType())
00117                 if (simdaq.detector().isRPC()) :
00118                     self.info( "DaqCrate: RPC readouts: %d"%(simdaq.rpcPanelReadouts().size()) )
00119 
00120         # Readout header info dump
00121         self.info("===== Readout =====")
00122         rohdr = evt["/Event/Readout/ReadoutHeader"]
00123         if rohdr == None:
00124             self.info("No ReadoutHeader header this cycle")
00125         else :
00126             ro = rohdr.readout()
00127             if ro == None:
00128                 self.info("No Readout this cycle")
00129             else :
00130                 self.info("Readout: Detector: %s"%(ro.detector().detName()))
00131                 self.info("Readout: Trigger time: %f"%(ro.triggerTime().GetSeconds()))
00132                 self.info("Readout: TriggerType: %x"%ro.triggerType())
00133                 if (ro.detector().isRPC()) :
00134                     self.info("Readout: RPC readouts: %d"%(ro.fecReadouts().size()))
00135                     self.info("Readout: Hitmaps: ")
00136                     i = 0
00137                     for fec in ro.fecReadouts() :
00138                         hitmap = fec.second.hitMap()
00139                         print "%d: 0x%0x"%(i,hitmap)
00140                         i += 1
00141             daq = rohdr.daqCrate()
00142             if daq == None:
00143                 self.info("No daq crate this cycle")
00144             else :
00145                 self.info("DaqCrate: Detector: %s"%(daq.detector().detName()))
00146                 self.info("DaqCrate: Trigger time: %f"%(daq.triggerTime().GetSeconds()))
00147                 self.info("DaqCrate: TriggerType: 0x%x"%daq.triggerType())
00148                 if (daq.detector().isRPC()) :
00149                     self.info( "DaqCrate: RPC readouts: %d"%(daq.rpcPanelReadouts().size()) )
00150                     self.info("DaqCrate: Hitmaps:")
00151                     for i in range(daq.rpcPanelReadouts().size()) :
00152                         hitmap = daq.rpcPanelReadouts()[i].hitMap()
00153                         print "%d: 0x%0x"%(i,hitmap)
00154                     
        return SUCCESS

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:17:06 for ReadoutSim by doxygen 1.7.4