CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EventConsumerRegistrationInfo.h
Go to the documentation of this file.
1 // $Id: EventConsumerRegistrationInfo.h,v 1.15 2011/08/31 20:11:59 wmtan Exp $
3 
4 #ifndef EventFilter_StorageManager_EventConsumerRegistrationInfo_h
5 #define EventFilter_StorageManager_EventConsumerRegistrationInfo_h
6 
7 #include <iosfwd>
8 #include <string>
9 
10 #include <boost/shared_ptr.hpp>
11 
12 #include "toolbox/net/Utils.h"
13 
20 
21 #include <boost/enable_shared_from_this.hpp>
22 
23 
24 namespace stor
25 {
35  public RegistrationInfoBase,
36  public boost::enable_shared_from_this<EventConsumerRegistrationInfo>
37  {
38 
39  public:
40 
42  (
43  const edm::ParameterSet& pset,
44  const EventServingParams& eventServingParams,
45  const std::string& remoteHost = toolbox::net::getHostName()
46  );
47 
49  (
50  const edm::ParameterSet& pset,
51  const std::string& remoteHost = toolbox::net::getHostName()
52  );
53 
55 
56  // Accessors:
57  const std::string& triggerSelection() const { return triggerSelection_; }
58  const Strings& eventSelection() const { return eventSelection_; }
60  const int& prescale() const { return prescale_; }
61  const bool& uniqueEvents() const { return uniqueEvents_; }
62  const int& headerRetryInterval() const { return headerRetryInterval_; }
64  uint32 eventCode() const { return Header::EVENT; }
65  std::string eventURL() const { return sourceURL() + "/geteventdata"; }
66  std::string registerURL() const { return sourceURL() + "/registerConsumer"; }
67 
68  // Comparison:
69  bool operator<(const EventConsumerRegistrationInfo&) const;
70  bool operator==(const EventConsumerRegistrationInfo&) const;
71  bool operator!=(const EventConsumerRegistrationInfo&) const;
72 
73  // Output:
74  std::ostream& write(std::ostream& os) const;
75 
76  // Implementation of Template Method pattern.
77  virtual void do_registerMe(EventDistributor*);
78  virtual void do_eventType(std::ostream&) const;
79  virtual void do_appendToPSet(edm::ParameterSet&) const;
80 
81  private:
82 
83  void parsePSet(const edm::ParameterSet&);
84 
88  int prescale_;
91  };
92 
93  typedef boost::shared_ptr<stor::EventConsumerRegistrationInfo> EventConsRegPtr;
94 
95 } // namespace stor
96 
97 #endif // EventFilter_StorageManager_EventConsumerRegistrationInfo_h
98 
virtual void do_eventType(std::ostream &) const
bool operator!=(const EventConsumerRegistrationInfo &) const
std::vector< std::string > Strings
Definition: MsgTools.h:18
bool operator==(const EventConsumerRegistrationInfo &) const
virtual void do_registerMe(EventDistributor *)
boost::shared_ptr< stor::EventConsumerRegistrationInfo > EventConsRegPtr
bool operator<(const EventConsumerRegistrationInfo &) const
const std::string & sourceURL() const
virtual void do_appendToPSet(edm::ParameterSet &) const
std::ostream & write(std::ostream &os) const
unsigned int uint32
Definition: MsgTools.h:13
const std::string & remoteHost() const
EventConsumerRegistrationInfo(const edm::ParameterSet &pset, const EventServingParams &eventServingParams, const std::string &remoteHost=toolbox::net::getHostName())