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 // $Id: HcalL1TriggerObjectsXml.cc,v 1.1 2009/09/23 22:06:28 kukartse Exp $
12 //
13 
14 #include <iostream>
15 #include <string>
16 #include <vector>
17 
20 #include "CaloOnlineTools/HcalOnlineDb/interface/ConfigurationDatabaseException.hh"
21 #include "xgi/Utils.h"
22 #include "toolbox/string.h"
24 
25 using namespace std;
26 using namespace oracle::occi;
27 
28 HcalL1TriggerObjectsXml::HcalL1TriggerObjectsXml(const std::string& input_tag_name)
29 {
30  extension_table_name="HCAL_L1_TRIGGER_OBJECTS_V1";
31  type_name="HCAL L1 Trigger Objects [V1]";
32  run_number = 1;
33  channel_map = "HCAL_CHANNELS";
34  data_set_id = -1;
35  iov_id = 1;
36  iov_begin = 1;
37  iov_end = -1;
38  tag_id = 2;
39  tag_mode = "auto";
40  //tag_name = "test_L1TriggerObjects";
41  tag_name = input_tag_name;
42  detector_name = "HCAL";
43  comment = hcal_ass.getRandomQuote();
44  tag_idref = 2;
45  iov_idref = 1;
46  data_set_idref = -1;
47  init_data();
48 }
49 
50 
52 {
53 }
54 
55 
56 DOMElement * HcalL1TriggerObjectsXml::add_data( DOMNode * _dataset, double ped, double gain, int flag){
57  DOMElement * _data_elem = get_data_element(_dataset);
58  add_element(_data_elem, XMLProcessor::_toXMLCh("AVERAGE_PEDESTAL"), XMLProcessor::_toXMLCh(ped));
59  add_element(_data_elem, XMLProcessor::_toXMLCh("RESPONSE_CORRECTED_GAIN"), XMLProcessor::_toXMLCh(gain));
60  add_element(_data_elem, XMLProcessor::_toXMLCh("FLAG"), XMLProcessor::_toXMLCh(flag));
61  //
62  return _data_elem;
63 }
64 
65 
66 DOMNode * HcalL1TriggerObjectsXml::add_hcal_channel_dataset( int ieta, int iphi, int depth, std::string subdetector,
67  double ped, double gain, int flag){
68  DOMNode * _dataset = add_dataset();
69  add_hcal_channel(_dataset, ieta, iphi, depth, subdetector);
70  add_data(_dataset, ped, gain, flag);
71  return _dataset;
72 }
long int flag
Definition: mlp_lapack.h:47
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)
static XMLCh * _toXMLCh(std::string temp)
Definition: XMLProcessor.h:185
DOMElement * add_data(DOMNode *_dataset, double ped, double gain, int flag)
#define comment(par)
Definition: vmac.h:162