00001 #ifndef CaloOnlineTools_HcalOnlineDb_HcalChannelDataXml_h 00002 #define CaloOnlineTools_HcalOnlineDb_HcalChannelDataXml_h 00003 // -*- C++ -*- 00004 // 00005 // Package: CaloOnlineTools/HcalOnlineDb 00006 // Class : HcalChannelDataXml 00007 // 00016 // 00017 // Original Author: Gena Kukartsev, kukarzev@fnal.gov 00018 // Created: Wed Jul 01 06:42:00 CDT 2009 00019 // $Id: HcalChannelDataXml.h,v 1.6 2010/08/06 20:24:09 wmtan Exp $ 00020 // 00021 00022 #include "CalibCalorimetry/HcalTPGAlgos/interface/XMLDOMBlock.h" 00023 #include "CalibCalorimetry/HcalTPGAlgos/interface/XMLProcessor.h" 00024 #include "CaloOnlineTools/HcalOnlineDb/interface/HcalAssistant.h" 00025 00026 class HcalChannelDataXml : public XMLDOMBlock 00027 { 00028 00029 public: 00030 00031 HcalChannelDataXml(); 00032 virtual ~HcalChannelDataXml(); 00033 00034 int init_data( void ); 00035 00036 // 00037 //_____ methods to set basic tags 00038 // 00039 DOMNode * set_header_table_name(std::string name); 00040 DOMNode * set_header_type(std::string type); 00041 DOMNode * set_header_run_number(int run); 00042 DOMNode * set_header_channel_map(std::string name); 00043 DOMNode * set_elements_dataset_id(int id); 00044 DOMNode * set_elements_iov_id(int id); 00045 DOMNode * set_elements_iov_begin(int value); 00046 DOMNode * set_elements_iov_end(int value); 00047 DOMNode * set_elements_tag_id(int value); 00048 DOMNode * set_elements_tag_mode(std::string value); 00049 DOMNode * set_elements_tag_name(std::string value); 00050 DOMNode * set_elements_detector_name(std::string value); 00051 DOMNode * set_elements_comment(std::string value); 00052 DOMNode * set_maps_tag_idref(int value); 00053 DOMNode * set_maps_iov_idref(int value); 00054 DOMNode * set_maps_dataset_idref(int value); 00055 00056 // 00057 //_____ add data 00058 // 00059 DOMNode * add_dataset( void ); 00060 DOMNode * add_hcal_channel( DOMNode * _dataset, int ieta, int iphi, int depth, std::string subdetector ); 00061 00062 // 00063 //_____ DATA_SET getter methods 00064 // 00065 DOMElement * get_data_element( DOMNode * _dataset ); 00066 DOMElement * get_channel_element( DOMNode * _dataset ); 00067 00068 // 00069 //_____ tester methods ________________________________________________ 00070 // 00071 00072 00073 protected: 00074 MemBufInputSource * _root; // a container for the XML template; 00075 MemBufInputSource * _dataset; // a container for the XML template; 00076 00077 // 00078 //_____ HEADER 00079 std::string extension_table_name; 00080 std::string type_name; 00081 int run_number; 00082 std::string channel_map; 00083 // 00084 //_____ ELEMENTS 00085 int data_set_id; 00086 int iov_id; 00087 int iov_begin; 00088 int iov_end; 00089 int tag_id; 00090 std::string tag_mode; 00091 std::string tag_name; 00092 std::string detector_name; 00093 std::string comment; 00094 // 00095 //_____MAPS 00096 int tag_idref; 00097 int iov_idref; 00098 int data_set_idref; 00099 // 00100 //_____ DATA_SET 00101 std::string username; 00102 std::string dataset_comment; 00103 00104 HcalAssistant hcal_ass; 00105 int dataset_count; 00106 time_t global_timestamp; 00107 }; 00108 00109 00110 #endif