39 virtual ~ProductAdder() =
default;
43 template <
typename Product,
typename RealRecord>
44 class ProductAdderT :
public ProductAdder {
56 template <
typename Product,
typename RealRecord>
58 return std::make_unique<ProductAdderT<Product, RealRecord>>(cc,
label);
80 : thresholdForReducedGranularity_{iConfig.
getParameter<
double>(
"ThresholdForReducedGranularity")},
81 printDebugOutput_{iConfig.getParameter<
bool>(
"PrintDebugOutput")},
82 useEmptyRunInfo_{iConfig.getParameter<
bool>(
"UseEmptyRunInfo")},
83 reduceGranularity_{iConfig.getParameter<
bool>(
"ReduceGranularity")} {
84 auto cc = setWhatProduced(
this);
88 bool doRunInfo =
false;
91 auto toGet = iConfig.getParameter<std::vector<edm::ParameterSet>>(
"ListOfRecordToMerge");
93 for (
const auto& toGetPSet :
toGet) {
98 <<
"[SiStripQualityESProducer::ctor] Going to get data from record " <<
recordName <<
" with tag " <<
tagName;
101 productAdders_.emplace_back(make_ProductAdder<SiStripBadStrip, SiStripBadModuleRcd>(cc,
tagName));
102 }
else if (
recordName ==
"SiStripBadFiberRcd") {
103 productAdders_.emplace_back(make_ProductAdder<SiStripBadStrip, SiStripBadFiberRcd>(cc,
tagName));
104 }
else if (
recordName ==
"SiStripBadChannelRcd") {
105 productAdders_.emplace_back(make_ProductAdder<SiStripBadStrip, SiStripBadChannelRcd>(cc,
tagName));
106 }
else if (
recordName ==
"SiStripBadStripRcd") {
107 productAdders_.emplace_back(make_ProductAdder<SiStripBadStrip, SiStripBadStripRcd>(cc,
tagName));
108 }
else if (
recordName ==
"SiStripDetCablingRcd") {
109 productAdders_.emplace_back(make_ProductAdder<SiStripDetCabling, SiStripDetCablingRcd>(cc,
tagName));
110 }
else if (
recordName ==
"SiStripDetVOffRcd") {
111 productAdders_.emplace_back(make_ProductAdder<SiStripDetVOff, SiStripDetVOffRcd>(cc,
tagName));
118 <<
"[SiStripQualityESProducer::ctor] Skipping the requested data for unexisting record " <<
recordName 119 <<
" with tag " <<
tagName << std::endl;
132 auto quality = std::make_unique<SiStripQuality>(detInfo);
133 edm::LogInfo(
"SiStripQualityESProducer") <<
"produce called";
T getParameter(std::string const &) const
~SiStripQualityESProducer() override
auto consumesFrom(ESInputTag const &tag)
Log< level::Error, false > LogError
const bool reduceGranularity_
constexpr bool isInitialized() const noexcept
std::unique_ptr< SiStripQuality > produce(const SiStripQualityRcd &)
SiStripDetInfo read(std::string filePath)
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
const double thresholdForReducedGranularity_
Log< level::Info, false > LogInfo
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
std::vector< std::unique_ptr< const ProductAdder > > productAdders_
void add(std::map< std::string, TH1 *> &h, TH1 *hist)
const bool useEmptyRunInfo_
static constexpr char const *const kDefaultFile
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
const bool printDebugOutput_
SiStripQualityESProducer(const edm::ParameterSet &)