Definition at line 51 of file EcalTPGLinPed.h.
void popcon::EcalTPGLinPed::getNewObjects |
( |
| ) |
|
|
overridevirtual |
Implements popcon::PopConSourceHandler< EcalTPGPedestals >.
Definition at line 22 of file EcalTPGLinPed.cc.
References gather_cfg::cout, alignmentValidation::fname, muonCSCDigis_cfi::gain, mps_fire::i, id(), EcalCondObjectContainer< T >::insert(), kEBChannels, kEEChannels, kGains, cond::TagInfo_t::lastInterval, popcon::PopConSourceHandler< EcalTPGPedestals >::lastPayload(), mps_splice::line, popcon::PopConSourceHandler< EcalTPGPedestals >::m_to_transfer, EcalTPGPedestal::mean_x1, EcalTPGPedestal::mean_x12, EcalTPGPedestal::mean_x6, EcalTPGLinearizationConstant::mult_x1, jets_cff::payload, edm::shift, AlCaHLTBitMon_QueryRunRegistry::string, and popcon::PopConSourceHandler< EcalTPGPedestals >::tagInfo().
23 std::cout <<
"------- Ecal -> getNewObjects\n";
25 unsigned long long max_since = 1;
30 Tm max_since_tm(max_since);
33 std::cout <<
"LinPed which input IOV do you want " << std::endl;
36 std::ostringstream oss;
38 std::string fname =
"/afs/cern.ch/cms/ECAL/triggerTransp/TPG_beamv6_trans_" + oss.str() +
"_spikekill.txt";
39 fLin.open(fname.c_str());
41 std::cout <<
"ERROR : can't open file '" << fname << std::endl;
44 std::cout <<
" file " << fname <<
" opened" << std::endl;
46 for(
int i = 0;
i < 85;
i++) getline (fLin, line);
52 for (
int iChannel = 0; iChannel <
kEBChannels; iChannel++) {
54 sscanf(line.c_str(),
"%s %u", cryst, &
id);
57 sscanf(line.c_str(),
"%X %X %X", &ped[
gain], &mult[
gain], &shift[
gain]);
61 item.mult_x6 = mult[1];
62 item.mult_x12 = mult[0];
63 item.shift_x1 = shift[2];
64 item.shift_x6 = shift[1];
65 item.shift_x12 = shift[0];
72 linC->
insert(std::make_pair(
id, item));
73 peds->
insert(std::make_pair(
id, itemPed));
76 std::cout <<
" comment line " << line << std::endl;
77 for (
int iChannel = 0; iChannel <
kEEChannels; iChannel++) {
80 sscanf(line.c_str(),
"%s %u", cryst, &
id);
85 sscanf(line.c_str(),
"%X %X %X", &ped[
gain], &mult[
gain], &shift[
gain]);
91 item.mult_x6 = mult[1];
92 item.mult_x12 = mult[0];
93 item.shift_x1 = shift[2];
94 item.shift_x6 = shift[1];
95 item.shift_x12 = shift[0];
102 linC->
insert(std::make_pair(
id, item));
103 peds->
insert(std::make_pair(
id, itemPed));
110 std::cout <<
"Ecal -> end of getNewObjects -----------\n";
edm::Ref< Container > Ref
OldContainer m_to_transfer
cond::ValidityInterval lastInterval
void insert(std::pair< uint32_t, Item > const &a)
std::string id() const override
static unsigned int const shift
EcalTPGPedestalsMap EcalTPGPedestals
cond::TagInfo_t const & tagInfo() const
EcalTPGLinearizationConstMap EcalTPGLinearizationConst