|
|
Go to the documentation of this file.
48 }
else if ((std::strcmp(
s_operation.c_str(),
"sadd") == 0) || (std::strcmp(
s_operation.c_str(),
"ssub") == 0) ||
51 std::cerr <<
"Scalar operation: using val=" <<
val << std::endl;
66 std::ifstream inStream(
fileIn.c_str());
75 std::ifstream inCorr(
fileCorr.c_str());
82 std::vector<DetId>
channels = gainsIn.getAllChannels();
96 std::cerr <<
"Vector operation, " <<
i <<
"th channel: using val=" <<
val << std::endl;
99 std::unique_ptr<HcalGain> p_item;
101 p_item = std::make_unique<HcalGain>(
id,
102 gainsIn.getValues(
id)->getValue(0) +
val,
103 gainsIn.getValues(
id)->getValue(1) +
val,
104 gainsIn.getValues(
id)->getValue(2) +
val,
105 gainsIn.getValues(
id)->getValue(3) +
val);
108 p_item = std::make_unique<HcalGain>(
id,
109 gainsIn.getValues(
id)->getValue(0) -
val,
110 gainsIn.getValues(
id)->getValue(1) -
val,
111 gainsIn.getValues(
id)->getValue(2) -
val,
112 gainsIn.getValues(
id)->getValue(3) -
val);
115 p_item = std::make_unique<HcalGain>(
id,
116 gainsIn.getValues(
id)->getValue(0) *
val,
117 gainsIn.getValues(
id)->getValue(1) *
val,
118 gainsIn.getValues(
id)->getValue(2) *
val,
119 gainsIn.getValues(
id)->getValue(3) *
val);
122 p_item = std::make_unique<HcalGain>(
id,
123 gainsIn.getValues(
id)->getValue(0) /
val,
124 gainsIn.getValues(
id)->getValue(1) /
val,
125 gainsIn.getValues(
id)->getValue(2) /
val,
126 gainsIn.getValues(
id)->getValue(3) /
val);
134 std::ofstream outStream(
fileOut.c_str());
const bool exists(DetId fId) const
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
#define DEFINE_FWK_MODULE(type)
void endRun(edm::Run const &iEvent, edm::EventSetup const &) override
modGains(const edm::ParameterSet &)
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