Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:19:55

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