|
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 CSCPedestalsDBConditions.h.
Definition at line 48 of file CSCPedestalsDBConditions.h.
References DMR_cfg::cerr, counter, beamvalidation::exit(), CSCDBPedestals::factor_ped, CSCDBPedestals::factor_rms, mps_fire::i, recoMuon::in, createfilelist::int, dqmdumpme::k, pixelgpudetails::MAX_SIZE, and CSCDBPedestals::pedestals.
Referenced by produceDBPedestals().
49 const int PED_FACTOR = 10;
50 const int RMS_FACTOR = 1000;
53 const int MAX_SHORT = 32767;
58 std::vector<int> db_index_id;
59 std::vector<float> db_peds;
60 std::vector<float> db_pedrms;
62 float new_ped, new_rms;
63 std::vector<int> new_index_id;
64 std::vector<float> new_peds;
65 std::vector<float> new_pedrms;
72 std::cerr <<
"Error: old_dbpeds.dat -> no such file!" << std::endl;
76 while (!dbdata.eof()) {
77 dbdata >> db_index >> db_ped >> db_rms;
78 db_index_id.push_back(db_index);
79 db_peds.push_back(db_ped);
80 db_pedrms.push_back(db_rms);
84 std::ifstream newdata;
87 std::cerr <<
"Error: peds.dat -> no such file!" << std::endl;
91 while (!newdata.eof()) {
92 newdata >> new_index >> new_ped >> new_rms;
93 new_index_id.push_back(new_index);
94 new_peds.push_back(new_ped);
95 new_pedrms.push_back(new_rms);
105 itemvector[
i].ped = (
short int)(db_peds[
i] * PED_FACTOR + 0.5);
106 itemvector[
i].rms = (
short int)(db_pedrms[
i] * RMS_FACTOR + 0.5);
111 itemvector[
i] = itemvector[
counter];
112 itemvector[
i].ped =
int(db_peds[
i]);
113 itemvector[
i].rms =
int(db_pedrms[
i]);
115 for (
unsigned int k = 0;
k < new_index_id.size() - 1;
k++) {
117 if ((
short int)(fabs(new_peds[
k] * PED_FACTOR + 0.5)) < MAX_SHORT)
118 itemvector[
counter].ped =
int(new_peds[
k] * PED_FACTOR + 0.5);
119 if ((
short int)(fabs(new_pedrms[
k] * RMS_FACTOR + 0.5)) < MAX_SHORT)
120 itemvector[
counter].rms =
int(new_pedrms[
k] * RMS_FACTOR + 0.5);
121 itemvector[
i] = itemvector[
counter];
130 itemvector[
i] = itemvector[
counter];
133 return cndbpedestals;
std::vector< Item > PedestalContainer
PedestalContainer pedestals
static std::atomic< unsigned int > counter
constexpr unsigned int MAX_SIZE