Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

/var/pcce/usera/hill/rcc_1.2/RodDaq/RodCrate/RodStatus.cxx

Go to the documentation of this file.
00001 // File: RodStatus.cxx
00002 // $Header: /afs/cern.ch/user/s/sctpixel/private/cvsroot/RodDaq/RodCrate/RodStatus.cxx,v 1.2 2002/12/12 21:25:53 tmeyer Exp $
00003 
00004 //! Namespace for the common routines for SCT and PIXEL ROD software.
00005 
00006 #include "RodStatus.h"
00007 
00008 namespace SctPixelRod {
00009 
00010 // Constructors
00011     ostream& RodStatus::operator<<(ostream& os, RodModule& rod) {
00012     os << "Slot: " << rod->getSlotNumber();
00013     os << "Serial Number:" << rod->getSerialNumber();
00014     os << "Number of slave DSPs: " << getNumSlaves();
00015     os << endl;
00016     hex(os);
00017     os << "Status registers[0-2]: " << rod.readRodStatusReg(0) << " " <<
00018              rod.readRodStatusReg(1) << " " << rod.readRodStatusReg(2) << endl;
00019     os << "Command registers[0-1]: " << rod.readRodCommandReg(0) << " " <<
00020              rod.readRodCommandReg(1) << endl;
00021     dec(os);
00022     os << "Primitive state: " << rod.getPrimState() << " Text State: " << 
00023           rod.getTextState();
00024     os << endl;
00025     return os;
00026   }
00027 
00028 // RodStatus contains the status information for a ROD. For now it does very
00029 // little.
00030 //
00031 // @author Tom Meyer (meyer@iastate.edu) - originator
00032 //
00033   void RodStatus::snapShot(RodModule &rod) {
00034     m_slotNumber = rod.getSlot();
00035     m_serialNumber = rod.getSerialNumber();
00036     m_numSlaves = rod.getNumSlaves();
00037     for (long i=0; i<3; i++) {
00038       m_statusReg[i] = rod.readRodStatusReg(i);
00039   }
00040     for (long i=0; i<2; i++) {
00041       m_commandReg[i] = rod.readRodCommandReg(i);
00042     }
00043     m_primState = rod.getPrimState();
00044     m_textState = rod.getTextState();
00045     return;
00046   };
00047 } // End namespace SctPixelRod

Generated on Mon Mar 3 11:16:17 2003 for SCTPixelDAQ by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001