1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#include "CalibMuon/CSCCalibration/test/stubs/CSCDBChipSpeedCorrectionHandler.h"
#include "FWCore/ParameterSet/interface/ParameterSetfwd.h"
#include <iostream>
#include "CalibMuon/CSCCalibration/interface/CSCChipSpeedCorrectionDBConditions.h"
#include "CondFormats/CSCObjects/interface/CSCDBChipSpeedCorrection.h"
popcon::CSCDBChipSpeedCorrectionImpl::CSCDBChipSpeedCorrectionImpl(const edm::ParameterSet &pset) {
m_name = (pset.getUntrackedParameter<std::string>("name", "CSCDBChipSpeedCorrectionImpl"));
isForMC = (pset.getUntrackedParameter<bool>("isForMC", true));
dataCorrFileName = (pset.getUntrackedParameter<std::string>("dataCorrFileName", "empty.txt"));
dataOffset = 170.;
}
popcon::CSCDBChipSpeedCorrectionImpl::~CSCDBChipSpeedCorrectionImpl() {}
void popcon::CSCDBChipSpeedCorrectionImpl::getNewObjects() {
std::cout << "CSCChipSpeedCorrectionHandler - time before filling object:" << std::endl;
std::cout << "------- CSC src - > getNewObjects\n" << m_name;
// fill object from file
// bool isForMC = iConfig.getUntrackedParameter<bool>("isForMC",true);
// string dataCorrFileName=
// iConfig.getUntrackedParameter<std::string>("dataCorrFileName","empty.txt");
CSCDBChipSpeedCorrection *cnchipspeed =
CSCChipSpeedCorrectionDBConditions::prefillDBChipSpeedCorrection(isForMC, dataCorrFileName, dataOffset);
// std::cout << "chipspeed size " << cnchipspeed->chipspeed.size() <<
// std::endl;
std::cout << "CSCChipSpeedCorrectionHandler - time after filling object:" << std::endl;
// check whats already inside of database
std::cerr << "got offlineInfo" << std::endl;
std::cerr << tagInfo().name << " , last object valid since " << tagInfo().lastInterval.since << std::endl;
unsigned int snc;
std::cout << "Source implementation test ::getNewObjects : enter since ? \n";
std::cin >> snc;
std::cout << "getNewObjects : enter till ? \n";
m_to_transfer.push_back(std::make_pair(cnchipspeed, snc));
std::cout << "------- " << m_name << "CSC src - > getNewObjects -----------\n" << std::endl;
std::cout << "CSCChipSpeedCorrectionHandler - time before writing into DB:" << std::endl;
}
|