Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:19

0001 #ifndef RPC_DB_FW_H
0002 #define RPC_DB_FW_H
0003 
0004 /*
0005  * \class RPCFw
0006  *  Reads data from OMDS and creates conditioning objects
0007  *
0008  *  \author D. Pagano - Dip. Fis. Nucl. e Teo. & INFN Pavia
0009  */
0010 
0011 #include "CondTools/RPC/interface/RPCDBCom.h"
0012 #include "CoralBase/TimeStamp.h"
0013 #include "CondTools/RPC/interface/RPCImonSH.h"
0014 #include "CondTools/RPC/interface/RPCVmonSH.h"
0015 #include "CondTools/RPC/interface/RPCStatusSH.h"
0016 #include "CondTools/RPC/interface/RPCTempSH.h"
0017 #include "CondFormats/RPCObjects/interface/RPCObCond.h"
0018 #include "CondTools/RPC/interface/RPCGasSH.h"
0019 #include "CondTools/RPC/interface/RPCIDMapSH.h"
0020 #include "CondFormats/RPCObjects/interface/RPCObFebmap.h"
0021 #include "CondFormats/RPCObjects/interface/RPCObUXC.h"
0022 #include "CondFormats/RPCObjects/interface/RPCObGasMix.h"
0023 
0024 struct dbread {
0025   float alias;
0026   float value;
0027 };
0028 
0029 class RPCFw : virtual public RPCDBCom {
0030 public:
0031   RPCFw(const std::string& connectionString, const std::string& userName, const std::string& password);
0032   ~RPCFw() override;
0033   void run() override;
0034 
0035   coral::TimeStamp UTtoT(long long utime);
0036   unsigned long long TtoUT(const coral::TimeStamp& time);
0037 
0038   coral::TimeStamp tMIN;
0039   coral::TimeStamp tMAX;
0040   unsigned long long N_IOV;
0041 
0042   std::vector<RPCObImon::I_Item> createIMON(long long since, long long till);
0043   std::vector<RPCObVmon::V_Item> createVMON(long long from, long long till);
0044   std::vector<RPCObStatus::S_Item> createSTATUS(long long since, long long till);
0045   std::vector<RPCObGas::Item> createGAS(long long since, long long till);
0046   std::vector<RPCObTemp::T_Item> createT(long long since, long long till);
0047   std::vector<RPCObPVSSmap::Item> createIDMAP();
0048   std::vector<RPCObFebmap::Feb_Item> createFEB(long long since, long long till);
0049   std::vector<RPCObUXC::Item> createUXC(long long since, long long till);
0050   std::vector<RPCObGasMix::Item> createMix(long long since, long long till);
0051   bool isMajor(const coral::TimeStamp& fir, const coral::TimeStamp& sec);
0052 
0053 private:
0054   std::string m_connectionString;
0055   std::string m_userName;
0056   std::string m_password;
0057 };
0058 
0059 #endif