Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:45

0001 #ifndef DTUserKeyedConfigHandler_H
0002 #define DTUserKeyedConfigHandler_H
0003 /** \class DTUserKeyedConfigHandler
0004  *
0005  *  Description: 
0006  *
0007  *
0008  *  $Date: 2010/07/21 17:13:43 $
0009  *  $Revision: 1.3 $
0010  *  \author Paolo Ronchese INFN Padova
0011  *
0012  */
0013 
0014 //----------------------
0015 // Base Class Headers --
0016 //----------------------
0017 #include "CondCore/PopCon/interface/PopConSourceHandler.h"
0018 
0019 //------------------------------------
0020 // Collaborating Class Declarations --
0021 //------------------------------------
0022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0023 #include "CondCore/CondDB/interface/ConnectionPool.h"
0024 #include "CondFormats/DTObjects/interface/DTCCBConfig.h"
0025 #include <memory>
0026 #include <string>
0027 
0028 namespace coral {
0029   class ISessionProxy;
0030 }
0031 
0032 namespace cond {
0033   namespace persistency {
0034     class KeyList;
0035   }
0036 }  // namespace cond
0037 
0038 //---------------
0039 // C++ Headers --
0040 //---------------
0041 
0042 //              ---------------------
0043 //              -- Class Interface --
0044 //              ---------------------
0045 
0046 class DTUserKeyedConfigHandler : public popcon::PopConSourceHandler<DTCCBConfig> {
0047 public:
0048   /** Constructor
0049    */
0050   DTUserKeyedConfigHandler(const edm::ParameterSet& ps);
0051 
0052   /** Destructor
0053    */
0054   ~DTUserKeyedConfigHandler() override;
0055 
0056   /** Operations
0057    */
0058   ///
0059   void getNewObjects() override;
0060   std::string id() const override;
0061 
0062   void setList(const cond::persistency::KeyList* list);
0063 
0064 private:
0065   int dataRun;
0066   std::string dataTag;
0067   std::string onlineConnect;
0068   std::string onlineAuthentication;
0069   int onlineAuthSys;
0070   std::string brickContainer;
0071   std::vector<DTConfigKey> userConf;
0072   bool writeKeys;
0073   bool writeData;
0074   DTCCBConfig* ccbConfig;
0075 
0076   cond::persistency::ConnectionPool connection;
0077   std::shared_ptr<coral::ISessionProxy> isession;
0078   void chkConfigList(const std::map<int, bool>& userBricks);
0079   bool userDiscardedKey(int key);
0080   static bool sameConfigList(const std::vector<DTConfigKey>& cfgl, const std::vector<DTConfigKey>& cfgr);
0081 
0082   const cond::persistency::KeyList* keyList = nullptr;
0083 };
0084 
0085 #endif  // DTUserKeyedConfigHandler_H