Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:15:06

0001 //
0002 // Gena Kukartsev (Brown), Feb. 22, 2008
0003 //
0004 //
0005 #ifndef HcalQIEManager_h
0006 #define HcalQIEManager_h
0007 
0008 #include <iostream>
0009 #include <cstring>
0010 #include "CaloOnlineTools/HcalOnlineDb/interface/HCALConfigDB.h"
0011 
0012 /**
0013 
0014    \class HcalQIEManager
0015    \brief Various manipulations with QIE and QIE ADC
0016    \author Gena Kukartsev
0017 
0018 */
0019 
0020 class HcalChannelId {
0021 public:
0022   HcalChannelId(){};
0023   ~HcalChannelId(){};
0024 
0025   int eta, phi, depth;
0026   std::string subdetector;
0027 
0028   bool operator<(const HcalChannelId& other) const;
0029 };
0030 
0031 class HcalQIECaps {
0032 public:
0033   HcalQIECaps(){};
0034   ~HcalQIECaps(){};
0035 
0036   // cap0 offset x 4, cap1 offset x 4...
0037   // cap0 slope  x 4, cap1 slope  x 4...
0038   double caps[32];
0039 };
0040 
0041 class HcalQIEManager {
0042 public:
0043   HcalQIEManager();
0044   ~HcalQIEManager();
0045 
0046   std::map<HcalChannelId, HcalQIECaps>& getQIETableFromFile(std::string _filename);
0047   void getTableFromDb(std::string query_file, std::string output_file);
0048   int generateQieTable(std::string db_file, std::string old_file, std::string output_file);
0049   int getHfQieTable(std::string input_file, std::string output_file);
0050 
0051   static std::vector<std::string> splitString(const std::string& fLine);
0052 
0053 protected:
0054 };
0055 #endif