CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/EventFilter/Utilities/src/RateStat.cc

Go to the documentation of this file.
00001 #include "EventFilter/Utilities/interface/RateStat.h"
00002 #include "EventFilter/Utilities/interface/CurlPoster.h"
00003 #include "EventFilter/Utilities/interface/DebugUtils.h"
00004 
00005 #include <iostream>
00006 
00007 namespace evf{
00008 
00009   RateStat::RateStat(std::string iDieUrl) : iDieUrl_(iDieUrl)
00010   {
00011   poster_ = new CurlPoster(iDieUrl_);
00012   }
00013   
00014   RateStat::~RateStat()
00015   {
00016     delete poster_;
00017   }
00018 
00019     void RateStat::sendStat(const unsigned char *buf, size_t len, unsigned int lsid)
00020   {
00021     poster_->postBinary(buf,len,lsid);
00022   }
00023   
00024   void RateStat::sendLegenda(const std::string &message)
00025   {
00026     poster_->postString(message.c_str(),message.length(),0,CurlPoster::leg);
00027   }
00028 
00029   void RateStat::sendAuxLegenda(const std::string &message)
00030   {
00031     poster_->postString(message.c_str(),message.length(),0,CurlPoster::legaux);
00032   }
00033 
00034 }