1 #ifndef SISTRIPDETVOFF_SRC_BUILDER_H
2 #define SISTRIPDETVOFF_SRC_BUILDER_H
3 #define USING_NEW_CORAL
20 #include "CoralBase/TimeStamp.h"
37 class TestSiStripDetVOffBuilder;
51 std::vector< std::pair<SiStripDetVOff*,cond::Time_t> >
getModulesVOff(
const int deltaTmin = 1,
const int maxIOVlength = 120) {
62 void reduce( std::vector< std::pair<SiStripDetVOff*,cond::Time_t> >::iterator & it,
63 std::vector< std::pair<SiStripDetVOff*,cond::Time_t> >::iterator & initialIt,
64 std::vector< std::pair<SiStripDetVOff*,cond::Time_t> > & resultVec,
65 const bool last =
false);
67 void reduction(
const uint32_t deltaTmin,
const uint32_t maxIOVlength);
70 void discardIOVs( std::vector< std::pair<SiStripDetVOff*,cond::Time_t> >::iterator & it,
71 std::vector< std::pair<SiStripDetVOff*,cond::Time_t> >::iterator & initialIt,
72 std::vector< std::pair<SiStripDetVOff*,cond::Time_t> > & resultVec,
73 const bool last,
const unsigned int first );
83 void printPar(std::stringstream&
ss,
const std::vector<int>& par);
90 const coral::TimeStamp& changeDate,
91 const std::vector<uint32_t>& settingID,
92 const std::vector<coral::TimeStamp>& settingDate);
96 const coral::TimeStamp& changeDate,
97 const std::vector<std::string>& settingDpname,
98 const std::vector<coral::TimeStamp>& settingDate);
102 std::vector<float> &vmonValues,
103 std::vector<coral::TimeStamp> &dateChange);
118 std::vector< std::pair<SiStripDetVOff*,cond::Time_t> >
modulesOff;
160 std::vector<unsigned int>
isHV;
169 void setPayloadStats(
const uint32_t afterV,
const uint32_t numAdded,
const uint32_t numRemoved);
SiStripDetVOffBuilder(const edm::ParameterSet &, const edm::ActivityRegistry &)
std::string lastValueFileName
std::vector< int > actualStatus
std::string authenticationPath
std::vector< std::pair< std::vector< uint32_t >, coral::TimeStamp > > DetIdTimeStampVector
Builds the SiStripDetVOff object for transfer by O2O.
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.
std::pair< int, int > extractDetIdVector(const unsigned int i, SiStripDetVOff *modV, DetIdListTimeAndStatus &detIdStruct)
void printPar(std::stringstream &ss, const std::vector< int > &par)
std::vector< std::pair< SiStripDetVOff *, cond::Time_t > > getModulesVOff(const int deltaTmin=1, const int maxIOVlength=120)
void buildPSUdetIdMap(TimesAndValues &tStruct, DetIdListTimeAndStatus &dStruct)
std::string psuDetIdMapFile_
friend class TestSiStripDetVOffBuilder
DetIdTimeStampVector detidV
double highVoltageOnThreshold_
std::string detIdListFile_
std::auto_ptr< SiStripCoralIface > coralInterface
int findSetting(uint32_t id, const coral::TimeStamp &changeDate, const std::vector< uint32_t > &settingID, const std::vector< coral::TimeStamp > &settingDate)
void removeDuplicates(std::vector< uint32_t > &vec)
std::vector< std::string > dpname
bool FileExists(std::string filename)
std::vector< int > tDefault
unsigned long long Time_t
std::vector< uint32_t > dpid
std::string excludedDetIdListFile_
cond::Time_t getCondTime(const coral::TimeStamp &coralTime)
std::vector< bool > StatusGood
std::vector< coral::TimeStamp > changeDate
std::vector< unsigned int > isHV
void reduction(const uint32_t deltaTmin, const uint32_t maxIOVlength)
void lastValue(TimesAndValues &tStruct)
void readLastValueFromFile(std::vector< uint32_t > &dpIDs, std::vector< float > &vmonValues, std::vector< coral::TimeStamp > &dateChange)
cond::Time_t findMostRecentTimeStamp(const std::vector< coral::TimeStamp > &coralDate)
void lastValueFromFile(TimesAndValues &tStruct)
std::vector< int > tmax_par
coral::TimeStamp getCoralTime(cond::Time_t iovTime)
std::vector< std::vector< uint32_t > > getPayloadStats()
void setLastSiStripDetVOff(SiStripDetVOff *lastPayload, cond::Time_t lastTimeStamp)
std::vector< int > tmin_par
std::vector< std::vector< uint32_t > > payloadStats
void setPayloadStats(const uint32_t afterV, const uint32_t numAdded, const uint32_t numRemoved)
std::vector< float > actualValue
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.
std::vector< std::string > psuName
std::vector< std::pair< SiStripDetVOff *, cond::Time_t > > modulesOff
void statusChange(cond::Time_t &lastTime, TimesAndValues &tStruct)
std::pair< SiStripDetVOff *, cond::Time_t > lastStoredCondObj
std::string timeToStream(const coral::TimeStamp &coralTime, const string &comment="")
std::vector< int > tset_par
std::string onlineDbConnectionString