Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:00:06

0001 #ifndef HCALConfigDBTools_XMLTools_XMLLUTLoader_h
0002 #define HCALConfigDBTools_XMLTools_XMLLUTLoader_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     XMLTools
0006 // Class  :     XMLLUTLoader
0007 //
0008 /**\class XMLLUTLoader XMLLUTLoader.h CaloOnlineTools/HcalOnlineDb/interface/XMLLUTLoader.h
0009 
0010  Description: <one line class summary>
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  Gena Kukartsev, kukarzev@fnal.gov
0018 //         Created:  Tue Oct 23 14:30:33 CDT 2007
0019 //
0020 
0021 // system include files
0022 
0023 // user include files
0024 #include "CalibCalorimetry/HcalTPGAlgos/interface/XMLDOMBlock.h"
0025 #include "CalibCalorimetry/HcalTPGAlgos/interface/XMLProcessor.h"
0026 
0027 // forward declarations
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;                   // stop default
0054   const XMLLUTLoader& operator=(const XMLLUTLoader&) = delete;  // stop default
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