CMS 3D CMS Logo

EventStreamHttpReader.h

Go to the documentation of this file.
00001 #ifndef STREAMER_EVENTSTREAMHTTPREADER_H
00002 #define STREAMER_EVENTSTREAMHTTPREADER_H
00003 
00004 // $Id: EventStreamHttpReader.h,v 1.18 2008/08/13 21:46:11 wmtan Exp $
00005 
00006 #include "IOPool/Streamer/interface/EventBuffer.h"
00007 #include "IOPool/Streamer/interface/StreamerInputSource.h"
00008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00009 #include "DataFormats/Provenance/interface/ProductRegistry.h"
00010 
00011 #include <vector>
00012 #include <memory>
00013 #include <string>
00014 #include <fstream>
00015 
00016 namespace edm
00017 {
00018   struct ReadData;
00019 
00020   class EventStreamHttpReader : public edm::StreamerInputSource
00021   {
00022   public:
00023     typedef std::vector<char> Buf;
00024 
00025     EventStreamHttpReader(edm::ParameterSet const& pset,
00026                  edm::InputSourceDescription const& desc);
00027     virtual ~EventStreamHttpReader();
00028 
00029     virtual std::auto_ptr<edm::EventPrincipal> read();
00030     void readHeader();
00031     void registerWithEventServer();
00032 
00033   private:  
00034     std::auto_ptr<edm::EventPrincipal> getOneEvent();
00035 
00036     std::string sourceurl_;
00037     char eventurl_[256];
00038     char headerurl_[256];
00039     char subscriptionurl_[256];
00040     Buf buf_;
00041     int hltBitCount;
00042     int l1BitCount;
00043     std::string consumerName_;
00044     std::string consumerPriority_;
00045     std::string consumerPSetString_;
00046     int headerRetryInterval_;
00047     double minEventRequestInterval_;
00048     unsigned int consumerId_;
00049     struct timeval lastRequestTime_;
00050     bool endRunAlreadyNotified_;
00051     bool runEnded_;
00052     bool alreadySaidHalted_;
00053     enum
00054     {
00055       DEFAULT_MAX_CONNECT_TRIES = 360,
00056       DEFAULT_CONNECT_TRY_SLEEP_TIME = 10
00057     };
00058     int maxConnectTries_;
00059     int connectTrySleepTime_;
00060   };
00061 
00062 }
00063 #endif
00064 

Generated on Tue Jun 9 17:34:56 2009 for CMSSW by  doxygen 1.5.4