CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
edm::JobHeaderDecoder Class Reference

#include <Utilities.h>

Public Member Functions

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

Private Attributes

TBufferFile buf_
 
TClass * desc_
 

Detailed Description

Definition at line 28 of file Utilities.h.

Constructor & Destructor Documentation

edm::JobHeaderDecoder::JobHeaderDecoder ( )

Definition at line 52 of file Utilities.cc.

52  :
53  desc_(getTClassFor<SendJobHeader>()),
54  buf_(TBuffer::kRead)
55  {
56  }
TBufferFile buf_
Definition: Utilities.h:38
edm::JobHeaderDecoder::~JobHeaderDecoder ( )

Definition at line 58 of file Utilities.cc.

58 { }

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_, edm::hlt::Exception, FDEBUG, edm::MsgCode::getCode(), edm::InitMsg::getDataSize(), edm::MsgCode::INIT, and sd.

Referenced by edm::JobHeaderInserter::insert().

62  {
63  FDEBUG(6) << "StreamInput: decodeRegistry" << std::endl;
64 
65  if(msg.getCode()!=MsgCode::INIT)
66  throw cms::Exception("HeaderDecode","EventStreamerInput")
67  << "received wrong message type: expected INIT, got "
68  << msg.getCode() << "\n";
69 
70  // This "SetBuffer" stuff does not appear to work or I don't understand
71  // what needs to be done to actually make it go. (JBK)
72  //buf_.SetBuffer((char*)msg.data(),msg.getDataSize(),kFALSE);
73  TBufferFile xbuf(TBuffer::kRead,msg.getDataSize(),(char*)msg.data(),kFALSE);
74  RootDebug tracer(10,10);
75  std::auto_ptr<SendJobHeader> sd((SendJobHeader*)xbuf.ReadObjectAny(desc_));
76 
77  if(sd.get()==0) {
78  throw cms::Exception("HeaderDecode","DecodeProductList")
79  << "Could not read the initial product registry list\n";
80  }
81 
82  return sd;
83  }
#define FDEBUG(lev)
Definition: DebugMacros.h:18
double sd

Member Data Documentation

TBufferFile edm::JobHeaderDecoder::buf_
private

Definition at line 38 of file Utilities.h.

TClass* edm::JobHeaderDecoder::desc_
private

Definition at line 37 of file Utilities.h.

Referenced by decodeJobHeader().