Implements popcon::PopConSourceHandler< EcalTPGPedestals >.
Definition at line 23 of file EcalTPGPedfromFile.cc.
References gather_cfg::cout, alignmentValidation::fname, PedestalClient_cfi::gain, mps_fire::i, id(), EcalCondObjectContainer< T >::insert(), B2GTnPMonitor_cfi::item, 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, VarParsing::mult, jets_cff::payload, edm::shift, AlCaHLTBitMon_QueryRunRegistry::string, and popcon::PopConSourceHandler< EcalTPGPedestals >::tagInfo().
24 std::cout <<
"------- Ecal -> getNewObjects\n";
26 unsigned long long max_since = 1;
31 Tm max_since_tm(max_since);
34 std::cout <<
"PedfromFile which input IOV do you want " << std::endl;
37 std::ostringstream oss;
39 std::string fname =
"/afs/cern.ch/cms/ECAL/triggerTransp/TPG_beamv6_trans_" + oss.str() +
"_spikekill.txt";
40 fLin.open(fname.c_str());
41 if (!fLin.is_open()) {
42 std::cout <<
"ERROR : can't open file '" << fname << std::endl;
45 std::cout <<
" file " << fname <<
" opened" << std::endl;
47 for (
int i = 0;
i < 85;
i++)
54 for (
int iChannel = 0; iChannel <
kEBChannels; iChannel++) {
56 sscanf(line.c_str(),
"%s %u", cryst, &
id);
59 sscanf(line.c_str(),
"%X %X %X", &ped[
gain], &mult[
gain], &shift[
gain]);
62 item.mult_x1 = mult[2];
63 item.mult_x6 = mult[1];
64 item.mult_x12 = mult[0];
65 item.shift_x1 = shift[2];
66 item.shift_x6 = shift[1];
67 item.shift_x12 = shift[0];
74 linC->
insert(std::make_pair(
id, item));
75 peds->
insert(std::make_pair(
id, itemPed));
78 std::cout <<
" comment line " << line << std::endl;
79 for (
int iChannel = 0; iChannel <
kEEChannels; iChannel++) {
82 sscanf(line.c_str(),
"%s %u", cryst, &
id);
87 sscanf(line.c_str(),
"%X %X %X", &ped[
gain], &mult[
gain], &shift[
gain]);
91 item.mult_x1 = mult[2];
92 item.mult_x6 = mult[1];
93 item.mult_x12 = mult[0];
94 item.shift_x1 = shift[2];
95 item.shift_x6 = shift[1];
96 item.shift_x12 = shift[0];
103 linC->
insert(std::make_pair(
id, item));
104 peds->
insert(std::make_pair(
id, itemPed));
111 std::cout <<
"Ecal -> end of getNewObjects -----------\n";
std::string id() const override
edm::Ref< Container > Ref
OldContainer m_to_transfer
cond::ValidityInterval lastInterval
void insert(std::pair< uint32_t, Item > const &a)
static unsigned int const shift
EcalTPGPedestalsMap EcalTPGPedestals
cond::TagInfo_t const & tagInfo() const
EcalTPGLinearizationConstMap EcalTPGLinearizationConst