15 : m_name(ps.getUntrackedParameter<std::
string>(
"name",
"EcalTPGPedfromFileHandler")) {
16 std::cout <<
"EcalTPGPedfromFile constructor\n" << std::endl;
24 std::cout <<
"------- Ecal -> getNewObjects\n";
26 unsigned long long max_since = 1;
27 Ref payload= lastPayload();
30 max_since=
tagInfo().lastInterval.first;
31 Tm max_since_tm(max_since);
36 std::cout <<
"PedfromFile which input IOV do you want " << std::endl;
39 std::ostringstream oss;
41 std::string fname =
"/afs/cern.ch/cms/ECAL/triggerTransp/TPG_beamv6_trans_" + oss.str() +
"_spikekill.txt";
42 fLin.open(fname.c_str());
44 std::cout <<
"ERROR : can't open file '" << fname << std::endl;
47 std::cout <<
" file " << fname <<
" opened" << std::endl;
49 for(
int i = 0;
i < 85;
i++) getline (fLin, line);
51 uint32_t ped[kGains],
mult[kGains],
shift[kGains];
53 for (
int iChannel = 0; iChannel < kEBChannels; iChannel++) {
55 sscanf(line.c_str(),
"%s %u", cryst, &id);
56 for (
int gain = 0; gain < kGains; gain++) {
58 sscanf(line.c_str(),
"%X %X %X", &ped[gain], &mult[gain], &shift[gain]);
73 linC->
insert(std::make_pair(
id, item));
74 peds->
insert(std::make_pair(
id, itemPed));
77 std::cout <<
" comment line " << line << std::endl;
78 for (
int iChannel = 0; iChannel < kEEChannels; iChannel++) {
81 sscanf(line.c_str(),
"%s %u", cryst, &id);
83 for (
int gain =0; gain < kGains; gain++) {
86 sscanf(line.c_str(),
"%X %X %X", &ped[gain], &mult[gain], &shift[gain]);
103 linC->
insert(std::make_pair(
id, item));
104 peds->
insert(std::make_pair(
id, itemPed));
111 std::cout <<
"Ecal -> end of getNewObjects -----------\n";
EcalTPGPedfromFile(edm::ParameterSet const &)
edm::Ref< Container > Ref
void insert(std::pair< uint32_t, Item > const &a)
static unsigned int const shift
EcalTPGPedestalsMap EcalTPGPedestals
EcalTPGLinearizationConstMap EcalTPGLinearizationConst