|
using | EventSetupRecordKey = eventsetup::EventSetupRecordKey |
|
using | KeyedResolversVector = std::vector< std::pair< DataKey, std::shared_ptr< ESProductResolver > >> |
|
ESConsumesInfo * | consumesInfoPushBackNew () |
|
unsigned int | consumesInfoSize () const |
|
template<typename CallbackT , typename TList , typename TRecord > |
void | registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const TList *, const TRecord *iRecord, const es::Label &iLabel) |
|
template<typename CallbackT , typename TRecord > |
void | registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>>, const eventsetup::produce::Null *, const TRecord *, const es::Label &) |
|
template<typename T > |
auto | setWhatProduced (T *iThis, const es::Label &iLabel={}) |
|
template<typename T > |
auto | setWhatProduced (T *iThis, const char *iLabel) |
|
template<typename T > |
auto | setWhatProduced (T *iThis, const std::string &iLabel) |
|
template<typename T , typename TDecorator > |
auto | setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={}) |
|
template<typename T , typename TReturn , typename TRecord > |
auto | setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={}) |
|
template<typename T , typename TReturn , typename TRecord , typename TDecorator > |
auto | setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TDecorator &iDec, const es::Label &iLabel={}) |
|
template<typename TFunc > |
auto | setWhatProduced (TFunc &&func, const es::Label &iLabel={}) |
|
template<typename TReturn , typename TRecord , typename TFunc , typename TDecorator > |
ESConsumesCollectorT< TRecord > | setWhatProduced (TFunc &&func, TDecorator &&iDec, const es::Label &iLabel={}) |
|
void | usesResources (std::vector< std::string > const &) |
|
template<class TFactory > |
void | registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string()) |
|
virtual void | registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ESProductResolverFactoryBase > iFactory, const std::string &iLabel=std::string()) |
|
KeyedResolversVector | registerResolvers (const EventSetupRecordKey &, unsigned int iovIndex) override |
|
template<class T > |
void | usingRecord () |
|
void | usingRecordWithKey (const EventSetupRecordKey &key) |
|
template<class T > |
void | findingRecord () |
|
void | findingRecordWithKey (const eventsetup::EventSetupRecordKey &) |
|
Definition at line 20 of file CSCGainsDBConditions.h.
CSCDBGains * CSCGainsDBConditions::prefillDBGains |
( |
| ) |
|
|
inlinestatic |
Definition at line 44 of file CSCGainsDBConditions.h.
References DMR_cfg::cerr, counter, gather_cfg::cout, beamvalidation::exit(), CSCDBGains::factor_gain, CSCDBGains::gains, mps_fire::i, recoMuon::in, createfilelist::int, dqmdumpme::k, and pixelgpudetails::MAX_SIZE.
Referenced by produceDBGains().
47 const int FACTOR = 1000;
48 const int MAX_SHORT = 32767;
53 std::vector<int> db_index_id;
54 std::vector<float> db_slope;
55 std::vector<float> db_intercept;
56 std::vector<float> db_chi2;
58 float new_gainslope, new_intercpt, new_chisq;
59 std::vector<int> new_cham_id;
60 std::vector<int> new_index_id;
61 std::vector<int> new_strips;
62 std::vector<float> new_slope;
63 std::vector<float> new_intercept;
64 std::vector<float> new_chi2;
71 std::cerr <<
"Error: old_dbgains.dat -> no such file!" << std::endl;
75 while (!dbdata.eof()) {
76 dbdata >> db_index >> db_gainslope;
77 db_index_id.push_back(db_index);
78 db_slope.push_back(db_gainslope);
84 std::ifstream newdata;
87 std::cerr <<
"Error: gains.dat -> no such file!" << std::endl;
91 while (!newdata.eof()) {
92 newdata >> new_index >> new_gainslope >> new_intercpt >> new_chisq;
93 new_index_id.push_back(new_index);
94 new_slope.push_back(new_gainslope);
95 new_intercept.push_back(new_intercpt);
96 new_chi2.push_back(new_chisq);
106 itemvector[
i].gain_slope =
int(db_slope[
i] * FACTOR + 0.5);
111 itemvector[
i] = itemvector[
counter];
112 itemvector[
i].gain_slope =
int(db_slope[
i]);
114 for (
unsigned int k = 0;
k < new_index_id.size() - 1;
k++) {
116 if ((
short int)(fabs(new_slope[
k] * FACTOR + 0.5)) < MAX_SHORT)
117 itemvector[
counter].gain_slope =
int(new_slope[
k] * FACTOR + 0.5);
118 itemvector[
i] = itemvector[
counter];
123 itemvector[
i] = itemvector[
counter];
std::vector< Item > GainContainer
static std::atomic< unsigned int > counter
constexpr unsigned int MAX_SIZE