7 : m_name(ps.getUntrackedParameter<
std::
string>(
"name",
"EcalPulseSymmCovariancesHandler")) {
8 std::cout <<
"EcalPulseSymmCovariance Source handler constructor\n" << std::endl;
21 for (
int k = 0;
k <
N; ++
k) {
22 if (fabs(
item->covval[
k]) > 1)
35 item->covval[linK] = isbarrel ? m_EBPulseShapeCovariance[
k] : m_EEPulseShapeCovariance[
k];
41 std::cout <<
"------- Ecal - > getNewObjects\n";
47 std::ifstream inputfile;
48 inputfile.open(m_filename.c_str());
55 int nEBbad(0), nEEbad(0);
56 int nEBgood(0), nEEgood(0);
57 std::vector<EBDetId> ebgood;
58 std::vector<EEDetId> eegood;
62 while (std::getline(inputfile,
line)) {
63 std::istringstream linereader(
line);
64 linereader >> isbarrel >> rawId;
69 linereader >> covvals[
i][
j];
73 std::cout <<
"Wrong format of the text file. Exit." << std::endl;
89 if (!checkPulseSymmCovariance(&
item))
93 ebgood.push_back(ebdetid);
98 if (!checkPulseSymmCovariance(&
item))
102 eegood.push_back(eedetid);
110 std::cout <<
"Filled the DB with the good measured ECAL templates. Now filling the others with the TB values"
119 std::vector<EBDetId>::iterator it =
find(ebgood.begin(), ebgood.end(), ebdetid);
120 if (it == ebgood.end()) {
122 fillSimPulseSymmCovariance(&
item,
true);
129 for (
int iZ = -1; iZ < 2; iZ += 2) {
135 std::vector<EEDetId>::iterator it =
find(eegood.begin(), eegood.end(), eedetid);
136 if (it == eegood.end()) {
138 fillSimPulseSymmCovariance(&
item,
false);
146 std::cout <<
"Inserted the pulse covariances into the new item object" << std::endl;
148 unsigned int irun = m_firstRun;
153 std::cout <<
"Ecal - > end of getNewObjects -----------" << std::endl;
154 std::cout <<
"N. bad shapes for EB = " << nEBbad << std::endl;
155 std::cout <<
"N. bad shapes for EE = " << nEEbad << std::endl;
156 std::cout <<
"Written the object" << std::endl;