Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:16:07

0001 #include "Gl1Packetv3.h"
0002 
0003 #include <phool/phool.h>
0004 
0005 #include <iomanip>
0006 
0007 void Gl1Packetv3::Reset()
0008 {
0009   Gl1Packetv2::Reset();
0010   GTMAllBusyVector = 0;
0011   return;
0012 }
0013 
0014 void Gl1Packetv3::identify(std::ostream &os) const
0015 {
0016   os << "Gl1Packetv3: " << std::endl;
0017   os << "Id: " << getIdentifier() << std::endl;
0018   os << "EvtSeq: " << getEvtSequence() << std::endl;
0019   os << "BCO: 0x" << std::hex << getBCO() << std::dec << std::endl;
0020   os << "bunch number: " << getBunchNumber() << std::endl;
0021   return;
0022 }
0023 
0024 void Gl1Packetv3::FillFrom(const Gl1Packet *pkt)
0025 {
0026   Gl1Packetv2::FillFrom(pkt);
0027   setGTMAllBusyVector(pkt->getGTMAllBusyVector());
0028 }
0029 
0030 void Gl1Packetv3::dump(std::ostream &os) const
0031 {
0032   os << "packet nr:       " << iValue(0) << std::endl;
0033   os << "Beam Clock:      "
0034      << "0x" << std::hex << Gl1Packetv2::lValue(0, "BCO") << std::dec << "   " << lValue(0, "BCO") << std::endl;
0035   os << "Trigger Input:   "
0036      << "0x" << std::hex << lValue(0, "TriggerInput") << std::dec << "   " << lValue(0, "TriggerInput") << std::endl;
0037   os << "Live Vector:     "
0038      << "0x" << std::hex << lValue(0, "LiveVector") << std::dec << "   " << lValue(0, "LiveVector") << std::endl;
0039   os << "Scaled Vector:   "
0040      << "0x" << std::hex << lValue(0, "ScaledVector") << std::dec << "   " << lValue(0, "ScaledVector") << std::endl;
0041   os << "GTM Busy Vector: "
0042      << "0x" << std::hex << lValue(0, "GTMBusyVector") << std::dec << "   " << lValue(0, "GTMBusyVector") << std::endl;
0043   os << "GTM All Busy Vector: "
0044      << "0x" << std::hex << lValue(0, "GTMAllBusyVector") << std::dec << "   " << lValue(0, "GTMAllBusyVector") << std::endl;
0045   os << "Bunch Number:    " << lValue(0, "BunchNumber") << std::endl
0046      << std::endl;
0047   os << "Trg #                  raw              live              scaled" << std::endl;
0048   os << "----------------------------------------------------------------" << std::endl;
0049 
0050   int i;
0051 
0052   for (i = 0; i < 64; i++)
0053   {
0054     if (lValue(i, 0) || lValue(i, 1) || lValue(i, 2))
0055     {
0056       os << std::setw(3) << i << "    ";
0057       os << " " << std::setw(18) << lValue(i, 0)
0058          << " " << std::setw(18) << lValue(i, 1)
0059          << " " << std::setw(18) << lValue(i, 2)
0060          << std::endl;
0061     }
0062   }
0063   os << std::endl;
0064   os << "Gl1P #                raw              live              scaled" << std::endl;
0065   os << "----------------------------------------------------------------" << std::endl;
0066 
0067   for (i = 0; i < 16; i++)
0068   {
0069     if (lValue(i, "GL1PRAW") || lValue(i, "GL1PLIVE") || lValue(i, "GL1PSCALED"))
0070     {
0071       os << std::setw(3) << i << "    ";
0072       os << " " << std::setw(18) << lValue(i, "GL1PRAW")
0073          << " " << std::setw(18) << lValue(i, "GL1PLIVE")
0074          << " " << std::setw(18) << lValue(i, "GL1PSCALED")
0075          << std::endl;
0076     }
0077   }
0078   os << std::endl;
0079 }