Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #include "BbcOut.h"
0002 #include "BbcReturnCodes.h"
0003 
0004 #include <cmath>
0005 #include <iostream>
0006 
0007 void BbcOut::identify(std::ostream& os) const
0008 {
0009   os << "virtual BbcOut object" << std::endl;
0010   return;
0011 }
0012 
0013 void BbcOut::Reset()
0014 {
0015   std::cout << "ERROR BbcOut: Reset() not implemented by daughter class" << std::endl;
0016   return;
0017 }
0018 
0019 int BbcOut::isValid() const
0020 {
0021   virtual_warning("isValid()");
0022   return 0;
0023 }
0024 
0025 Float_t BbcOut::get_zvtx() const
0026 {
0027   virtual_warning("get_zvtx()");
0028   return std::numeric_limits<Float_t>::quiet_NaN();
0029 }
0030 
0031 Float_t BbcOut::get_zvtxerr() const
0032 {
0033   virtual_warning("get_zvtxerr()");
0034   return std::numeric_limits<Float_t>::quiet_NaN();
0035 }
0036 
0037 Float_t BbcOut::get_t0() const
0038 {
0039   virtual_warning("get_t0()");
0040   return std::numeric_limits<Float_t>::quiet_NaN();
0041 }
0042 
0043 //__________________________________________
0044 Float_t BbcOut::get_t0err() const
0045 {
0046   virtual_warning("get_t0err()");
0047   return std::numeric_limits<Float_t>::quiet_NaN();
0048 }
0049 
0050 //__________________________________________
0051 void BbcOut::set_t0(const Float_t /*unused*/, const Float_t /*unused*/)
0052 {
0053   virtual_warning("set_t0(const Float_t t0, const Float_t t0err)");
0054   return;
0055 }
0056 
0057 //__________________________________________
0058 void BbcOut::set_zvtx(const Float_t /*unused*/, const Float_t /*unused*/)
0059 {
0060   virtual_warning("set_zvtx(const Float_t vtx, const Float_t vtxerr)");
0061   return;
0062 }
0063 
0064 //__________________________________________
0065 void BbcOut::set_zvtxerr(const Float_t /*unused*/)
0066 {
0067   virtual_warning("set_zvtxerr(const Float_t vtxerr)");
0068   return;
0069 }
0070 
0071 //________________________________________________________________
0072 void BbcOut::set_arm(const int /*iarm*/, const Short_t /*npmt*/, const Float_t /*energy*/, const Float_t /*timing*/)
0073 {
0074   virtual_warning("set_arm(const int iBBC, const Short_t npmt, const Float_t energy, const Float_t timing)");
0075   return;
0076 }
0077 
0078 void BbcOut::set_clocks(const Int_t /*evt*/, const UShort_t /*iclk*/, const UShort_t /*ifemclk*/)
0079 {
0080   virtual_warning("set_clocks(const Int_t ievt, const UShort_t iclk, const UShort_t ifemclk");
0081   return;
0082 }
0083 
0084 Short_t BbcOut::get_npmt(const int /*iarm*/) const
0085 {
0086   virtual_warning("get_npmt(const int iarm)");
0087   return BbcReturnCodes::BBC_INVALID_SHORT;
0088 }
0089 
0090 Float_t BbcOut::get_q(const int /*iarm*/) const
0091 {
0092   virtual_warning("get_q(const int iarm)");
0093   return std::numeric_limits<Float_t>::quiet_NaN();
0094 }
0095 
0096 Float_t BbcOut::get_time(const int /*iarm*/) const
0097 {
0098   virtual_warning("get_time(const int iarm)");
0099   return std::numeric_limits<Float_t>::quiet_NaN();
0100 }
0101 
0102 Int_t BbcOut::get_evt() const
0103 {
0104   virtual_warning("get_evt()");
0105   return 0;
0106 }
0107 
0108 UShort_t BbcOut::get_clock() const
0109 {
0110   virtual_warning("get_clock()");
0111   return 0;
0112 }
0113 
0114 UShort_t BbcOut::get_femclock() const
0115 {
0116   virtual_warning("get_femclock(const int iarm)");
0117   return 0;
0118 }
0119 
0120 void BbcOut::virtual_warning(const std::string& funcsname) 
0121 {
0122   std::cout << "BbcOut::" << funcsname << " is virtual, doing nothing" << std::endl;
0123   return;
0124 }
0125 
0126 void BbcOut::FillFromClass(const BbcOut& old)
0127 {
0128   for (int iarm = 0; iarm < 2; iarm++)
0129   {
0130     set_arm(iarm, old.get_npmt(iarm), old.get_q(iarm), old.get_time(iarm));
0131   }
0132 
0133   set_t0zvtx(old.get_t0(), old.get_t0err(), old.get_zvtx(), old.get_zvtxerr());
0134 }