00001 // Copyright CERN 2012 - Developed in collaboration with GSI 00002 #include <fesa-core/Utilities/ParserElements/CustomEventElement.h> 00003 #include <fesa-core/Utilities/ParserElements/EventConfigurationElement.h> 00004 #include <fesa-core/Utilities/XMLParser.h> 00005 00006 namespace fesa 00007 { 00008 00009 CustomEventElement::CustomEventElement(boost::shared_ptr<EventConfigurationElement> parent): 00010 EventElement(parent,CustomSource) 00011 { 00012 00013 } 00014 00015 CustomEventElement::~CustomEventElement() 00016 { 00017 00018 } 00019 00020 void CustomEventElement::initialize(const std::string& xpath,ElementXML* eventElement) 00021 { 00022 std::vector<AttributeXML*>::iterator iter; 00023 for(iter=eventElement->attributeList_.begin();iter!=eventElement->attributeList_.end();++iter) 00024 { 00025 // Alex: This is a temporary bugfix for the release-branch. Details are desccribed in Jira-Issue FESA-3302 00026 00027 if((*iter)->name_ == "name") 00028 { 00029 concreteEventName_ = (*iter)->value_; 00030 } 00031 00032 if((*iter)->name_ == "source-ref") 00033 { 00034 eventSourceName_ = (*iter)->value_; 00035 } 00036 } 00037 00038 isInitialized_ = true; 00039 } 00040 00041 const std::string& CustomEventElement::getSourceTypeSpecificData(const std::string& dataTag) 00042 { 00043 //No dataTags for Custom-Events 00044 throw FesaException(__FILE__, __LINE__, FesaErrorUnkonwDataToken.c_str(),dataTag.c_str(),getLogicalName().c_str()); 00045 } 00046 00047 }