CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalL1TriggerObjectsXml.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: CaloOnlineTools/HcalOnlineDb
4 // Class : HcalL1TriggerObjectsXml
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author: Gena Kukartsev, kukarzev@fnal.gov
10 // Created: Wed Jul 01 06:30:00 CDT 2009
11 //
12 
13 #include <iostream>
14 #include <string>
15 #include <vector>
16 
19 #include "CaloOnlineTools/HcalOnlineDb/interface/ConfigurationDatabaseException.hh"
21 
22 XERCES_CPP_NAMESPACE_USE
23 using namespace std;
24 using namespace oracle::occi;
25 
27 {
28  extension_table_name="HCAL_L1_TRIGGER_OBJECTS_V1";
29  type_name="HCAL L1 Trigger Objects [V1]";
30  run_number = 1;
31  channel_map = "HCAL_CHANNELS";
32  data_set_id = -1;
33  iov_id = 1;
34  iov_begin = 1;
35  iov_end = -1;
36  tag_id = 2;
37  tag_mode = "auto";
38  //tag_name = "test_L1TriggerObjects";
39  tag_name = input_tag_name;
40  detector_name = "HCAL";
41  comment = hcal_ass.getRandomQuote();
42  tag_idref = 2;
43  iov_idref = 1;
44  data_set_idref = -1;
45  init_data();
46 }
47 
48 
50 {
51 }
52 
53 
54 DOMElement * HcalL1TriggerObjectsXml::add_data( DOMNode * _dataset, double ped, double gain, int flag){
55  DOMElement * _data_elem = get_data_element(_dataset);
56  add_element(_data_elem, XMLProcessor::_toXMLCh("AVERAGE_PEDESTAL"), XMLProcessor::_toXMLCh(ped));
57  add_element(_data_elem, XMLProcessor::_toXMLCh("RESPONSE_CORRECTED_GAIN"), XMLProcessor::_toXMLCh(gain));
58  add_element(_data_elem, XMLProcessor::_toXMLCh("FLAG"), XMLProcessor::_toXMLCh(flag));
59  //
60  return _data_elem;
61 }
62 
63 
64 DOMNode * HcalL1TriggerObjectsXml::add_hcal_channel_dataset( int ieta, int iphi, int depth, std::string subdetector,
65  double ped, double gain, int flag){
66  DOMNode * _dataset = add_dataset();
67  add_hcal_channel(_dataset, ieta, iphi, depth, subdetector);
68  add_data(_dataset, ped, gain, flag);
69  return _dataset;
70 }
XERCES_CPP_NAMESPACE::DOMNode * add_hcal_channel_dataset(int ieta, int iphi, int depth, std::string subdetector, double ped, double gain, int flag)
HcalL1TriggerObjectsXml(const std::string &input_tag_name)
XERCES_CPP_NAMESPACE::DOMElement * add_data(XERCES_CPP_NAMESPACE::DOMNode *_dataset, double ped, double gain, int flag)
static XMLCh * _toXMLCh(std::string temp)
Definition: XMLProcessor.h:183
#define comment(par)
Definition: vmac.h:161