CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/EventFilter/StorageManager/src/DQMEventConsumerRegistrationInfo.cc

Go to the documentation of this file.
00001 // $Id: DQMEventConsumerRegistrationInfo.cc,v 1.10 2011/03/07 15:31:32 mommsen Exp $
00003 
00004 #include "EventFilter/StorageManager/interface/DQMEventConsumerRegistrationInfo.h"
00005 #include "EventFilter/StorageManager/interface/EventDistributor.h"
00006 #include "EventFilter/StorageManager/interface/Exception.h"
00007 #include "FWCore/Utilities/interface/EDMException.h"
00008 
00009 
00010 namespace stor
00011 {
00012 
00013   DQMEventConsumerRegistrationInfo::DQMEventConsumerRegistrationInfo
00014   (
00015     const edm::ParameterSet& pset,
00016     const EventServingParams& eventServingParams,
00017     const std::string& remoteHost
00018   ) :
00019   RegistrationInfoBase(pset, remoteHost, eventServingParams, true)
00020   {
00021     parsePSet(pset);
00022   }
00023 
00024   DQMEventConsumerRegistrationInfo::DQMEventConsumerRegistrationInfo
00025   (
00026     const edm::ParameterSet& pset,
00027     const std::string& remoteHost
00028   ) :
00029   RegistrationInfoBase(pset, remoteHost, EventServingParams(), false)
00030   {
00031     parsePSet(pset);
00032   }
00033 
00034   void
00035   DQMEventConsumerRegistrationInfo::parsePSet(const edm::ParameterSet& pset)
00036   {
00037     topLevelFolderName_ = pset.getUntrackedParameter<std::string>("topLevelFolderName", "*");
00038   }
00039   
00040   void
00041   DQMEventConsumerRegistrationInfo::do_appendToPSet(edm::ParameterSet& pset) const
00042   {
00043     if ( topLevelFolderName_ != "*" )
00044       pset.addUntrackedParameter<std::string>("topLevelFolderName", topLevelFolderName_);
00045   }
00046 
00047   void 
00048   DQMEventConsumerRegistrationInfo::do_registerMe(EventDistributor* evtDist)
00049   {
00050     evtDist->registerDQMEventConsumer(shared_from_this());
00051   }
00052 
00053   void
00054   DQMEventConsumerRegistrationInfo::do_eventType(std::ostream& os) const
00055   {
00056     os << "Top level folder: " << topLevelFolderName_ << "\n";
00057     queueInfo(os);
00058   }
00059 
00060   bool
00061   DQMEventConsumerRegistrationInfo::operator<(const DQMEventConsumerRegistrationInfo& other) const
00062   {
00063     if ( topLevelFolderName() != other.topLevelFolderName() )
00064       return ( topLevelFolderName() < other.topLevelFolderName() );
00065     return RegistrationInfoBase::operator<(other);
00066   }
00067 
00068   bool
00069   DQMEventConsumerRegistrationInfo::operator==(const DQMEventConsumerRegistrationInfo& other) const
00070   {
00071     return (
00072       topLevelFolderName() == other.topLevelFolderName() &&
00073       RegistrationInfoBase::operator==(other)
00074     );
00075   }
00076   
00077   bool
00078   DQMEventConsumerRegistrationInfo::operator!=(const DQMEventConsumerRegistrationInfo& other) const
00079   {
00080     return ! ( *this == other );
00081   }
00082 
00083 } // namespace stor
00084