CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/EventFilter/StorageManager/interface/DQMEventConsumerRegistrationInfo.h

Go to the documentation of this file.
00001 // $Id: DQMEventConsumerRegistrationInfo.h,v 1.9 2011/03/07 15:31:31 mommsen Exp $
00003 
00004 #ifndef EventFilter_StorageManager_DQMEventConsumerRegistrationInfo_h
00005 #define EventFilter_StorageManager_DQMEventConsumerRegistrationInfo_h
00006 
00007 #include <iosfwd>
00008 #include <string>
00009 
00010 #include <boost/shared_ptr.hpp>
00011 
00012 #include "toolbox/net/Utils.h"
00013 
00014 #include "EventFilter/StorageManager/interface/Configuration.h"
00015 #include "EventFilter/StorageManager/interface/RegistrationInfoBase.h"
00016 #include "EventFilter/StorageManager/interface/Utils.h"
00017 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00018 #include "IOPool/Streamer/interface/MsgHeader.h"
00019 
00020 #include <boost/enable_shared_from_this.hpp>
00021 
00022 
00023 namespace stor
00024 {
00033   class DQMEventConsumerRegistrationInfo : 
00034     public RegistrationInfoBase,
00035     public boost::enable_shared_from_this<DQMEventConsumerRegistrationInfo>
00036   {
00037   public:
00038 
00042     DQMEventConsumerRegistrationInfo
00043     (
00044       const edm::ParameterSet& pset,
00045       const EventServingParams& eventServingParams,
00046       const std::string& remoteHost = toolbox::net::getHostName()
00047     );
00048 
00049     DQMEventConsumerRegistrationInfo
00050     (
00051       const edm::ParameterSet& pset,
00052       const std::string& remoteHost = toolbox::net::getHostName()
00053     );
00054 
00055     // Destructor:
00056     ~DQMEventConsumerRegistrationInfo() {};
00057 
00058     // Accessors:
00059     const std::string& topLevelFolderName() const { return topLevelFolderName_; }
00060     uint32 eventRequestCode() const { return Header::DQMEVENT_REQUEST; }
00061     uint32 eventCode() const { return Header::DQM_EVENT; }
00062     std::string eventURL() const { return sourceURL() + "/getDQMeventdata"; }
00063     std::string registerURL() const { return sourceURL() + "/registerDQMConsumer"; }
00064 
00065     // Comparison:
00066     bool operator<(const DQMEventConsumerRegistrationInfo&) const;
00067     bool operator==(const DQMEventConsumerRegistrationInfo&) const;
00068     bool operator!=(const DQMEventConsumerRegistrationInfo&) const;
00069 
00070     // Output:
00071     std::ostream& write(std::ostream& os) const;
00072 
00073     // Implementation of the Template Method pattern.
00074     virtual void do_registerMe(EventDistributor*);
00075     virtual void do_eventType(std::ostream&) const;
00076     virtual void do_appendToPSet(edm::ParameterSet&) const;
00077 
00078   private:
00079 
00080     void parsePSet(const edm::ParameterSet&);
00081 
00082     std::string topLevelFolderName_;
00083   };
00084 
00085   typedef boost::shared_ptr<stor::DQMEventConsumerRegistrationInfo> DQMEventConsRegPtr;
00086   
00087 } // namespace stor
00088 
00089 #endif // EventFilter_StorageManager_DQMEventConsumerRegistrationInfo_h
00090 
00091