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 53 of file Utilities.cc.

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

Definition at line 59 of file Utilities.cc.

59 { }

Member Function Documentation

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

Definition at line 62 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().

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