Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:17:13

0001 #include "Gl1Packet.h"
0002 
0003 #include <phool/phool.h>
0004 
0005 #include <iostream>
0006 
0007 int Gl1Packet::iValue(const int i) const
0008 {
0009   if (i == 0)
0010   {
0011     return getPacketNumber();
0012   }
0013   std::cout << PHWHERE << " Bad argument for iValue: " << i << std::endl;
0014   return std::numeric_limits<int>::min();
0015 }
0016 
0017 long long Gl1Packet::lValue(const int i, const int j) const
0018 {
0019   return getScaler(i, j);
0020 }
0021 
0022 long long Gl1Packet::lValue(const int i, const std::string &what) const
0023 {
0024   if (what == "BCO")
0025   {
0026     return getBCO();
0027   }
0028   if (what == "TriggerInput")
0029   {
0030     return getTriggerInput();
0031   }
0032   if (what == "TriggerVector")
0033   {
0034     return getTriggerVector();
0035   }
0036   if (what == "LiveVector")
0037   {
0038     return getLiveVector();
0039   }
0040   if (what == "ScaledVector")
0041   {
0042     return getScaledVector();
0043   }
0044   if (what == "GTMBusyVector")
0045   {
0046     return getGTMBusyVector();
0047   }
0048   if (what == "GTMAllBusyVector")
0049   {
0050     return getGTMAllBusyVector();
0051   }
0052   if (what == "BunchNumber")
0053   {
0054     return getBunchNumber();
0055   }
0056   if (what == "GL1PRAW")
0057   {
0058     return getGl1pScaler(i, 0);
0059   }
0060   if (what == "GL1PLIVE")
0061   {
0062     return getGl1pScaler(i, 1);
0063   }
0064   if (what == "GL1PSCALED")
0065   {
0066     return getGl1pScaler(i, 2);
0067   }
0068   std::cout << "option " << what << " not implemented" << std::endl;
0069   return std::numeric_limits<uint64_t>::max();
0070 }