TimingEventElement.cpp

Go to the documentation of this file.
00001 // Copyright CERN 2012 - Developed in collaboration with GSI
00002 #include <fesa-core/Utilities/ParserElements/TimingEventElement.h>
00003 #include <fesa-core/Utilities/ParserElements/EventConfigurationElement.h>
00004 #include <fesa-core/Utilities/ParserElements/ParserElementDefs.h>
00005 #include <fesa-core/Utilities/XMLParser.h>
00006 
00007 namespace fesa
00008 {
00009 
00010 TimingEventElement::TimingEventElement(boost::shared_ptr<EventConfigurationElement> parent):
00011         EventElement(parent,TimingSource)
00012 {
00013 }
00014 
00015 TimingEventElement::~TimingEventElement()
00016 {
00017 
00018 }
00019 
00020 void TimingEventElement::initialize(const std::string& xpath,ElementXML* eventElement)
00021 {
00022         eventSourceName_ = TIMING_EVENT_SOURCE_TAG;
00023         std::vector<AttributeXML*>::iterator iter;
00024         for(iter=eventElement->attributeList_.begin();iter!=eventElement->attributeList_.end();++iter)
00025         {
00026                 if( (*iter)->name_ == TIMING_TAG_CONCRETE_NAME )
00027                 {
00028                         concreteEventName_ = eventSourceName_ + "::" + (*iter)->value_;
00029                 }
00030         }
00031 
00032         isInitialized_ = true;
00033 }
00034 
00035 const std::string& TimingEventElement::getSourceTypeSpecificData(const std::string& dataTag)
00036 {
00037         if( dataTag == TIMING_TAG_CONCRETE_NAME )
00038         {
00039                 return concreteEventName_;
00040         }
00041 
00042         //Not found
00043         throw FesaException(__FILE__, __LINE__, FesaErrorUnkonwDataToken.c_str(),dataTag.c_str(),getLogicalName().c_str());
00044 }
00045 
00046 }

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1