CMS 3D CMS Logo

edm::JobHeaderDecoder Class Reference

#include <IOPool/Streamer/interface/Utilities.h>

List of all members.

Public Member Functions

std::auto_ptr< SendJobHeaderdecodeJobHeader (InitMsg const &msg)
 JobHeaderDecoder ()
 ~JobHeaderDecoder ()

Private Attributes

RootBuffer buf_
TClass * desc_


Detailed Description

Definition at line 34 of file Utilities.h.


Constructor & Destructor Documentation

edm::JobHeaderDecoder::JobHeaderDecoder (  ) 

Definition at line 52 of file Utilities.cc.

00052                                     :
00053     desc_(getTClassFor<SendJobHeader>()),
00054     buf_(TBuffer::kRead)
00055   {
00056   }

edm::JobHeaderDecoder::~JobHeaderDecoder (  ) 

Definition at line 58 of file Utilities.cc.

00058 { }


Member Function Documentation

std::auto_ptr< SendJobHeader > edm::JobHeaderDecoder::decodeJobHeader ( InitMsg const &  msg  ) 

Definition at line 61 of file Utilities.cc.

References edm::InitMsg::data(), desc_, lat::endl(), Exception, FDEBUG, edm::MsgCode::getCode(), edm::InitMsg::getDataSize(), and edm::MsgCode::INIT.

00062   {
00063     FDEBUG(6) << "StreamInput: decodeRegistry" << std::endl;
00064 
00065     if(msg.getCode()!=MsgCode::INIT)
00066       throw cms::Exception("HeaderDecode","EventStreamerInput")
00067         << "received wrong message type: expected INIT, got "
00068         << msg.getCode() << "\n";
00069 
00070     // This "SetBuffer" stuff does not appear to work or I don't understand
00071     // what needs to be done to actually make it go. (JBK)
00072     //buf_.SetBuffer((char*)msg.data(),msg.getDataSize(),kFALSE);
00073     RootBuffer xbuf(TBuffer::kRead,msg.getDataSize(),(char*)msg.data(),kFALSE);
00074     RootDebug tracer(10,10);
00075     std::auto_ptr<SendJobHeader> sd((SendJobHeader*)xbuf.ReadObjectAny(desc_));
00076 
00077     if(sd.get()==0) {
00078         throw cms::Exception("HeaderDecode","DecodeProductList")
00079           << "Could not read the initial product registry list\n";
00080     }
00081 
00082     return sd;
00083   }


Member Data Documentation

RootBuffer edm::JobHeaderDecoder::buf_ [private]

Definition at line 44 of file Utilities.h.

TClass* edm::JobHeaderDecoder::desc_ [private]

Definition at line 43 of file Utilities.h.

Referenced by decodeJobHeader().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:41:45 2009 for CMSSW by  doxygen 1.5.4