Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:47:51

0001 #include "FWCore/ServiceRegistry/interface/PathContext.h"
0002 #include "FWCore/ServiceRegistry/interface/StreamContext.h"
0003 
0004 #include <ostream>
0005 
0006 namespace edm {
0007 
0008   PathContext::PathContext(std::string const& pathName,
0009                            StreamContext const* streamContext,
0010                            unsigned int pathID,
0011                            PathType pathType)
0012       : pathName_(pathName), streamContext_(streamContext), pathID_(pathID), pathType_(pathType) {}
0013 
0014   std::ostream& operator<<(std::ostream& os, PathContext const& pc) {
0015     os << "PathContext: pathName = " << pc.pathName() << " pathID = " << pc.pathID();
0016     if (pc.pathType() == PathContext::PathType::kEndPath) {
0017       os << " (EndPath)\n";
0018     } else {
0019       os << "\n";
0020     }
0021     if (pc.streamContext()) {
0022       os << "    " << *pc.streamContext();
0023     }
0024     return os;
0025   }
0026 }  // namespace edm