Builds the SiStripDetVOff object for transfer by O2O. More...
#include <SiStripDetVOffBuilder.h>
Classes | |
struct | DetIdListTimeAndStatus |
struct | TimesAndValues |
Public Member Functions | |
void | BuildDetVOffObj () |
void | discardIOVs (std::vector< std::pair< SiStripDetVOff *, cond::Time_t > >::iterator &it, std::vector< std::pair< SiStripDetVOff *, cond::Time_t > >::iterator &initialIt, std::vector< std::pair< SiStripDetVOff *, cond::Time_t > > &resultVec, const bool last, const unsigned int first) |
Removes IOVs as dictated by reduction. More... | |
bool | FileExists (std::string filename) |
std::vector< std::pair< SiStripDetVOff *, cond::Time_t > > | getModulesVOff () |
std::vector< std::vector< uint32_t > > | getPayloadStats () |
void | reduce (std::vector< std::pair< SiStripDetVOff *, cond::Time_t > >::iterator &it, std::vector< std::pair< SiStripDetVOff *, cond::Time_t > >::iterator &initialIt, std::vector< std::pair< SiStripDetVOff *, cond::Time_t > > &resultVec, const bool last=false) |
Operates the reduction of the fast sequences of ramping up and down of the voltages. More... | |
void | reduction (const uint32_t deltaTmin, const uint32_t maxIOVlength) |
void | setLastSiStripDetVOff (SiStripDetVOff *lastPayload, cond::Time_t lastTimeStamp) |
SiStripDetVOffBuilder (const edm::ParameterSet &, const edm::ActivityRegistry &) | |
~SiStripDetVOffBuilder () | |
Private Types | |
typedef std::vector< std::pair< std::vector< uint32_t >, coral::TimeStamp > > | DetIdTimeStampVector |
Private Member Functions | |
void | buildPSUdetIdMap (TimesAndValues &tStruct, DetIdListTimeAndStatus &dStruct) |
std::pair< int, int > | extractDetIdVector (const unsigned int i, SiStripDetVOff *modV, DetIdListTimeAndStatus &detIdStruct) |
cond::Time_t | findMostRecentTimeStamp (const std::vector< coral::TimeStamp > &coralDate) |
int | findSetting (uint32_t id, const coral::TimeStamp &changeDate, const std::vector< uint32_t > &settingID, const std::vector< coral::TimeStamp > &settingDate) |
int | findSetting (std::string dpname, const coral::TimeStamp &changeDate, const std::vector< std::string > &settingDpname, const std::vector< coral::TimeStamp > &settingDate) |
cond::Time_t | getCondTime (const coral::TimeStamp &coralTime) |
coral::TimeStamp | getCoralTime (cond::Time_t iovTime) |
void | lastValue (TimesAndValues &tStruct) |
void | lastValueFromFile (TimesAndValues &tStruct) |
void | printPar (std::stringstream &ss, const std::vector< int > &par) |
void | readLastValueFromFile (std::vector< uint32_t > &dpIDs, std::vector< float > &vmonValues, std::vector< coral::TimeStamp > &dateChange) |
void | removeDuplicates (std::vector< uint32_t > &vec) |
void | setPayloadStats (const uint32_t afterV, const uint32_t numAdded, const uint32_t numRemoved) |
void | statusChange (cond::Time_t &lastTime, TimesAndValues &tStruct) |
std::string | timeToStream (const coral::TimeStamp &coralTime, const string &comment="") |
std::string | timeToStream (const cond::Time_t &condTime, const string &comment="") |
Private Attributes | |
std::string | authenticationPath |
std::unique_ptr< SiStripCoralIface > | coralInterface |
bool | debug_ |
uint32_t | deltaTmin_ |
std::string | detIdListFile_ |
std::string | excludedDetIdListFile_ |
bool | fromFile |
double | highVoltageOnThreshold_ |
std::pair< SiStripDetVOff *, cond::Time_t > | lastStoredCondObj |
std::string | lastValueFileName |
uint32_t | maxIOVlength_ |
std::vector< std::pair< SiStripDetVOff *, cond::Time_t > > | modulesOff |
std::string | onlineDbConnectionString |
std::vector< std::vector< uint32_t > > | payloadStats |
std::string | psuDetIdMapFile_ |
std::vector< int > | tDefault |
coral::TimeStamp | tmax |
std::vector< int > | tmax_par |
coral::TimeStamp | tmin |
std::vector< int > | tmin_par |
std::vector< int > | tset_par |
coral::TimeStamp | tsetmin |
bool | whichQuery |
std::string | whichTable |
Friends | |
class | TestSiStripDetVOffBuilder |
Builds the SiStripDetVOff object for transfer by O2O.
Definition at line 35 of file SiStripDetVOffBuilder.h.
|
private |
Definition at line 74 of file SiStripDetVOffBuilder.h.
SiStripDetVOffBuilder::~SiStripDetVOffBuilder | ( | ) |
Destructor.
Definition at line 89 of file SiStripDetVOffBuilder.cc.
SiStripDetVOffBuilder::SiStripDetVOffBuilder | ( | const edm::ParameterSet & | pset, |
const edm::ActivityRegistry & | |||
) |
Default constructor.
Definition at line 8 of file SiStripDetVOffBuilder.cc.
References authenticationPath, fromFile, lastStoredCondObj, lastValueFileName, onlineDbConnectionString, printPar(), psuDetIdMapFile_, contentValuesCheck::ss, tmax, tmax_par, tmin, tmin_par, tset_par, tsetmin, whichQuery, and whichTable.
void SiStripDetVOffBuilder::BuildDetVOffObj | ( | ) |
Build the SiStripDetVOff object for transfer.
Definition at line 99 of file SiStripDetVOffBuilder.cc.
References authenticationPath, buildPSUdetIdMap(), coralInterface, gather_cfg::cout, debug_, detIdListFile_, SiStripDetVOffBuilder::DetIdListTimeAndStatus::detidV, excludedDetIdListFile_, extractDetIdVector(), dqmdumpme::first, fromFile, getCondTime(), SiStripDetVOff::getDetIds(), mps_fire::i, dqmiolumiharvest::j, lastStoredCondObj, lastValue(), lastValueFromFile(), SiStripDetVOffBuilder::TimesAndValues::latestTime, genParticles_cff::map, modulesOff, onlineDbConnectionString, payloadStats, SiStripDetVOff::put(), SiStripDetInfoFileReader::read(), setPayloadStats(), statusChange(), tmax, whichQuery, and whichTable.
Referenced by SiStripDetVOffHandler::analyze().
|
private |
Definition at line 760 of file SiStripDetVOffBuilder.cc.
References SiStripDetVOffBuilder::TimesAndValues::actualStatus, SiStripPsuDetIdMap::BuildMap(), SiStripDetVOffBuilder::TimesAndValues::changeDate, gather_cfg::cout, debug_, SiStripDetVOffBuilder::DetIdListTimeAndStatus::detidV, Calorimetry_cff::dp, SiStripDetVOffBuilder::TimesAndValues::dpname, relativeConstraints::empty, beamvalidation::exit(), FileExists(), spr::find(), SiStripPsuDetIdMap::getHVCrosstalkingMap(), SiStripPsuDetIdMap::getHvDetID(), SiStripPsuDetIdMap::getHVUnmappedMap(), SiStripPsuDetIdMap::getLvDetID(), SiStripDetVOffBuilder::DetIdListTimeAndStatus::isHV, mps_splice::line, LogTrace, genParticles_cff::map, SiStripDetVOffBuilder::DetIdListTimeAndStatus::notMatched, SiStripPsuDetIdMap::printMap(), psuDetIdMapFile_, SiStripDetVOffBuilder::DetIdListTimeAndStatus::psuName, removeDuplicates(), contentValuesCheck::ss, SiStripDetVOffBuilder::DetIdListTimeAndStatus::StatusGood, AlCaHLTBitMon_QueryRunRegistry::string, submitPVValidationJobs::t, and timeToStream().
Referenced by BuildDetVOffObj().
void SiStripDetVOffBuilder::discardIOVs | ( | std::vector< std::pair< SiStripDetVOff *, cond::Time_t > >::iterator & | it, |
std::vector< std::pair< SiStripDetVOff *, cond::Time_t > >::iterator & | initialIt, | ||
std::vector< std::pair< SiStripDetVOff *, cond::Time_t > > & | resultVec, | ||
const bool | last, | ||
const unsigned int | first | ||
) |
Removes IOVs as dictated by reduction.
Definition at line 562 of file SiStripDetVOffBuilder.cc.
References gather_cfg::cout, debug_, dqmdumpme::first, and dqmdumpme::last.
Referenced by reduce().
|
private |
Definition at line 1270 of file SiStripDetVOffBuilder.cc.
References gather_cfg::cout, debug_, mps_fire::i, SiStripDetVOffBuilder::DetIdListTimeAndStatus::isHV, dqmiolumiharvest::j, psuDetIdMapFile_, SiStripDetVOffBuilder::DetIdListTimeAndStatus::psuName, SiStripDetVOffBuilder::DetIdListTimeAndStatus::StatusGood, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by BuildDetVOffObj().
bool SiStripDetVOffBuilder::FileExists | ( | std::string | filename | ) |
Definition at line 745 of file SiStripDetVOffBuilder.cc.
References tkal_create_file_lists::FileInfo, mysort::FileName, and edm_modernize_messagelogger::stat.
Referenced by buildPSUdetIdMap().
|
private |
Definition at line 505 of file SiStripDetVOffBuilder.cc.
References gather_cfg::cout, debug_, getCondTime(), and mps_fire::i.
Referenced by lastValue(), and lastValueFromFile().
|
private |
Returns the PSU channel setting, based on date. Works from DP ID.
Definition at line 322 of file SiStripDetVOffBuilder.cc.
References mps_fire::i, createfilelist::int, dqmiolumiharvest::j, and protons_cff::time.
Referenced by lastValue(), and lastValueFromFile().
|
private |
Returns the PSU channel setting, based on date. Works from PSU channel name. Overloaded.
Definition at line 360 of file SiStripDetVOffBuilder.cc.
References mps_fire::i, createfilelist::int, dqmiolumiharvest::j, and protons_cff::time.
|
private |
Utility code to convert a coral timestamp to the correct time format for O2O timestamp.
Definition at line 465 of file SiStripDetVOffBuilder.cc.
References cond::time::from_boost().
Referenced by BuildDetVOffObj(), findMostRecentTimeStamp(), and getCoralTime().
|
private |
Utility code to convert an O2O timestamp into a coral timestamp.
Definition at line 475 of file SiStripDetVOffBuilder.cc.
References gather_cfg::cout, debug_, getCondTime(), and cond::time::to_boost().
Referenced by statusChange().
|
inline |
Return modules Off vector of objects.
Definition at line 46 of file SiStripDetVOffBuilder.h.
References deltaTmin_, maxIOVlength_, modulesOff, and reduction().
Referenced by SiStripDetVOffHandler::analyze().
|
inline |
Return statistics about payloads transferred for storage in logDB.
Definition at line 51 of file SiStripDetVOffBuilder.h.
References payloadStats.
|
private |
Definition at line 649 of file SiStripDetVOffBuilder.cc.
References SiStripDetVOffBuilder::TimesAndValues::actualStatus, SiStripDetVOffBuilder::TimesAndValues::actualValue, SiStripDetVOffBuilder::TimesAndValues::changeDate, coralInterface, SiStripDetVOffBuilder::TimesAndValues::dpname, findMostRecentTimeStamp(), findSetting(), highVoltageOnThreshold_, dqmiolumiharvest::j, SiStripDetVOffBuilder::TimesAndValues::latestTime, LogDebug, combine::missing, contentValuesCheck::ss, tmax, tmin, tsetmin, and whichTable.
Referenced by BuildDetVOffObj().
|
private |
Definition at line 689 of file SiStripDetVOffBuilder.cc.
References SiStripDetVOffBuilder::TimesAndValues::actualStatus, SiStripDetVOffBuilder::TimesAndValues::actualValue, SiStripDetVOffBuilder::TimesAndValues::changeDate, coralInterface, SiStripDetVOffBuilder::TimesAndValues::dpid, SiStripDetVOffBuilder::TimesAndValues::dpname, findMostRecentTimeStamp(), findSetting(), highVoltageOnThreshold_, dqmiolumiharvest::j, SiStripDetVOffBuilder::TimesAndValues::latestTime, LogDebug, combine::missing, readLastValueFromFile(), contentValuesCheck::ss, tmax, and tsetmin.
Referenced by BuildDetVOffObj().
|
private |
Definition at line 93 of file SiStripDetVOffBuilder.cc.
References contentValuesCheck::ss, and heppy_batch::val.
Referenced by SiStripDetVOffBuilder().
|
private |
Extract the lastValue values from file rather than from the PVSS cond DB.
Definition at line 398 of file SiStripDetVOffBuilder.cc.
References util.getRunInfo::day(), mps_fire::i, lastValueFileName, mps_splice::line, edm::second(), contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, and HLT_2022v15_cff::year.
Referenced by lastValueFromFile().
void SiStripDetVOffBuilder::reduce | ( | std::vector< std::pair< SiStripDetVOff *, cond::Time_t > >::iterator & | it, |
std::vector< std::pair< SiStripDetVOff *, cond::Time_t > >::iterator & | initialIt, | ||
std::vector< std::pair< SiStripDetVOff *, cond::Time_t > > & | resultVec, | ||
const bool | last = false |
||
) |
Operates the reduction of the fast sequences of ramping up and down of the voltages.
Definition at line 524 of file SiStripDetVOffBuilder.cc.
References gather_cfg::cout, debug_, discardIOVs(), HLT_2022v15_cff::distance, dqmdumpme::first, dqmdumpme::last, and edm::second().
Referenced by reduction().
void SiStripDetVOffBuilder::reduction | ( | const uint32_t | deltaTmin, |
const uint32_t | maxIOVlength | ||
) |
Definition at line 586 of file SiStripDetVOffBuilder.cc.
References submitPVResolutionJobs::count, modulesOff, reduce(), and edm::second().
Referenced by getModulesVOff().
|
private |
Utility code to remove all the duplicates from a vector of uint32_t.
Definition at line 494 of file SiStripDetVOffBuilder.cc.
References jetUpdater_cfi::sort, and tier0::unique().
Referenced by buildPSUdetIdMap().
void SiStripDetVOffBuilder::setLastSiStripDetVOff | ( | SiStripDetVOff * | lastPayload, |
cond::Time_t | lastTimeStamp | ||
) |
Store the last payload transferred to DB as starting point for creation of new object list. ONLY WORKS FOR STATUSCHANGE OPTION.
Definition at line 500 of file SiStripDetVOffBuilder.cc.
References lastStoredCondObj.
Referenced by SiStripDetVOffHandler::analyze().
|
private |
Definition at line 1262 of file SiStripDetVOffBuilder.cc.
References payloadStats.
Referenced by BuildDetVOffObj().
|
private |
Definition at line 627 of file SiStripDetVOffBuilder.cc.
References SiStripDetVOffBuilder::TimesAndValues::actualStatus, SiStripDetVOffBuilder::TimesAndValues::actualValue, SiStripDetVOffBuilder::TimesAndValues::changeDate, coralInterface, SiStripDetVOffBuilder::TimesAndValues::dpname, getCoralTime(), tmax, tmin, heppy_batch::val, and whichTable.
Referenced by BuildDetVOffObj().
|
private |
Definition at line 738 of file SiStripDetVOffBuilder.cc.
References contentValuesCheck::ss.
Referenced by buildPSUdetIdMap().
|
private |
|
friend |
Definition at line 36 of file SiStripDetVOffBuilder.h.
|
private |
Definition at line 118 of file SiStripDetVOffBuilder.h.
Referenced by BuildDetVOffObj(), and SiStripDetVOffBuilder().
|
private |
Definition at line 164 of file SiStripDetVOffBuilder.h.
Referenced by BuildDetVOffObj(), lastValue(), lastValueFromFile(), and statusChange().
|
private |
Definition at line 123 of file SiStripDetVOffBuilder.h.
Referenced by BuildDetVOffObj(), buildPSUdetIdMap(), discardIOVs(), extractDetIdVector(), findMostRecentTimeStamp(), getCoralTime(), and reduce().
|
private |
Definition at line 126 of file SiStripDetVOffBuilder.h.
Referenced by getModulesVOff().
|
private |
Definition at line 128 of file SiStripDetVOffBuilder.h.
Referenced by BuildDetVOffObj().
|
private |
Definition at line 129 of file SiStripDetVOffBuilder.h.
Referenced by BuildDetVOffObj().
|
private |
Definition at line 121 of file SiStripDetVOffBuilder.h.
Referenced by BuildDetVOffObj(), and SiStripDetVOffBuilder().
|
private |
Definition at line 131 of file SiStripDetVOffBuilder.h.
Referenced by lastValue(), and lastValueFromFile().
|
private |
Definition at line 114 of file SiStripDetVOffBuilder.h.
Referenced by BuildDetVOffObj(), setLastSiStripDetVOff(), and SiStripDetVOffBuilder().
|
private |
Definition at line 120 of file SiStripDetVOffBuilder.h.
Referenced by readLastValueFromFile(), and SiStripDetVOffBuilder().
|
private |
Definition at line 126 of file SiStripDetVOffBuilder.h.
Referenced by getModulesVOff().
|
private |
Definition at line 113 of file SiStripDetVOffBuilder.h.
Referenced by BuildDetVOffObj(), getModulesVOff(), and reduction().
|
private |
Definition at line 117 of file SiStripDetVOffBuilder.h.
Referenced by BuildDetVOffObj(), and SiStripDetVOffBuilder().
|
private |
Definition at line 112 of file SiStripDetVOffBuilder.h.
Referenced by BuildDetVOffObj(), getPayloadStats(), and setPayloadStats().
|
private |
Definition at line 122 of file SiStripDetVOffBuilder.h.
Referenced by buildPSUdetIdMap(), extractDetIdVector(), and SiStripDetVOffBuilder().
|
private |
Definition at line 125 of file SiStripDetVOffBuilder.h.
|
private |
Definition at line 124 of file SiStripDetVOffBuilder.h.
Referenced by BuildDetVOffObj(), lastValue(), lastValueFromFile(), SiStripDetVOffBuilder(), and statusChange().
|
private |
Definition at line 125 of file SiStripDetVOffBuilder.h.
Referenced by SiStripDetVOffBuilder().
|
private |
Definition at line 124 of file SiStripDetVOffBuilder.h.
Referenced by lastValue(), SiStripDetVOffBuilder(), and statusChange().
|
private |
Definition at line 125 of file SiStripDetVOffBuilder.h.
Referenced by SiStripDetVOffBuilder().
|
private |
Definition at line 125 of file SiStripDetVOffBuilder.h.
Referenced by SiStripDetVOffBuilder().
|
private |
Definition at line 124 of file SiStripDetVOffBuilder.h.
Referenced by lastValue(), lastValueFromFile(), and SiStripDetVOffBuilder().
|
private |
Definition at line 76 of file SiStripDetVOffBuilder.h.
Referenced by BuildDetVOffObj(), and SiStripDetVOffBuilder().
|
private |
Definition at line 119 of file SiStripDetVOffBuilder.h.
Referenced by BuildDetVOffObj(), lastValue(), SiStripDetVOffBuilder(), and statusChange().