442 const float med = evt.
Get<
float>(416*4+4+4);
443 const float dev = evt.
Get<
float>(416*4+4+4+4);
444 const float *cur = evt.
Ptr<
float>();
449 fCurrentsVec.emplace_back(time, vector<float>(cur, cur+320));
482 rms += it->second*it->second;
487 rms = rms<0 ? 0 : sqrt(rms);
491 avg_dev += it->second;
497 vector<double> vec(160);
499 for (
int i=0;
i<320;
i++)
503 vec[hv.
hw()/9] += it->second[
i]*hv.
count();
518 for (
int i=0;
i<160;
i++)
524 if (vec[
i]>avg+3.5*avg_dev)
544 out << setprecision(3);
545 out <<
"Measured average current " << avg <<
"uA +- " << rms <<
"uA [N=" <<
fCurrentsMed.size() <<
"]... minimum threshold set to " <<
fThresholdMin;
547 Info(
"Set "+to_string(counter)+
" individual thresholds.");
list< pair< Time, float > > fCurrentsDev
int GetCurrentState() const
return the current state of the machine
void setQuality(int quality)
list< pair< Time, float > > fCurrentsMed
Adds some functionality to boost::posix_time::ptime for our needs.
const int32_t & state() const
uint16_t fThresholdReference
Time fCalibrationTimeStart
virtual Time GetTime() const
DimDescribedState fDimDrive
list< pair< Time, vector< float > > > fCurrentsVec
void SendCommandNB(const std::string &command)
Warning because the service this data corrsponds to might have been last updated longer ago than Local time
DimDescribedService fDimThreshold
DimDescribedState fDimLid
Return to feeserver c CVS log Up to[MAIN] dcscvs FeeServer feeserver src Wed FeeServer_v0 v0 dev
int Info(const std::string &str)
T Get(size_t offset=0) const
const T * Ptr(size_t offset=0) const
vector< uint32_t > fThresholds
bool CheckEventSize(const EventImp &evt, size_t size)
const PixelMapEntry & hv(int board, int channel) const