File indexing completed on 2023-03-17 11:23:36
0001 #ifndef CastorSim_CastorCoderFactory_h
0002 #define CastorSim_CastorCoderFactory_h
0003
0004 #include "CalibFormats/CastorObjects/interface/CastorCoder.h"
0005 #include "CalibFormats/CastorObjects/interface/CastorDbService.h"
0006 #include <memory>
0007
0008 class CastorCoderFactory {
0009 public:
0010 enum CoderType { DB, NOMINAL };
0011
0012 CastorCoderFactory(CoderType coderType);
0013
0014 void setDbService(const CastorDbService *service) { theDbService = service; }
0015
0016
0017 std::unique_ptr<CastorCoder> coder(const DetId &detId) const;
0018
0019 private:
0020 CoderType theCoderType;
0021 const CastorDbService *theDbService;
0022 };
0023
0024 #endif