34 name =
"HCAL HRT data patterns";
69 setTagValue(
"EXTENSION_TABLE_NAME", config -> extention_table_name );
74 setTagValue(
"INTERVAL_OF_VALIDITY_BEGIN", config -> iov_begin );
75 setTagValue(
"INTERVAL_OF_VALIDITY_END", config -> iov_end );
79 setTagValue(
"DETECTOR_NAME", config -> detector_name );
80 setTagValue(
"COMMENT_DESCRIPTION", config -> comment_description );
116 DOMDocument * dataSet = dataSetDoc .
getDocument();
120 setTagValue(
"SUBVERSION", config -> subversion, 0, dataSet );
123 strftime( timebuf, 50,
"%Y-%m-%d %H:%M:%S.0", gmtime( &(config -> create_timestamp) ) );
124 setTagValue(
"CREATE_TIMESTAMP", timebuf , 0, dataSet );
125 setTagValue(
"CREATED_BY_USER", config -> created_by_user, 0, dataSet );
126 setTagValue(
"KIND_OF_PART", config -> kind_of_part, 0, dataSet );
127 setTagValue(
"NAME_LABEL", config -> name_label, 0, dataSet );
128 setTagValue(
"HTR_DATA_PATTERNS_DATA_FILE", config -> htr_data_patterns_data_file, 0, dataSet );
129 setTagValue(
"CRATE", config -> crate, 0, dataSet );
132 DOMNode * cloneDataSet =
document -> importNode( dataSet -> getDocumentElement(),
true );
133 root -> appendChild( cloneDataSet );
143 DOMDocument * dataSet = dataSetDoc .
getDocument();
147 setTagValue(
"SUBVERSION", config -> subversion, 0, dataSet );
150 strftime( timebuf, 50,
"%Y-%m-%d %H:%M:%S.0", gmtime( &(config -> create_timestamp) ) );
151 setTagValue(
"CREATE_TIMESTAMP", timebuf , 0, dataSet );
152 setTagValue(
"CREATED_BY_USER", config -> created_by_user, 0, dataSet );
153 setTagValue(
"COMMENT_DESCRIPTION", config -> comment_description, 0, dataSet );
154 setTagValue(
"NAME_LABEL", config -> name_label, 0, dataSet );
155 setTagValue(
"HTR_DATA_PATTERNS_DATA_FILE", config -> htr_data_patterns_data_file, 0, dataSet );
156 setTagValue(
"CRATE", config -> crate, 0, dataSet );
159 DOMNode * cloneDataSet =
document -> importNode( dataSet -> getDocumentElement(),
true );
160 root -> appendChild( cloneDataSet );
169 for ( std::vector<std::string>::const_iterator _file = file_name .
begin(); _file != file_name .
end(); _file++ )
171 conf . htr_data_patterns_data_file = *_file;
172 conf . htr_data_patterns_data_file +=
".dat";
173 conf . crate = crate_number[ _file - file_name .
begin() ];
176 sprintf( _buf,
"CRATE%.2d", conf . crate );
178 _namelabel .
append( _buf );
179 conf . name_label = _namelabel;
183 write(
"HTRPatternLoader.xml" );
std::string detector_name
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
DOMDocument * getDocument(void)
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)
DOMNode * setTagValue(const std::string &tagName, const std::string &tagValue, int _item=0, DOMDocument *_document=NULL)
DOMNode * setTagAttribute(const std::string &tagName, const std::string &attrName, const std::string &attrValue, int _item=0)
string root
initialization