Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // @sa <O2/DataFormats/common/src/InteractionRecord.cxx>
0002 //     <03608ff89>
0003 
0004 #include "InteractionRecord.h"
0005 #include <iostream>
0006 #include <sstream>
0007 
0008 namespace mvtx
0009 {
0010 
0011   //________________________________________________________________________________
0012   std::string InteractionRecord::asString() const
0013   {
0014     if (isDummy())
0015     {
0016       return std::string{"NotSet"};
0017     }
0018 
0019     std::stringstream ss;
0020     ss << std::hex << "Orbit: 0x" << orbit << std::dec << "  BCid: " << bc;
0021     return ss.str();
0022   }
0023 
0024   //________________________________________________________________________________
0025   std::ostream& operator<<(std::ostream& stream, mvtx::InteractionRecord const& ir)
0026   {
0027     stream << ir.asString();
0028     return stream;
0029   }
0030 
0031   //________________________________________________________________________________
0032   void InteractionRecord::print() const
0033   {
0034     std::cout << (*this) << std::endl;
0035   }
0036 
0037 }  // namespace mvtx