Overview | Releases | Download | Docs | Links | Help | RecentChanges

SortingOutRodDaqRodCrate

All part of SortingOutRodDaq.

Differences between the Oxford dev4/ version of RodCrate? (also now used at SR1) and the SctRodDaq_3_0_BRANCH, from which it developed. NOT YET IN CVS.

[pcphsctr05] /home/sctroddq/sctsw/RodDaq > cvs diff RodCrate/
cvs diff: Diffing RodCrate
Index: RodCrate/BocAddresses.h
===================================================================
RCS file: /afs/cern.ch/user/s/sctpixel/private/cvsroot/RodDaq/RodCrate/BocAddresses.h,v
retrieving revision 1.6.2.2
diff -r1.6.2.2 BocAddresses.h
19c19
< #include "../CommonWithDsp/memoryPartitions.h"
---
> #include "memoryPartitions.h"
Index: RodCrate/BocCard.cxx
I'm worried that it will now pick up Dsp/Common/Include/memoryPartitions.h, but that this may not have been what was intended.
===================================================================
RCS file: /afs/cern.ch/user/s/sctpixel/private/cvsroot/RodDaq/RodCrate/BocCard.cxx,v
retrieving revision 1.9.2.2
diff -r1.9.2.2 BocCard.cxx
237,238c237
< void BocCard::status() {
<
---
> void BocCard::status(std::ostream& oss) {
240c239
<     std::cout << "Pre-production BOC: ";
---
>     oss << "Pre-production BOC: ";
243c242
<     std::cout << "Production BOC - Revision A: ";
---
>     oss << "Production BOC - Revision A: ";
246c245
<     std::cout << "Production BOC - Revision B: ";
---
>     oss << "Production BOC - Revision B: ";
249c248
<     std::cout << "Production BOC - Revision C: ";
---
>     oss << "Production BOC - Revision C: ";
252c251
<     std::cout << "Unknown BOC type: ";
---
>     oss << "Unknown BOC type: ";
254c253
<   std::cout << "status" << std::endl;
---
>   oss << "status" << std::endl;
256,262c255,261
<   std::cout << std::dec << " Module Type: " << m_moduleType;
<   std::cout << " Serial Number: " << m_serialNumber;
<   std::cout << std::endl;
<   std::cout << " Hardware Version: " << m_hardwareRevision;
<   std::cout << " Firmware Version: " << m_firmwareRevision;
<   std::cout << std::endl;
<   std::cout << std::hex << " Manufacturer: "   << m_manufacturer;
---
>   oss << std::dec << " Module Type: " << m_moduleType;
>   oss << " Serial Number: " << m_serialNumber;
>   oss << std::endl;
>   oss << " Hardware Version: " << m_hardwareRevision;
>   oss << " Firmware Version: " << m_firmwareRevision;
>   oss << std::endl;
>   oss << std::hex << " Manufacturer: "   << m_manufacturer;
266c265
<   std::cout << " Status Register: " << getBocStatusRegister();
---
>   oss << " Status Register: " << getBocStatusRegister();
268c267
<   std::cout << std::dec << std::endl;
---
>   oss << std::dec << std::endl;
270a270,272
> void BocCard::status(){
>   status(std::cout);
> }
Index: RodCrate/BocCard.h
===================================================================
RCS file: /afs/cern.ch/user/s/sctpixel/private/cvsroot/RodDaq/RodCrate/BocCard.h,v
retrieving revision 1.6.2.2
diff -r1.6.2.2 BocCard.h
195c195,196
<         void status();
---
>       void status();
>         void status(std::ostream&);
This BocCard::status(ostream&) looks useful, since there seems to be no other way to stream to anything other than std::cout.
Index: RodCrate/Makefile
===================================================================
RCS file: /afs/cern.ch/user/s/sctpixel/private/cvsroot/RodDaq/RodCrate/Makefile,v
retrieving revision 1.18
diff -r1.18 Makefile
31d30
<             $(SCTPIXEL_DAQ_ROOT)/CommonWithDsp/smSendTxtBuff.h \
41,42c40,41
<         -I$(SCTPIXEL_DAQ_ROOT)/CommonWithDsp/Sct
<
---
>         -I$(SCTPIXEL_DAQ_ROOT)/CommonWithDsp/Sct \
>         -I$(SCTPIXEL_DAQ_ROOT)/Dsp/Common/Include
Not sure about these.
Index: RodCrate/RodModule.cxx
===================================================================
RCS file: /afs/cern.ch/user/s/sctpixel/private/cvsroot/RodDaq/RodCrate/RodModule.cxx,v
retrieving revision 1.61.2.1
diff -r1.61.2.1 RodModule.cxx
378a379,382
> void RodModule::status() throw(){
>   status(std::cout);
> }
>
381,388c385,393
< */
< void RodModule::status() throw() {
<     std::cout << "Slot: " << m_slot;
<     std::cout << "Serial Number:" << m_serialNumber;
<     std::cout << "Number of slave DSPs: " << m_numSlaves;
<     std::cout << std::endl;
<     std::hex(std::cout);
<     std::cout << "Status registers[0-2]: ";
---
> AJB modified this to print to a string
>  */
> void RodModule::status(std::ostream& oss) throw() {
>     oss << "Slot: " << m_slot;
>     oss << "Serial Number:" << m_serialNumber;
>     oss << "Number of slave DSPs: " << m_numSlaves;
>     oss << std::endl;
>     std::hex(oss);
>     oss << "Status registers[0-2]: ";
391c396
<         std::cout << readRodStatusReg(i) << " " ;
---
>         oss << readRodStatusReg(i) << " " ;
395c400
<       std::cout << "status() can't read ROD status registers." << std::flush;
---
>       oss << "status() can't read ROD status registers." << std::flush;
397c402
<     std::cout << std::endl;
---
>     oss << std::endl;
399c404
<     std::cout << "Command registers[0-1]: ";
---
>     oss << "Command registers[0-1]: ";
402c407
<         std::cout << readRodCommandReg(i) << " " ;
---
>         oss << readRodCommandReg(i) << " " ;
406c411
<       std::cout << "status() can't read ROD command registers.\n" << std::flush;
---
>       oss << "status() can't read ROD command registers.\n" << std::flush;
409,410c414,415
<     std::dec(std::cout);
<     std::cout << "Primitive state: " << getPrimState() << " Text State: " <<
---
>     std::dec(oss);
>     oss << "Primitive state: " << getPrimState() << " Text State: " <<
412,413c417
<     std::cout << std::endl;
<     return;
---
>     oss << std::endl;
status(ostream&) shouldnt be needed as RodModule can already ostream itself.
Index: RodCrate/RodModule.h
===================================================================
RCS file: /afs/cern.ch/user/s/sctpixel/private/cvsroot/RodDaq/RodCrate/RodModule.h,v
retrieving revision 1.26
diff -r1.26 RodModule.h
20c20,23
< #include "smSendTxtBuff.h"
---
> //dpsf: #include "smSendTxtBuff.h"
> #include "comRegDfns.h" //dpsf: added
> #include "txtBuffer.h"  //dpsf: added
> #include "memoryPartitions.h" //dpsf: added temp. see comments in memoryPartitions.h
187,188c190,192
<  *  For now, it simply prints to standard output. Later we will add a structured
<  *  report of name=value pairs.
---
>  *  For now, it simply prints to standard output.
>  *  AJB modified this to print to a string.
>  *  Later we will add a structured report of name=value pairs.
190a195
>   void status(std::ostream& oss) throw();