Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include <iostream>
00015 #include <string>
00016 #include <vector>
00017
00018 #include "CaloOnlineTools/HcalOnlineDb/interface/HcalL1TriggerObjectsXml.h"
00019 #include "CaloOnlineTools/HcalOnlineDb/interface/ConnectionManager.h"
00020 #include "CaloOnlineTools/HcalOnlineDb/interface/ConfigurationDatabaseException.hh"
00021 #include "xgi/Utils.h"
00022 #include "toolbox/string.h"
00023 #include "OnlineDB/Oracle/interface/Oracle.h"
00024
00025 using namespace std;
00026 using namespace oracle::occi;
00027
00028 HcalL1TriggerObjectsXml::HcalL1TriggerObjectsXml(const std::string& input_tag_name)
00029 {
00030 extension_table_name="HCAL_L1_TRIGGER_OBJECTS_V1";
00031 type_name="HCAL L1 Trigger Objects [V1]";
00032 run_number = 1;
00033 channel_map = "HCAL_CHANNELS";
00034 data_set_id = -1;
00035 iov_id = 1;
00036 iov_begin = 1;
00037 iov_end = -1;
00038 tag_id = 2;
00039 tag_mode = "auto";
00040
00041 tag_name = input_tag_name;
00042 detector_name = "HCAL";
00043 comment = hcal_ass.getRandomQuote();
00044 tag_idref = 2;
00045 iov_idref = 1;
00046 data_set_idref = -1;
00047 init_data();
00048 }
00049
00050
00051 HcalL1TriggerObjectsXml::~HcalL1TriggerObjectsXml()
00052 {
00053 }
00054
00055
00056 DOMElement * HcalL1TriggerObjectsXml::add_data( DOMNode * _dataset, double ped, double gain, int flag){
00057 DOMElement * _data_elem = get_data_element(_dataset);
00058 add_element(_data_elem, XMLProcessor::_toXMLCh("AVERAGE_PEDESTAL"), XMLProcessor::_toXMLCh(ped));
00059 add_element(_data_elem, XMLProcessor::_toXMLCh("RESPONSE_CORRECTED_GAIN"), XMLProcessor::_toXMLCh(gain));
00060 add_element(_data_elem, XMLProcessor::_toXMLCh("FLAG"), XMLProcessor::_toXMLCh(flag));
00061
00062 return _data_elem;
00063 }
00064
00065
00066 DOMNode * HcalL1TriggerObjectsXml::add_hcal_channel_dataset( int ieta, int iphi, int depth, std::string subdetector,
00067 double ped, double gain, int flag){
00068 DOMNode * _dataset = add_dataset();
00069 add_hcal_channel(_dataset, ieta, iphi, depth, subdetector);
00070 add_data(_dataset, ped, gain, flag);
00071 return _dataset;
00072 }