File indexing completed on 2024-04-06 12:00:06
0001 #ifndef HCALConfigDBTools_XMLTools_XMLLUTLoader_h
0002 #define HCALConfigDBTools_XMLTools_XMLLUTLoader_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "CalibCalorimetry/HcalTPGAlgos/interface/XMLDOMBlock.h"
0025 #include "CalibCalorimetry/HcalTPGAlgos/interface/XMLProcessor.h"
0026
0027
0028
0029 class XMLLUTLoader : public XMLDOMBlock {
0030 public:
0031 typedef struct _loaderBaseConfig : public XMLProcessor::loaderBaseConfig {
0032 } loaderBaseConfig;
0033
0034 typedef struct _lutDBConfig : public XMLProcessor::DBConfig {
0035 _lutDBConfig();
0036 std::string kind_of_part;
0037 std::string name_label;
0038 std::string trig_prim_lookuptbl_data_file;
0039 int crate;
0040 } lutDBConfig;
0041
0042 typedef struct _checksumsDBConfig : public XMLProcessor::DBConfig {
0043 _checksumsDBConfig();
0044 std::string comment_description;
0045 std::string name_label;
0046 std::string trig_prim_lookuptbl_data_file;
0047 int crate;
0048 } checksumsDBConfig;
0049
0050 XMLLUTLoader();
0051 XMLLUTLoader(XMLProcessor::loaderBaseConfig* config,
0052 std::string templateBase = "HCAL_TRIG_PRIM_LOOKUP_TABLE.XMLloader.template");
0053 XMLLUTLoader(const XMLLUTLoader&) = delete;
0054 const XMLLUTLoader& operator=(const XMLLUTLoader&) = delete;
0055 ~XMLLUTLoader() override;
0056
0057 int addLUT(lutDBConfig* config, std::string templateFileName = "HCAL_TRIG_PRIM_LOOKUP_TABLE.dataset.template");
0058
0059 int addChecksums(checksumsDBConfig* config,
0060 std::string templateFileName = "HCAL_TRIG_PRIM_LOOKUP_TABLE.checksums.template");
0061
0062 int createLoader(const std::vector<int>& crate_number, const std::vector<std::string>& file_name);
0063 };
0064
0065 #endif