BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
GenericSrv.cxx
Go to the documentation of this file.
1//$ Header: $
2/// Module implements methods for clients to get generic services.
3
4#include "xmlBase/Dom.h"
5
6#include <cstdlib>
7#include <iostream>
8#include <string>
9#include <vector>
10
11#include "calibUtil/GenericSrv.h"
12
13namespace calibUtil {
14
15 using XERCES_CPP_NAMESPACE_QUALIFIER DOMElement;
16 /// Constructor that fills in values of generic data from XML file
17 GenericSrv::GenericSrv( const DOMElement* docElt ) : m_sample( 0 ) {
18
19 DOMElement* child = xmlBase::Dom::findFirstChildByName( docElt, "generic" );
20 m_instName = xmlBase::Dom::getAttribute( child, "instrument" );
21 m_timestamp = xmlBase::Dom::getAttribute( child, "timestamp" );
22 m_calType = xmlBase::Dom::getAttribute( child, "calType" );
23 m_fmtVer = xmlBase::Dom::getAttribute( child, "fmtVersion" );
24 }
25
26} // end of namespace calibUtil
GenericSrv(const XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *docElt)
Constructor that fills in values of generic data from XML file.
static std::string getAttribute(const DOMElement *elt, const char *attName)
Definition Dom.cxx:199
static DOMElement * findFirstChildByName(const DOMElement *parent, const char *const name)
Definition Dom.cxx:58
Module implements methods for clients to get generic services.