DTKeyedConfigHandler

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
#ifndef DTKeyedConfigHandler_H
#define DTKeyedConfigHandler_H
/** \class DTKeyedConfigHandler
 *
 *  Description: 
 *
 *
 *  $Date: 2010/05/14 11:43:08 $
 *  $Revision: 1.2 $
 *  \author Paolo Ronchese INFN Padova
 *
 */

//----------------------
// Base Class Headers --
//----------------------
#include "CondCore/PopCon/interface/PopConSourceHandler.h"

//------------------------------------
// Collaborating Class Declarations --
//------------------------------------
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "CondCore/CondDB/interface/ConnectionPool.h"
#include "CondFormats/DTObjects/interface/DTCCBConfig.h"
#include <memory>
#include <string>

namespace coral {
  class ISessionProxy;
}

namespace cond {
  namespace persistency {
    class KeyList;
  }
}  // namespace cond

//---------------
// C++ Headers --
//---------------

//              ---------------------
//              -- Class Interface --
//              ---------------------

class DTKeyedConfigHandler : public popcon::PopConSourceHandler<DTCCBConfig> {
public:
  /** Constructor
   */
  DTKeyedConfigHandler(const edm::ParameterSet& ps);

  /** Destructor
   */
  ~DTKeyedConfigHandler() override;

  /** Operations
   */
  ///
  void getNewObjects() override;
  std::string id() const override;

  void setList(const cond::persistency::KeyList* list);

private:
  bool copyData;
  int minBrickId;
  int maxBrickId;
  int minRunId;
  int maxRunId;

  std::string dataTag;
  std::string onlineConnect;
  std::string onlineAuthentication;
  int onlineAuthSys;
  std::string brickContainer;
  DTCCBConfig* ccbConfig;

  cond::persistency::ConnectionPool connection;
  std::shared_ptr<coral::ISessionProxy> isession;
  void chkConfigList();
  static bool sameConfigList(const std::vector<DTConfigKey>& cfgl, const std::vector<DTConfigKey>& cfgr);

  const cond::persistency::KeyList* keyList = nullptr;
};

#endif  // DTKeyedConfigHandler_H