40 : templateCalibrations_(conf_.getParameter<
vstring>(
"siPixelTemplateCalibrations")),
41 version_(conf_.getParameter<double>(
"Version")) {
42 edm::LogInfo(
"SiPixelFakeTemplateDBObjectESSource::SiPixelFakeTemplateDBObjectESSource");
46 findingRecord<SiPixelTemplateDBObjectRcd>();
70 for (
m = 0;
m <
obj->numOfTempl(); ++
m) {
72 tempfile = (
file.fullPath()).c_str();
78 <<
"Opened Template File: " <<
file.fullPath().c_str() << std::endl;
81 char title_char[80],
c;
87 for (iter = 0; (
c =
in_file.get()) !=
'\n' && iter < 79; ++iter) {
91 title_char[iter] =
'\n';
93 unsigned int ilast = 3 - (iter % 4);
94 for (
unsigned int it = 0;
it != ilast;
it++) {
95 title_char[iter] =
' ';
98 title_char[iter] =
'\n';
101 for (
unsigned int j = 0;
j <= iter;
j += 4) {
102 temp.c[0] = title_char[
j];
103 temp.c[1] = title_char[
j + 1];
104 temp.c[2] = title_char[
j + 2];
105 temp.c[3] = title_char[
j + 3];
107 obj->setMaxIndex(
obj->maxIndex() + 1);
113 obj->setMaxIndex(
obj->maxIndex() + 1);
114 obj->push_back(tempstore);
121 edm::LogError(
"SiPixeFakelTemplateDBObjectESSource") <<
"Error opening File" << tempfile << std::endl;
126 return std::unique_ptr<SiPixelTemplateDBObject>(
obj);
139 "siPixelTemplateCalibrations",
140 {
"CalibTracker/SiPixelESProducers/data/SiPixelTemplateDBObject_0T_phase1_BoR3_v1/template_summary_zp0310.out",
141 "CalibTracker/SiPixelESProducers/data/SiPixelTemplateDBObject_0T_phase1_BoR3_v1/template_summary_zp0311.out",
142 "CalibTracker/SiPixelESProducers/data/SiPixelTemplateDBObject_0T_phase1_BoR3_v1/template_summary_zp0312.out",
143 "CalibTracker/SiPixelESProducers/data/SiPixelTemplateDBObject_0T_phase1_BoR3_v1/template_summary_zp0313.out",
144 "CalibTracker/SiPixelESProducers/data/SiPixelTemplateDBObject_0T_phase1_BoR3_v1/template_summary_zp0314.out",
145 "CalibTracker/SiPixelESProducers/data/SiPixelTemplateDBObject_0T_phase1_BoR3_v1/template_summary_zp0315.out"});
146 desc.add<
double>(
"Version", 1.0);
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
~SiPixelFakeTemplateDBObjectESSource() override
std::vector< std::string > vstring
static const IOVSyncValue & endOfTime()
Log< level::Error, false > LogError
static const IOVSyncValue & beginOfTime()
SiPixelFakeTemplateDBObjectESSource(const edm::ParameterSet &)
vstring templateCalibrations_
Log< level::Warning, true > LogPrint
Log< level::Info, false > LogInfo
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
virtual std::unique_ptr< SiPixelTemplateDBObject > produce(const SiPixelTemplateDBObjectRcd &)
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)