35 name =
"HCAL HRT data patterns";
70 setTagValue(
"EXTENSION_TABLE_NAME", config -> extention_table_name );
75 setTagValue(
"INTERVAL_OF_VALIDITY_BEGIN", config -> iov_begin );
76 setTagValue(
"INTERVAL_OF_VALIDITY_END", config -> iov_end );
80 setTagValue(
"DETECTOR_NAME", config -> detector_name );
81 setTagValue(
"COMMENT_DESCRIPTION", config -> comment_description );
117 DOMDocument * dataSet = dataSetDoc .
getDocument();
121 setTagValue(
"SUBVERSION", config -> subversion, 0, dataSet );
124 strftime( timebuf, 50,
"%Y-%m-%d %H:%M:%S.0", gmtime( &(config -> create_timestamp) ) );
125 setTagValue(
"CREATE_TIMESTAMP", timebuf , 0, dataSet );
126 setTagValue(
"CREATED_BY_USER", config -> created_by_user, 0, dataSet );
127 setTagValue(
"KIND_OF_PART", config -> kind_of_part, 0, dataSet );
128 setTagValue(
"NAME_LABEL", config -> name_label, 0, dataSet );
129 setTagValue(
"HTR_DATA_PATTERNS_DATA_FILE", config -> htr_data_patterns_data_file, 0, dataSet );
130 setTagValue(
"CRATE", config -> crate, 0, dataSet );
133 DOMNode * cloneDataSet =
document -> importNode( dataSet -> getDocumentElement(),
true );
134 root -> appendChild( cloneDataSet );
144 DOMDocument * dataSet = dataSetDoc .
getDocument();
148 setTagValue(
"SUBVERSION", config -> subversion, 0, dataSet );
151 strftime( timebuf, 50,
"%Y-%m-%d %H:%M:%S.0", gmtime( &(config -> create_timestamp) ) );
152 setTagValue(
"CREATE_TIMESTAMP", timebuf , 0, dataSet );
153 setTagValue(
"CREATED_BY_USER", config -> created_by_user, 0, dataSet );
154 setTagValue(
"COMMENT_DESCRIPTION", config -> comment_description, 0, dataSet );
155 setTagValue(
"NAME_LABEL", config -> name_label, 0, dataSet );
156 setTagValue(
"HTR_DATA_PATTERNS_DATA_FILE", config -> htr_data_patterns_data_file, 0, dataSet );
157 setTagValue(
"CRATE", config -> crate, 0, dataSet );
160 DOMNode * cloneDataSet =
document -> importNode( dataSet -> getDocumentElement(),
true );
161 root -> appendChild( cloneDataSet );
170 for ( std::vector<std::string>::const_iterator _file = file_name .
begin(); _file != file_name .
end(); _file++ )
172 conf . htr_data_patterns_data_file = *_file;
173 conf . htr_data_patterns_data_file +=
".dat";
174 conf . crate = crate_number[ _file - file_name .
begin() ];
177 sprintf( _buf,
"CRATE%.2d", conf . crate );
179 _namelabel .
append( _buf );
180 conf . name_label = _namelabel;
184 write(
"HTRPatternLoader.xml" );
std::string detector_name
XERCES_CPP_NAMESPACE::DOMDocument * document
int write(std::string target="stdout")
std::string comment_description
virtual ~XMLHTRPatternLoader()
int addChecksums(checksumsDBConfig *config, std::string templateFileName="HCAL_HTR_DATA_PATTERNS.checksums.template")
std::string extention_table_name
int addPattern(datasetDBConfig *config, std::string templateFileName="HCAL_HTR_DATA_PATTERNS.dataset.template")
std::string comment_description
XERCES_CPP_NAMESPACE::DOMDocument * getDocument(void)
XERCES_CPP_NAMESPACE::DOMNode * setTagValue(const std::string &tagName, const std::string &tagValue, int _item=0, XERCES_CPP_NAMESPACE::DOMDocument *_document=NULL)
std::string htr_data_patterns_data_file
std::string htr_data_patterns_data_file
int createLoader(const std::vector< int > &crate_number, const std::vector< std::string > &file_name)
XERCES_CPP_NAMESPACE::DOMNode * setTagAttribute(const std::string &tagName, const std::string &attrName, const std::string &attrValue, int _item=0)