14 : m_name(ps.getUntrackedParameter<std::
string>(
"name",
"EcalTPGLinPedHandler")) {
15 std::cout <<
"EcalTPGLinPed constructor\n" << std::endl;
23 std::cout <<
"------- Ecal -> getNewObjects\n";
25 unsigned long long max_since = 1;
26 Ref payload= lastPayload();
29 max_since=
tagInfo().lastInterval.first;
30 Tm max_since_tm(max_since);
35 std::cout <<
"LinPed which input IOV do you want " << std::endl;
38 std::ostringstream oss;
40 std::string fname =
"/afs/cern.ch/cms/ECAL/triggerTransp/TPG_beamv6_trans_" + oss.str() +
"_spikekill.txt";
41 fLin.open(fname.c_str());
43 std::cout <<
"ERROR : can't open file '" << fname << std::endl;
46 std::cout <<
" file " << fname <<
" opened" << std::endl;
48 for(
int i = 0;
i < 85;
i++) getline (fLin, line);
50 uint32_t ped[kGains],
mult[kGains],
shift[kGains];
52 for (
int iChannel = 0; iChannel < kEBChannels; iChannel++) {
54 sscanf(line.c_str(),
"%s %u", cryst, &id);
55 for (
int gain = 0; gain < kGains; gain++) {
57 sscanf(line.c_str(),
"%X %X %X", &ped[gain], &mult[gain], &shift[gain]);
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);
82 for (
int gain =0; gain < kGains; gain++) {
85 sscanf(line.c_str(),
"%X %X %X", &ped[gain], &mult[gain], &shift[gain]);
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
EcalTPGLinPed(edm::ParameterSet const &)
void insert(std::pair< uint32_t, Item > const &a)
static unsigned int const shift
EcalTPGPedestalsMap EcalTPGPedestals
EcalTPGLinearizationConstMap EcalTPGLinearizationConst