|
|
Go to the documentation of this file.
43 tok_htopo_ = esConsumes<HcalTopology, HcalRecNumberingRecord>();
49 }
else if ((std::strcmp(
s_operation.c_str(),
"sadd") == 0) || (std::strcmp(
s_operation.c_str(),
"ssub") == 0) ||
52 std::cerr <<
"Scalar operation: using val=" <<
val << std::endl;
65 std::ifstream inStream(
fileIn.c_str());
74 std::ifstream inCorr(
fileCorr.c_str());
81 std::vector<DetId>
channels = gainsIn.getAllChannels();
95 std::cerr <<
"Vector operation, " <<
i <<
"th channel: using val=" <<
val << std::endl;
98 std::unique_ptr<HcalGain> p_item;
100 p_item = std::make_unique<HcalGain>(
id,
101 gainsIn.getValues(
id)->getValue(0) +
val,
102 gainsIn.getValues(
id)->getValue(1) +
val,
103 gainsIn.getValues(
id)->getValue(2) +
val,
104 gainsIn.getValues(
id)->getValue(3) +
val);
107 p_item = std::make_unique<HcalGain>(
id,
108 gainsIn.getValues(
id)->getValue(0) -
val,
109 gainsIn.getValues(
id)->getValue(1) -
val,
110 gainsIn.getValues(
id)->getValue(2) -
val,
111 gainsIn.getValues(
id)->getValue(3) -
val);
114 p_item = std::make_unique<HcalGain>(
id,
115 gainsIn.getValues(
id)->getValue(0) *
val,
116 gainsIn.getValues(
id)->getValue(1) *
val,
117 gainsIn.getValues(
id)->getValue(2) *
val,
118 gainsIn.getValues(
id)->getValue(3) *
val);
121 p_item = std::make_unique<HcalGain>(
id,
122 gainsIn.getValues(
id)->getValue(0) /
val,
123 gainsIn.getValues(
id)->getValue(1) /
val,
124 gainsIn.getValues(
id)->getValue(2) /
val,
125 gainsIn.getValues(
id)->getValue(3) /
val);
133 std::ofstream outStream(
fileOut.c_str());
void beginRun(edm::Run const &iEvent, edm::EventSetup const &) override
T getUntrackedParameter(std::string const &, T const &) const
const Item * getValues(DetId fId, bool throwOnFail=true) const
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_htopo_
#define DEFINE_FWK_MODULE(type)
void endRun(edm::Run const &iEvent, edm::EventSetup const &) override
bool exists(DetId fId) const
modGains(const edm::ParameterSet &)
bool getData(T &iHolder) const
bool dumpObject(std::ostream &fOutput, const HcalPedestals &fObject)
bool getObject(std::istream &fInput, HcalPedestals *fObject)
bool addValues(const Item &myItem)
void analyze(edm::Event const &, edm::EventSetup const &) override