#include <EventConsumerRegistrationInfo.h>
Public Member Functions | |
virtual void | do_appendToPSet (edm::ParameterSet &) const |
virtual void | do_eventType (std::ostream &) const |
virtual void | do_registerMe (EventDistributor *) |
uint32 | eventCode () const |
EventConsumerRegistrationInfo (const edm::ParameterSet &pset, const EventServingParams &eventServingParams, const std::string &remoteHost=toolbox::net::getHostName()) | |
EventConsumerRegistrationInfo (const edm::ParameterSet &pset, const std::string &remoteHost=toolbox::net::getHostName()) | |
uint32 | eventRequestCode () const |
const Strings & | eventSelection () const |
std::string | eventURL () const |
const int & | headerRetryInterval () const |
bool | operator!= (const EventConsumerRegistrationInfo &) const |
bool | operator< (const EventConsumerRegistrationInfo &) const |
bool | operator== (const EventConsumerRegistrationInfo &) const |
const std::string & | outputModuleLabel () const |
const int & | prescale () const |
std::string | registerURL () const |
const std::string & | triggerSelection () const |
const bool & | uniqueEvents () const |
std::ostream & | write (std::ostream &os) const |
~EventConsumerRegistrationInfo () | |
Private Member Functions | |
void | parsePSet (const edm::ParameterSet &) |
Private Attributes | |
Strings | eventSelection_ |
int | headerRetryInterval_ |
std::string | outputModuleLabel_ |
int | prescale_ |
std::string | triggerSelection_ |
bool | uniqueEvents_ |
Holds the registration information from a event consumer.
Definition at line 34 of file EventConsumerRegistrationInfo.h.
stor::EventConsumerRegistrationInfo::EventConsumerRegistrationInfo | ( | const edm::ParameterSet & | pset, |
const EventServingParams & | eventServingParams, | ||
const std::string & | remoteHost = toolbox::net::getHostName() |
||
) |
Definition at line 17 of file EventConsumerRegistrationInfo.cc.
: RegistrationInfoBase(pset, remoteHost, eventServingParams, true) { parsePSet(pset); }
stor::EventConsumerRegistrationInfo::EventConsumerRegistrationInfo | ( | const edm::ParameterSet & | pset, |
const std::string & | remoteHost = toolbox::net::getHostName() |
||
) |
Definition at line 28 of file EventConsumerRegistrationInfo.cc.
: RegistrationInfoBase(pset, remoteHost, EventServingParams(), false) { parsePSet(pset); }
stor::EventConsumerRegistrationInfo::~EventConsumerRegistrationInfo | ( | ) | [inline] |
Definition at line 54 of file EventConsumerRegistrationInfo.h.
{};
void stor::EventConsumerRegistrationInfo::do_appendToPSet | ( | edm::ParameterSet & | pset | ) | const [virtual] |
Implements stor::RegistrationInfoBase.
Definition at line 73 of file EventConsumerRegistrationInfo.cc.
References edm::ParameterSet::addParameter(), edm::ParameterSet::addUntrackedParameter(), eventSelection_, headerRetryInterval_, outputModuleLabel_, prescale_, triggerSelection_, and uniqueEvents_.
{ pset.addUntrackedParameter<std::string>("SelectHLTOutput", outputModuleLabel_); pset.addUntrackedParameter<std::string>("TriggerSelector", triggerSelection_); pset.addParameter<Strings>("TrackedEventSelection", eventSelection_); pset.addUntrackedParameter<bool>("uniqueEvents", uniqueEvents_); pset.addUntrackedParameter<int>("prescale", prescale_); if ( headerRetryInterval_ != 5 ) pset.addUntrackedParameter<int>("headerRetryInterval", headerRetryInterval_); }
void stor::EventConsumerRegistrationInfo::do_eventType | ( | std::ostream & | os | ) | const [virtual] |
Implements stor::RegistrationInfoBase.
Definition at line 92 of file EventConsumerRegistrationInfo.cc.
References filterCSVwithJSON::copy, eventSelection_, outputModuleLabel_, prescale_, stor::RegistrationInfoBase::queueInfo(), triggerSelection_, and uniqueEvents_.
{ os << "Output module: " << outputModuleLabel_ << "\n"; if ( triggerSelection_.empty() ) { if ( ! eventSelection_.empty() ) { os << "Event Selection: "; std::copy(eventSelection_.begin(), eventSelection_.end()-1, std::ostream_iterator<Strings::value_type>(os, ",")); os << *(eventSelection_.end()-1); } } else os << "Trigger Selection: " << triggerSelection_; if ( prescale_ != 1 ) os << "; prescale: " << prescale_; if ( uniqueEvents_ != false ) os << "; uniqueEvents"; os << "\n"; queueInfo(os); }
void stor::EventConsumerRegistrationInfo::do_registerMe | ( | EventDistributor * | evtDist | ) | [virtual] |
Implements stor::RegistrationInfoBase.
Definition at line 86 of file EventConsumerRegistrationInfo.cc.
References stor::EventDistributor::registerEventConsumer().
{ evtDist->registerEventConsumer(shared_from_this()); }
uint32 stor::EventConsumerRegistrationInfo::eventCode | ( | ) | const [inline] |
Definition at line 64 of file EventConsumerRegistrationInfo.h.
References Header::EVENT.
{ return Header::EVENT; }
uint32 stor::EventConsumerRegistrationInfo::eventRequestCode | ( | ) | const [inline] |
Definition at line 63 of file EventConsumerRegistrationInfo.h.
References Header::EVENT_REQUEST.
{ return Header::EVENT_REQUEST; }
const Strings& stor::EventConsumerRegistrationInfo::eventSelection | ( | ) | const [inline] |
Definition at line 58 of file EventConsumerRegistrationInfo.h.
References eventSelection_.
Referenced by operator<(), and operator==().
{ return eventSelection_; }
std::string stor::EventConsumerRegistrationInfo::eventURL | ( | ) | const [inline] |
Definition at line 65 of file EventConsumerRegistrationInfo.h.
References stor::RegistrationInfoBase::sourceURL().
{ return sourceURL() + "/geteventdata"; }
const int& stor::EventConsumerRegistrationInfo::headerRetryInterval | ( | ) | const [inline] |
Definition at line 62 of file EventConsumerRegistrationInfo.h.
References headerRetryInterval_.
{ return headerRetryInterval_; }
bool stor::EventConsumerRegistrationInfo::operator!= | ( | const EventConsumerRegistrationInfo & | other | ) | const |
Definition at line 149 of file EventConsumerRegistrationInfo.cc.
{ return ! ( *this == other ); }
bool stor::EventConsumerRegistrationInfo::operator< | ( | const EventConsumerRegistrationInfo & | other | ) | const |
Definition at line 120 of file EventConsumerRegistrationInfo.cc.
References eventSelection(), outputModuleLabel(), prescale(), triggerSelection(), and uniqueEvents().
{ if ( outputModuleLabel() != other.outputModuleLabel() ) return ( outputModuleLabel() < other.outputModuleLabel() ); if ( triggerSelection() != other.triggerSelection() ) return ( triggerSelection() < other.triggerSelection() ); if ( eventSelection() != other.eventSelection() ) return ( eventSelection() < other.eventSelection() ); if ( prescale() != other.prescale() ) return ( prescale() < other.prescale() ); if ( uniqueEvents() != other.uniqueEvents() ) return ( uniqueEvents() < other.uniqueEvents() ); return RegistrationInfoBase::operator<(other); }
bool stor::EventConsumerRegistrationInfo::operator== | ( | const EventConsumerRegistrationInfo & | other | ) | const |
Definition at line 136 of file EventConsumerRegistrationInfo.cc.
References eventSelection(), outputModuleLabel(), prescale(), triggerSelection(), and uniqueEvents().
{ return ( outputModuleLabel() == other.outputModuleLabel() && triggerSelection() == other.triggerSelection() && eventSelection() == other.eventSelection() && prescale() == other.prescale() && uniqueEvents() == other.uniqueEvents() && RegistrationInfoBase::operator==(other) ); }
const std::string& stor::EventConsumerRegistrationInfo::outputModuleLabel | ( | ) | const [inline] |
Definition at line 59 of file EventConsumerRegistrationInfo.h.
References outputModuleLabel_.
Referenced by operator<(), and operator==().
{ return outputModuleLabel_; }
void stor::EventConsumerRegistrationInfo::parsePSet | ( | const edm::ParameterSet & | pset | ) | [private] |
Definition at line 38 of file EventConsumerRegistrationInfo.cc.
References alignCSCRings::e, edm::ParameterSet::empty(), eventSelection_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), headerRetryInterval_, outputModuleLabel_, prescale_, triggerSelection_, and uniqueEvents_.
{ try { outputModuleLabel_ = pset.getUntrackedParameter<std::string>("SelectHLTOutput"); } catch( edm::Exception& e ) { XCEPT_RAISE( stor::exception::ConsumerRegistration, "No HLT output module specified" ); } triggerSelection_ = pset.getUntrackedParameter<std::string>("TriggerSelector", ""); try { eventSelection_ = pset.getParameter<Strings>("TrackedEventSelection"); } catch( edm::Exception& e ) { edm::ParameterSet tmpPSet1 = pset.getUntrackedParameter<edm::ParameterSet>("SelectEvents", edm::ParameterSet()); if ( ! tmpPSet1.empty() ) { eventSelection_ = tmpPSet1.getParameter<Strings>("SelectEvents"); } } prescale_ = pset.getUntrackedParameter<int>("prescale", 1); uniqueEvents_ = pset.getUntrackedParameter<bool>("uniqueEvents", false); headerRetryInterval_ = pset.getUntrackedParameter<int>("headerRetryInterval", 5); }
const int& stor::EventConsumerRegistrationInfo::prescale | ( | ) | const [inline] |
Definition at line 60 of file EventConsumerRegistrationInfo.h.
References prescale_.
Referenced by operator<(), and operator==().
{ return prescale_; }
std::string stor::EventConsumerRegistrationInfo::registerURL | ( | ) | const [inline] |
Definition at line 66 of file EventConsumerRegistrationInfo.h.
References stor::RegistrationInfoBase::sourceURL().
{ return sourceURL() + "/registerConsumer"; }
const std::string& stor::EventConsumerRegistrationInfo::triggerSelection | ( | ) | const [inline] |
Definition at line 57 of file EventConsumerRegistrationInfo.h.
References triggerSelection_.
Referenced by operator<(), and operator==().
{ return triggerSelection_; }
const bool& stor::EventConsumerRegistrationInfo::uniqueEvents | ( | ) | const [inline] |
Definition at line 61 of file EventConsumerRegistrationInfo.h.
References uniqueEvents_.
Referenced by operator<(), and operator==().
{ return uniqueEvents_; }
std::ostream& stor::EventConsumerRegistrationInfo::write | ( | std::ostream & | os | ) | const |
Definition at line 86 of file EventConsumerRegistrationInfo.h.
Referenced by do_appendToPSet(), do_eventType(), eventSelection(), and parsePSet().
Definition at line 90 of file EventConsumerRegistrationInfo.h.
Referenced by do_appendToPSet(), headerRetryInterval(), and parsePSet().
std::string stor::EventConsumerRegistrationInfo::outputModuleLabel_ [private] |
Definition at line 87 of file EventConsumerRegistrationInfo.h.
Referenced by do_appendToPSet(), do_eventType(), outputModuleLabel(), and parsePSet().
int stor::EventConsumerRegistrationInfo::prescale_ [private] |
Definition at line 88 of file EventConsumerRegistrationInfo.h.
Referenced by do_appendToPSet(), do_eventType(), parsePSet(), and prescale().
std::string stor::EventConsumerRegistrationInfo::triggerSelection_ [private] |
Definition at line 85 of file EventConsumerRegistrationInfo.h.
Referenced by do_appendToPSet(), do_eventType(), parsePSet(), and triggerSelection().
bool stor::EventConsumerRegistrationInfo::uniqueEvents_ [private] |
Definition at line 89 of file EventConsumerRegistrationInfo.h.
Referenced by do_appendToPSet(), do_eventType(), parsePSet(), and uniqueEvents().