11 : m_name(ps.getUntrackedParameter<
std::
string>(
"name",
"EcalIntercalibHandler")) {
12 edm::LogInfo(
"EcalIntercalib Source handler constructor\n");
22 std::ostringstream
ss;
25 unsigned long long irun;
31 if (m_file_type ==
"xml")
45 if (!fxml.is_open()) {
50 for (
int i = 0;
i < 6;
i++) {
51 getline(fxml, dummyLine);
56 std::istringstream iEB(stt);
64 for (
int iChannel = 0; iChannel <
kEBChannels; iChannel++) {
67 std::size_t
found = bid.find(
"</");
68 stt = bid.substr(6,
found - 6);
69 float val = std::stof(stt);
72 for (
int i = 0;
i < 5;
i++) {
73 getline(fxml, dummyLine);
77 stt = bid.substr(7, 5);
78 std::istringstream iEE(stt);
87 for (
int iChannel = 0; iChannel <
kEEChannels; iChannel++) {
90 std::size_t
found = bid.find(
"</");
91 stt = bid.substr(6,
found - 6);
92 float val = std::stof(stt);
100 if (!ftxt.is_open()) {
104 int number_of_lines = 0,
eta, phi, x, y, z;
107 while (std::getline(ftxt,
line)) {
109 sscanf(
line.c_str(),
"%i %i %i %f", &
eta, &phi, &z, &
val);
113 sscanf(
line.c_str(),
"%i %i %i %f", &x, &y, &z, &
val);
119 edm::LogInfo(
"Number of lines in text file: ") << number_of_lines;
122 edm::LogInfo(
"wrong number of channels! Please check ");