File indexing completed on 2024-04-06 11:58:23
0001 #include "CalibMuon/CSCCalibration/test/stubs/CSCDBChipSpeedCorrectionHandler.h"
0002 #include "FWCore/ParameterSet/interface/ParameterSetfwd.h"
0003 #include <iostream>
0004
0005 #include "CalibMuon/CSCCalibration/interface/CSCChipSpeedCorrectionDBConditions.h"
0006 #include "CondFormats/CSCObjects/interface/CSCDBChipSpeedCorrection.h"
0007
0008 popcon::CSCDBChipSpeedCorrectionImpl::CSCDBChipSpeedCorrectionImpl(const edm::ParameterSet &pset) {
0009 m_name = (pset.getUntrackedParameter<std::string>("name", "CSCDBChipSpeedCorrectionImpl"));
0010 isForMC = (pset.getUntrackedParameter<bool>("isForMC", true));
0011 dataCorrFileName = (pset.getUntrackedParameter<std::string>("dataCorrFileName", "empty.txt"));
0012 dataOffset = 170.;
0013 }
0014
0015 popcon::CSCDBChipSpeedCorrectionImpl::~CSCDBChipSpeedCorrectionImpl() {}
0016
0017 void popcon::CSCDBChipSpeedCorrectionImpl::getNewObjects() {
0018 std::cout << "CSCChipSpeedCorrectionHandler - time before filling object:" << std::endl;
0019 std::cout << "------- CSC src - > getNewObjects\n" << m_name;
0020
0021
0022
0023
0024
0025 CSCDBChipSpeedCorrection *cnchipspeed =
0026 CSCChipSpeedCorrectionDBConditions::prefillDBChipSpeedCorrection(isForMC, dataCorrFileName, dataOffset);
0027
0028
0029
0030 std::cout << "CSCChipSpeedCorrectionHandler - time after filling object:" << std::endl;
0031
0032
0033
0034 std::cerr << "got offlineInfo" << std::endl;
0035 std::cerr << tagInfo().name << " , last object valid since " << tagInfo().lastInterval.since << std::endl;
0036
0037 unsigned int snc;
0038 std::cout << "Source implementation test ::getNewObjects : enter since ? \n";
0039 std::cin >> snc;
0040 std::cout << "getNewObjects : enter till ? \n";
0041
0042 m_to_transfer.push_back(std::make_pair(cnchipspeed, snc));
0043
0044 std::cout << "------- " << m_name << "CSC src - > getNewObjects -----------\n" << std::endl;
0045 std::cout << "CSCChipSpeedCorrectionHandler - time before writing into DB:" << std::endl;
0046 }