test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
jsoncollector::FastMonitor Class Reference

#include <FastMonitor.h>

Public Member Functions

void addFastPathDefinition (std::string const &defPathFast, std::string const defGroupFast, bool strict)
 
void commit (std::vector< unsigned int > *streamLumisPtr)
 
void discardCollected (unsigned int forLumi)
 
 FastMonitor (std::string const &defPath, std::string const defGroup, bool strictChecking, bool useSource=true, bool useDefinition=true)
 
 FastMonitor (DataPointDefinition *dpd, bool strictChecking, bool useSource=true, bool useDefinition=true)
 
std::string getCSVString (int sid=-1)
 
void getHostAndPID (std::string &sHPid)
 
JsonMonitorablegetMergedIntJForLumi (std::string const &name, unsigned int forLumi)
 
void outputCSV (std::string const &path, std::string const &csvString)
 
bool outputFullJSON (std::string const &path, unsigned int lumi)
 
bool outputFullJSONs (std::string const &pathstem, std::string const &ext, unsigned int lumi)
 
void registerFastGlobalMonitorable (JsonMonitorable *newMonitorable)
 
void registerGlobalMonitorable (JsonMonitorable *newMonitorable, bool NAifZeroUpdates, unsigned int *nBins=nullptr)
 
void registerStreamMonitorableUIntVec (std::string const &name, std::vector< unsigned int > *inputs, bool NAifZeroUpdates, unsigned int *nBins=nullptr)
 
void registerStreamMonitorableUIntVecAtomic (std::string const &name, std::vector< AtomicMonUInt * > *inputs, bool NAifZeroUpdates, unsigned int *nBins=nullptr)
 
void setDefPath (std::string const &dpath)
 
void setNStreams (unsigned int nStreams)
 
void snap (unsigned int ls)
 
void snapGlobal (unsigned int ls)
 
void snapStreamAtomic (unsigned int ls, unsigned int streamID)
 
virtual ~FastMonitor ()
 

Private Attributes

std::vector< DataPoint * > dataPoints_
 
std::vector< DataPoint * > dataPointsFastOnly_
 
std::string defPath_
 
std::string defPathFast_
 
bool deleteDef_ =false
 
bool deleteDefFast_ =false
 
DataPointDefinitiondpd_
 
DataPointDefinitiondpdFast_
 
std::map< std::string,
unsigned int > 
dpNameMap_
 
bool fastPathStrictChecking_
 
unsigned int fregDpCount_ = 0
 
bool haveFastPath_ =false
 
std::vector< unsigned int > jsonDpIndex_
 
std::vector< DataPoint * > jsonDpIndexFast_
 
unsigned int nStreams_
 
std::vector< DataPoint * > orphanedDps_
 
unsigned int recentSnaps_ = 0
 
unsigned int recentSnapsTimer_ = 0
 
unsigned int regDpCount_ = 0
 
std::string sourceInfo_
 
bool strictChecking_
 
std::unordered_set< std::string > uids_
 
bool useDefinition_
 
bool useSource_
 

Detailed Description

Definition at line 19 of file FastMonitor.h.

Constructor & Destructor Documentation

FastMonitor::FastMonitor ( std::string const &  defPath,
std::string const  defGroup,
bool  strictChecking,
bool  useSource = true,
bool  useDefinition = true 
)

Definition at line 23 of file FastMonitor.cc.

References defPath_, dpd_, jsoncollector::DataPointDefinition::getDataPointDefinitionFor(), getHostAndPID(), and sourceInfo_.

23  :
24  defPath_(defPath),strictChecking_(strictChecking),useSource_(useSource),useDefinition_(useDefinition),nStreams_(1),deleteDef_(true)
25 {
26  //get host and PID info
27  if (useSource)
29 
30  //load definition file
31  dpd_ = new DataPointDefinition();
33 
34 }
static bool getDataPointDefinitionFor(std::string &defFilePath, DataPointDefinition *dpd, const std::string *defaultGroup=nullptr)
DataPointDefinition * dpd_
Definition: FastMonitor.h:96
void getHostAndPID(std::string &sHPid)
Definition: FastMonitor.cc:295
FastMonitor::FastMonitor ( DataPointDefinition dpd,
bool  strictChecking,
bool  useSource = true,
bool  useDefinition = true 
)

Definition at line 37 of file FastMonitor.cc.

References getHostAndPID(), and sourceInfo_.

37  :
38  strictChecking_(strictChecking),useSource_(useSource),useDefinition_(useDefinition),nStreams_(1),dpd_(dpd)
39 {
40  //get host and PID info
41  if (useSource)
43 }
DataPointDefinition * dpd_
Definition: FastMonitor.h:96
void getHostAndPID(std::string &sHPid)
Definition: FastMonitor.cc:295
FastMonitor::~FastMonitor ( )
virtual

Definition at line 45 of file FastMonitor.cc.

References dataPoints_, deleteDef_, deleteDefFast_, reco::dp, dpd_, and dpdFast_.

46 {
47  for (auto dp: dataPoints_) delete dp;
48  if (deleteDef_) delete dpd_;
49  if (deleteDefFast_) delete dpdFast_;
50 }
DataPointDefinition * dpdFast_
Definition: FastMonitor.h:97
std::vector< DataPoint * > dataPoints_
Definition: FastMonitor.h:101
auto dp
Definition: deltaR.h:22
DataPointDefinition * dpd_
Definition: FastMonitor.h:96

Member Function Documentation

void FastMonitor::addFastPathDefinition ( std::string const &  defPathFast,
std::string const  defGroupFast,
bool  strict 
)

Definition at line 52 of file FastMonitor.cc.

References defPathFast_, deleteDefFast_, dpdFast_, fastPathStrictChecking_, jsoncollector::DataPointDefinition::getDataPointDefinitionFor(), and haveFastPath_.

53 {
54  haveFastPath_=true;
55  defPathFast_=defPathFast;
59  deleteDefFast_=true;
60 }
DataPointDefinition * dpdFast_
Definition: FastMonitor.h:97
static bool getDataPointDefinitionFor(std::string &defFilePath, DataPointDefinition *dpd, const std::string *defaultGroup=nullptr)
void FastMonitor::commit ( std::vector< unsigned int > *  streamLumisPtr)

Definition at line 110 of file FastMonitor.cc.

References assert(), dataPoints_, dataPointsFastOnly_, defPath_, defPathFast_, dpd_, dpdFast_, fastPathStrictChecking_, fregDpCount_, jsoncollector::DataPointDefinition::getNames(), jsoncollector::DataPointDefinition::getOperationFor(), haveFastPath_, i, j, jsonDpIndex_, jsonDpIndexFast_, regDpCount_, sourceInfo_, strictChecking_, and jsoncollector::DataPoint::trackDummy().

Referenced by RawEventFileWriterForBU::RawEventFileWriterForBU(), and evf::FastMonitoringThread::MonitorData::registerVariables().

111 {
112  std::vector<std::string> const& jsonNames= dpd_->getNames();
113  regDpCount_ = dataPoints_.size();
114  if (strictChecking_)
115  assert(jsonNames.size()==regDpCount_);
116 
117  std::map<unsigned int,bool> hasJson;
118  for (unsigned int i=0;i<jsonNames.size();i++)
119  {
120  bool notFoundVar=true;
121  for (unsigned int j=0;j<regDpCount_;j++) {
122  if (dataPoints_[j]->getName()==jsonNames[i])
123  {
124  dataPoints_[j]->setOperation(dpd_->getOperationFor(i));
125  jsonDpIndex_.push_back(j);
126  hasJson[j]=true;
127  notFoundVar=false;
128  break;
129  }
130  }
131  if (notFoundVar) {
133  //push dummy DP if not registered by the service so that we output required JSON/CSV
134  DataPoint *dummyDp = new DataPoint(sourceInfo_,defPath_);
135  dummyDp->trackDummy(jsonNames[i],true);
136  dataPoints_.push_back(dummyDp);
137  jsonDpIndex_.push_back(dataPoints_.size()-1);
138  }
139  }
140  for (unsigned int i=0;i<regDpCount_;i++) {
141  dataPoints_[i]->setStreamLumiPtr(streamLumisPtr);
142  }
143 
144  //fast path:
145  if (haveFastPath_) {
146  std::vector<std::string> const& fjsonNames = dpdFast_->getNames();
148  assert(!(fastPathStrictChecking_ && fjsonNames.size()==fregDpCount_));
149  std::map<unsigned int,bool> fhasJson;
150  for (unsigned int i=0;i<fjsonNames.size();i++)
151  {
152  bool notFoundVar=true;
153  for (unsigned int j=0;j<fregDpCount_;j++) {
154  if (dataPointsFastOnly_[j]->getName()==fjsonNames[i])
155  {
157  fhasJson[j]=true;
158  notFoundVar=false;
159  break;
160  }
161  }
162  if (notFoundVar)
163  {
164  //try to find variable among slow variables
165 
166  bool notFoundVarSlow=true;
167  for (unsigned int j=0;j<regDpCount_;j++) {
168  if (dataPoints_[j]->getName()==fjsonNames[i])
169  {
170  jsonDpIndexFast_.push_back(dataPoints_[j]);
171  //fhasJson[j]=true;
172  notFoundVarSlow=false;
173  break;
174  }
175  }
176 
177  assert(!(fastPathStrictChecking_ && !notFoundVarSlow));
178  //push dummy DP if not registered by the service so that we output required JSON/CSV
179  if (notFoundVarSlow) {
181  dummyDp->trackDummy(fjsonNames[i],true);
182  dataPointsFastOnly_.push_back(dummyDp);
183  jsonDpIndexFast_.push_back(dummyDp);
184  }
185  }
186  }
187  }
188 }
int i
Definition: DBlmapReader.cc:9
DataPointDefinition * dpdFast_
Definition: FastMonitor.h:97
OperationType getOperationFor(unsigned int index)
void trackDummy(std::string const &name, bool setNAifZeroUpdates)
Definition: DataPoint.h:82
assert(m_qm.get())
std::vector< DataPoint * > dataPointsFastOnly_
Definition: FastMonitor.h:102
std::vector< unsigned int > jsonDpIndex_
Definition: FastMonitor.h:103
std::vector< DataPoint * > dataPoints_
Definition: FastMonitor.h:101
int j
Definition: DBlmapReader.cc:9
std::vector< DataPoint * > jsonDpIndexFast_
Definition: FastMonitor.h:104
DataPointDefinition * dpd_
Definition: FastMonitor.h:96
std::vector< std::string > const & getNames()
void FastMonitor::discardCollected ( unsigned int  forLumi)

Definition at line 290 of file FastMonitor.cc.

References dataPoints_, and reco::dp.

Referenced by RawEventFileWriterForBU::endOfLS(), and RawEventFileWriterForBU::finishFileWrite().

291 {
292  for (auto dp: dataPoints_) dp->discardCollected(forLumi);
293 }
std::vector< DataPoint * > dataPoints_
Definition: FastMonitor.h:101
auto dp
Definition: deltaR.h:22
std::string FastMonitor::getCSVString ( int  sid = -1)

Definition at line 218 of file FastMonitor.cc.

References j, jsonDpIndexFast_, and contentValuesCheck::ss.

219 {
220  //output what was specified in JSON in the same order (including dummies)
221  unsigned int monSize = jsonDpIndexFast_.size();
222  std::stringstream ss;
223  if (monSize) {
224  for (unsigned int j=0; j< monSize;j++) {
225  ss << jsonDpIndexFast_[j]->fastOutCSV(sid);
226  if (j<monSize-1) ss << ",";
227  }
228  }
229  return ss.str();
230 }
int j
Definition: DBlmapReader.cc:9
std::vector< DataPoint * > jsonDpIndexFast_
Definition: FastMonitor.h:104
void FastMonitor::getHostAndPID ( std::string &  sHPid)

Definition at line 295 of file FastMonitor.cc.

References sysUtil::pid.

Referenced by FastMonitor().

296 {
297  std::stringstream hpid;
298  int pid = (int) getpid();
299  char hostname[128];
300  gethostname(hostname, sizeof hostname);
301  hpid << hostname << "_" << pid;
302  sHPid = hpid.str();
303 }
tuple pid
Definition: sysUtil.py:22
JsonMonitorable * FastMonitor::getMergedIntJForLumi ( std::string const &  name,
unsigned int  forLumi 
)

Definition at line 243 of file FastMonitor.cc.

References assert(), dataPoints_, and dpNameMap_.

244 {
245  auto it = dpNameMap_.find(name);
246  assert(it!=dpNameMap_.end());
247  return dataPoints_[it->second]->mergeAndRetrieveValue(forLumi);
248 }
assert(m_qm.get())
std::map< std::string, unsigned int > dpNameMap_
Definition: FastMonitor.h:106
std::vector< DataPoint * > dataPoints_
Definition: FastMonitor.h:101
void FastMonitor::outputCSV ( std::string const &  path,
std::string const &  csvString 
)

Definition at line 232 of file FastMonitor.cc.

References defPathFast_, GenerateHcalLaserBadRunList::out, download_sqlite_cfg::outputFile, and estimatePileup_makeJSON::trunc.

233 {
234  std::ofstream outputFile;
235  outputFile.open(path.c_str(), std::fstream::out | std::fstream::trunc);
236  outputFile << defPathFast_ << std::endl;
237  outputFile << csvString << std::endl;
238  outputFile.close();
239 }
bool FastMonitor::outputFullJSON ( std::string const &  path,
unsigned int  lumi 
)

Definition at line 273 of file FastMonitor.cc.

References dataPoints_, j, jsonDpIndex_, LogDebug, recentSnaps_, recentSnapsTimer_, mps_fire::result, AlCaHLTBitMon_QueryRunRegistry::string, Json::StyledWriter::write(), and jsoncollector::FileIO::writeStringToFile().

Referenced by RawEventFileWriterForBU::endOfLS(), RawEventFileWriterForBU::finishFileWrite(), RawEventFileWriterForBU::handler(), and RawEventFileWriterForBU::stop().

274 {
275  LogDebug("FastMonitor") << "SNAP updates -: " << recentSnaps_ << " (by timer: " << recentSnapsTimer_
276  << ") in lumisection ";
277 
278  recentSnaps_ = recentSnapsTimer_ = 0;
279  Json::Value serializeRoot;
280  for (unsigned int j=0; j< jsonDpIndex_.size();j++) {
281  dataPoints_[jsonDpIndex_[j]]->mergeAndSerialize(serializeRoot,lumi,j==0,-1);
282  }
283 
284  Json::StyledWriter writer;
285  std::string && result = writer.write(serializeRoot);
287  return true;
288 }
#define LogDebug(id)
tuple lumi
Definition: fjr2json.py:35
Represents a JSON value.
Definition: value.h:111
std::vector< unsigned int > jsonDpIndex_
Definition: FastMonitor.h:103
tuple result
Definition: mps_fire.py:83
std::vector< DataPoint * > dataPoints_
Definition: FastMonitor.h:101
int j
Definition: DBlmapReader.cc:9
static void writeStringToFile(std::string const &filename, std::string &content)
Definition: FileIO.cc:21
virtual std::string write(const Value &root)
Serialize a Value in JSON format.
unsigned int recentSnapsTimer_
Definition: FastMonitor.h:109
Writes a Value in JSON format in a human friendly way.
Definition: writer.h:65
bool FastMonitor::outputFullJSONs ( std::string const &  pathstem,
std::string const &  ext,
unsigned int  lumi 
)

Definition at line 250 of file FastMonitor.cc.

References dataPoints_, i, j, jsonDpIndex_, LogDebug, nStreams_, fed_dqm_sourceclient-live_cfg::path, recentSnaps_, recentSnapsTimer_, mps_fire::result, AlCaHLTBitMon_QueryRunRegistry::string, Json::StyledWriter::write(), and jsoncollector::FileIO::writeStringToFile().

251 {
252  LogDebug("FastMonitor") << "SNAP updates -: " << recentSnaps_ << " (by timer: " << recentSnapsTimer_
253  << ") in lumisection ";
254 
255  recentSnaps_ = recentSnapsTimer_ = 0;
256  for (unsigned int i=0;i<nStreams_;i++) {
257  Json::Value serializeRoot;
258  for (unsigned int j=0; j< jsonDpIndex_.size();j++) {
259  dataPoints_[jsonDpIndex_[j]]->mergeAndSerialize(serializeRoot,lumi,true,i);
260  }
261  //get extension
262  std::stringstream tidext;
263  tidext << "_tid" << i;
264  std::string path = pathstem + tidext.str() + ext;
265 
266  Json::StyledWriter writer;
267  std::string && result = writer.write(serializeRoot);
268  FileIO::writeStringToFile(path, result);
269  }
270  return true;
271 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
tuple lumi
Definition: fjr2json.py:35
Represents a JSON value.
Definition: value.h:111
std::vector< unsigned int > jsonDpIndex_
Definition: FastMonitor.h:103
tuple result
Definition: mps_fire.py:83
std::vector< DataPoint * > dataPoints_
Definition: FastMonitor.h:101
int j
Definition: DBlmapReader.cc:9
static void writeStringToFile(std::string const &filename, std::string &content)
Definition: FileIO.cc:21
virtual std::string write(const Value &root)
Serialize a Value in JSON format.
unsigned int recentSnapsTimer_
Definition: FastMonitor.h:109
Writes a Value in JSON format in a human friendly way.
Definition: writer.h:65
void FastMonitor::registerFastGlobalMonitorable ( JsonMonitorable newMonitorable)

Definition at line 76 of file FastMonitor.cc.

References dataPointsFastOnly_, defPathFast_, reco::dp, sourceInfo_, and jsoncollector::DataPoint::trackMonitorable().

Referenced by evf::FastMonitoringThread::MonitorData::registerVariables().

77 {
79  dp->trackMonitorable(newMonitorable,false);
80  dataPointsFastOnly_.push_back(dp);
81 }
std::vector< DataPoint * > dataPointsFastOnly_
Definition: FastMonitor.h:102
void trackMonitorable(JsonMonitorable *monitorable, bool NAifZeroUpdates)
Definition: DataPoint.cc:74
auto dp
Definition: deltaR.h:22
void FastMonitor::registerGlobalMonitorable ( JsonMonitorable newMonitorable,
bool  NAifZeroUpdates,
unsigned int *  nBins = nullptr 
)

Definition at line 63 of file FastMonitor.cc.

References assert(), dataPoints_, defPath_, reco::dp, dpNameMap_, jsoncollector::JsonMonitorable::getName(), edm::second(), jsoncollector::DataPoint::setNBins(), sourceInfo_, jsoncollector::DataPoint::trackMonitorable(), and uids_.

Referenced by RawEventFileWriterForBU::RawEventFileWriterForBU(), and evf::FastMonitoringThread::MonitorData::registerVariables().

64 {
66  dp->trackMonitorable(newMonitorable,NAifZeroUpdates);
67  dp->setNBins(nBins);
68  dataPoints_.push_back(dp);
69  dpNameMap_[newMonitorable->getName()]=dataPoints_.size()-1;
70 
71  //checks if the same name is registered twice
72  assert(uids_.insert(newMonitorable->getName()).second);
73 }
void setNBins(unsigned int *nBins)
Definition: DataPoint.h:114
virtual std::string & getName()
assert(m_qm.get())
std::map< std::string, unsigned int > dpNameMap_
Definition: FastMonitor.h:106
void trackMonitorable(JsonMonitorable *monitorable, bool NAifZeroUpdates)
Definition: DataPoint.cc:74
U second(std::pair< T, U > const &p)
std::vector< DataPoint * > dataPoints_
Definition: FastMonitor.h:101
std::unordered_set< std::string > uids_
Definition: FastMonitor.h:113
auto dp
Definition: deltaR.h:22
void FastMonitor::registerStreamMonitorableUIntVec ( std::string const &  name,
std::vector< unsigned int > *  inputs,
bool  NAifZeroUpdates,
unsigned int *  nBins = nullptr 
)

Definition at line 84 of file FastMonitor.cc.

References assert(), dataPoints_, defPath_, reco::dp, dpNameMap_, mergeVDriftHistosByStation::name, jsoncollector::DataPoint::setNBins(), sourceInfo_, jsoncollector::DataPoint::trackVectorUInt(), and uids_.

Referenced by evf::FastMonitoringThread::MonitorData::registerVariables().

85 {
87  dp->trackVectorUInt(name,inputs,NAifZeroUpdates);
88  dp->setNBins(nBins);
89  dataPoints_.push_back(dp);
90  dpNameMap_[name]=dataPoints_.size()-1;
91  assert (uids_.insert(name).second);
92 }
void setNBins(unsigned int *nBins)
Definition: DataPoint.h:114
void trackVectorUInt(std::string const &name, std::vector< unsigned int > *monvec, bool NAifZeroUpdates)
Definition: DataPoint.cc:86
assert(m_qm.get())
std::map< std::string, unsigned int > dpNameMap_
Definition: FastMonitor.h:106
std::vector< DataPoint * > dataPoints_
Definition: FastMonitor.h:101
std::unordered_set< std::string > uids_
Definition: FastMonitor.h:113
auto dp
Definition: deltaR.h:22
void FastMonitor::registerStreamMonitorableUIntVecAtomic ( std::string const &  name,
std::vector< AtomicMonUInt * > *  inputs,
bool  NAifZeroUpdates,
unsigned int *  nBins = nullptr 
)

Definition at line 96 of file FastMonitor.cc.

References assert(), dataPoints_, defPath_, reco::dp, dpNameMap_, mergeVDriftHistosByStation::name, jsoncollector::DataPoint::setNBins(), sourceInfo_, AlCaHLTBitMon_QueryRunRegistry::string, jsoncollector::DataPoint::trackVectorUIntAtomic(), uids_, and useDefinition_.

Referenced by evf::FastMonitoringThread::MonitorData::registerVariables().

97 {
98  std::string definitionToPass;
99  if (useDefinition_) definitionToPass=defPath_;
100  DataPoint *dp = new DataPoint(definitionToPass,sourceInfo_);
101  dp->trackVectorUIntAtomic(name,inputs,NAifZeroUpdates);
102  dp->setNBins(nBins);
103  dataPoints_.push_back(dp);
104  dpNameMap_[name]=dataPoints_.size()-1;
105  assert (uids_.insert(name).second);
106 }
void setNBins(unsigned int *nBins)
Definition: DataPoint.h:114
assert(m_qm.get())
std::map< std::string, unsigned int > dpNameMap_
Definition: FastMonitor.h:106
std::vector< DataPoint * > dataPoints_
Definition: FastMonitor.h:101
std::unordered_set< std::string > uids_
Definition: FastMonitor.h:113
void trackVectorUIntAtomic(std::string const &name, std::vector< AtomicMonUInt * > *monvec, bool NAifZeroUpdates)
Definition: DataPoint.cc:96
auto dp
Definition: deltaR.h:22
void jsoncollector::FastMonitor::setDefPath ( std::string const &  dpath)
inline

Definition at line 30 of file FastMonitor.h.

References dataPoints_, defPath_, and reco::dp.

Referenced by RawEventFileWriterForBU::writeJsds().

30 {defPath_=dpath;for (auto dp : dataPoints_) dp->updateDefinition(dpath);}
std::vector< DataPoint * > dataPoints_
Definition: FastMonitor.h:101
auto dp
Definition: deltaR.h:22
void jsoncollector::FastMonitor::setNStreams ( unsigned int  nStreams)
inline

Definition at line 32 of file FastMonitor.h.

References nStreams_.

32 {nStreams_=nStreams;}
void FastMonitor::snap ( unsigned int  ls)

Definition at line 191 of file FastMonitor.cc.

References dataPoints_, i, recentSnaps_, recentSnapsTimer_, and regDpCount_.

Referenced by RawEventFileWriterForBU::endOfLS(), RawEventFileWriterForBU::finishFileWrite(), RawEventFileWriterForBU::handler(), and RawEventFileWriterForBU::stop().

192 {
193  recentSnaps_++;
195  for (unsigned int i=0;i<regDpCount_;i++) {
196  dataPoints_[i]->snap(ls);
197  }
198 }
int i
Definition: DBlmapReader.cc:9
def ls
Definition: eostools.py:348
std::vector< DataPoint * > dataPoints_
Definition: FastMonitor.h:101
unsigned int recentSnapsTimer_
Definition: FastMonitor.h:109
void FastMonitor::snapGlobal ( unsigned int  ls)

Definition at line 201 of file FastMonitor.cc.

References dataPoints_, i, recentSnaps_, and regDpCount_.

202 {
203  recentSnaps_++;
204  for (unsigned int i=0;i<regDpCount_;i++) {
205  dataPoints_[i]->snapGlobal(ls);
206  }
207 }
int i
Definition: DBlmapReader.cc:9
def ls
Definition: eostools.py:348
std::vector< DataPoint * > dataPoints_
Definition: FastMonitor.h:101
void FastMonitor::snapStreamAtomic ( unsigned int  ls,
unsigned int  streamID 
)

Definition at line 210 of file FastMonitor.cc.

References dataPoints_, i, recentSnaps_, and regDpCount_.

211 {
212  recentSnaps_++;
213  for (unsigned int i=0;i<regDpCount_;i++) {
214  dataPoints_[i]->snapStreamAtomic(ls, streamID);
215  }
216 }
int i
Definition: DBlmapReader.cc:9
def ls
Definition: eostools.py:348
std::vector< DataPoint * > dataPoints_
Definition: FastMonitor.h:101

Member Data Documentation

std::vector<DataPoint*> jsoncollector::FastMonitor::dataPoints_
private
std::vector<DataPoint*> jsoncollector::FastMonitor::dataPointsFastOnly_
private

Definition at line 102 of file FastMonitor.h.

Referenced by commit(), and registerFastGlobalMonitorable().

std::string jsoncollector::FastMonitor::defPath_
private
std::string jsoncollector::FastMonitor::defPathFast_
private
bool jsoncollector::FastMonitor::deleteDef_ =false
private

Definition at line 98 of file FastMonitor.h.

Referenced by ~FastMonitor().

bool jsoncollector::FastMonitor::deleteDefFast_ =false
private

Definition at line 99 of file FastMonitor.h.

Referenced by addFastPathDefinition(), and ~FastMonitor().

DataPointDefinition* jsoncollector::FastMonitor::dpd_
private

Definition at line 96 of file FastMonitor.h.

Referenced by commit(), FastMonitor(), and ~FastMonitor().

DataPointDefinition* jsoncollector::FastMonitor::dpdFast_
private

Definition at line 97 of file FastMonitor.h.

Referenced by addFastPathDefinition(), commit(), and ~FastMonitor().

std::map<std::string,unsigned int> jsoncollector::FastMonitor::dpNameMap_
private
bool jsoncollector::FastMonitor::fastPathStrictChecking_
private

Definition at line 88 of file FastMonitor.h.

Referenced by addFastPathDefinition(), and commit().

unsigned int jsoncollector::FastMonitor::fregDpCount_ = 0
private

Definition at line 111 of file FastMonitor.h.

Referenced by commit().

bool jsoncollector::FastMonitor::haveFastPath_ =false
private

Definition at line 91 of file FastMonitor.h.

Referenced by addFastPathDefinition(), and commit().

std::vector<unsigned int> jsoncollector::FastMonitor::jsonDpIndex_
private

Definition at line 103 of file FastMonitor.h.

Referenced by commit(), outputFullJSON(), and outputFullJSONs().

std::vector<DataPoint*> jsoncollector::FastMonitor::jsonDpIndexFast_
private

Definition at line 104 of file FastMonitor.h.

Referenced by commit(), and getCSVString().

unsigned int jsoncollector::FastMonitor::nStreams_
private

Definition at line 93 of file FastMonitor.h.

Referenced by outputFullJSONs(), and setNStreams().

std::vector<DataPoint*> jsoncollector::FastMonitor::orphanedDps_
private

Definition at line 105 of file FastMonitor.h.

unsigned int jsoncollector::FastMonitor::recentSnaps_ = 0
private

Definition at line 108 of file FastMonitor.h.

Referenced by outputFullJSON(), outputFullJSONs(), snap(), snapGlobal(), and snapStreamAtomic().

unsigned int jsoncollector::FastMonitor::recentSnapsTimer_ = 0
private

Definition at line 109 of file FastMonitor.h.

Referenced by outputFullJSON(), outputFullJSONs(), and snap().

unsigned int jsoncollector::FastMonitor::regDpCount_ = 0
private

Definition at line 110 of file FastMonitor.h.

Referenced by commit(), snap(), snapGlobal(), and snapStreamAtomic().

std::string jsoncollector::FastMonitor::sourceInfo_
private
bool jsoncollector::FastMonitor::strictChecking_
private

Definition at line 87 of file FastMonitor.h.

Referenced by commit().

std::unordered_set<std::string> jsoncollector::FastMonitor::uids_
private
bool jsoncollector::FastMonitor::useDefinition_
private

Definition at line 90 of file FastMonitor.h.

Referenced by registerStreamMonitorableUIntVecAtomic().

bool jsoncollector::FastMonitor::useSource_
private

Definition at line 89 of file FastMonitor.h.