CMS 3D CMS Logo

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

#include <DataPoint.h>

Inheritance diagram for jsoncollector::DataPoint:
jsoncollector::JsonSerializable

Public Member Functions

 DataPoint ()
 
 DataPoint (std::string const &source, std::string const &definition, bool fast=false)
 
virtual void deserialize (Json::Value &root)
 
void discardCollected (unsigned int forLumi)
 
std::string fastOutCSV ()
 
std::vector< std::string > & getData ()
 
std::string & getDefinition ()
 
std::string const & getName ()
 
void makeStreamLumiMap (unsigned int size)
 
JsonMonitorablemergeAndRetrieveValue (unsigned int forLumi)
 
void mergeAndSerialize (Json::Value &jsonRoot, unsigned int lumi, bool initJsonValue)
 
virtual void serialize (Json::Value &root) const
 
void serialize (Json::Value &root, bool rootInit, std::string const &input) const
 
void setNBins (unsigned int *nBins)
 
void setOperation (OperationType op)
 
void setStreamLumiPtr (std::vector< unsigned int > *streamLumiPtr)
 
void snap (unsigned int lumi)
 
void snapGlobal (unsigned int lumi)
 
void snapStreamAtomic (unsigned int lumi, unsigned int streamID)
 
void trackDummy (std::string const &name, bool setNAifZeroUpdates)
 
void trackMonitorable (JsonMonitorable *monitorable, bool NAifZeroUpdates)
 
void trackVectorUInt (std::string const &name, std::vector< unsigned int > *monvec, bool NAifZeroUpdates)
 
void trackVectorUIntAtomic (std::string const &name, std::vector< AtomicMonUInt * > *monvec, bool NAifZeroUpdates)
 
void updateDefinition (std::string const &definition)
 
 ~DataPoint ()
 
- Public Member Functions inherited from jsoncollector::JsonSerializable
virtual ~JsonSerializable ()
 

Static Public Attributes

static const std::string DATA = "data"
 
static const std::string DEFINITION = "definition"
 
static const std::string SOURCE = "source"
 

Protected Attributes

uint32_t * buf_ = nullptr
 
unsigned int bufLen_ =0
 
int cacheI_
 
std::vector< std::string > data_
 
std::string definition_
 
unsigned int fastIndex_ = 0
 
MonPtrMap globalDataMap_
 
bool isAtomic_ = false
 
bool isCached_ =0
 
bool isDummy_ = false
 
bool isFastOnly_
 
bool isStream_ = false
 
MonType monType_
 
bool NAifZeroUpdates_ = false
 
std::string name_
 
unsigned int * nBinsPtr_ = nullptr
 
OperationType opType_
 
std::string source_
 
std::vector< MonPtrMapstreamDataMaps_
 
std::vector< unsigned int > * streamLumisPtr_ = nullptr
 
void * tracked_ = nullptr
 

Detailed Description

Definition at line 36 of file DataPoint.h.

Constructor & Destructor Documentation

jsoncollector::DataPoint::DataPoint ( )
inline

Definition at line 40 of file DataPoint.h.

40 { }
jsoncollector::DataPoint::DataPoint ( std::string const &  source,
std::string const &  definition,
bool  fast = false 
)
inline

Definition at line 42 of file DataPoint.h.

42  :
43  source_(source), definition_(definition), isFastOnly_(fast) { }
std::string definition_
Definition: DataPoint.h:128
static std::string const source
Definition: EdmProvDump.cc:42
DataPoint::~DataPoint ( )

Definition at line 31 of file DataPoint.cc.

References buf_.

32 {
33  if (buf_) delete[] buf_;
34 }

Member Function Documentation

void DataPoint::deserialize ( Json::Value root)
virtual

JSON deserialization procedure for this class

Implements jsoncollector::JsonSerializable.

Definition at line 56 of file DataPoint.cc.

References Json::Value::asString(), DATA, data_, DEFINITION, definition_, Json::Value::get(), i, Json::Value::isArray(), Json::Value::size(), findQualityFiles::size, SOURCE, and source_.

Referenced by evf::EvFDaqDirector::getNFilesFromEoLS(), and FedRawDataInputSource::grabNextJsonFile().

57 {
58  source_ = root.get(SOURCE, "").asString();
59  definition_ = root.get(DEFINITION, "").asString();
60  if (root.get(DATA, "").isArray()) {
61  unsigned int size = root.get(DATA, "").size();
62  for (unsigned int i = 0; i < size; i++) {
63  data_.push_back(root.get(DATA, "")[i].asString());
64  }
65  }
66 }
Value get(UInt index, const Value &defaultValue) const
int i
Definition: DBlmapReader.cc:9
static const std::string SOURCE
Definition: DataPoint.h:121
std::string definition_
Definition: DataPoint.h:128
static const std::string DATA
Definition: DataPoint.h:123
UInt size() const
Number of values in array or object.
bool isArray() const
std::vector< std::string > data_
Definition: DataPoint.h:129
std::string asString() const
static const std::string DEFINITION
Definition: DataPoint.h:122
tuple size
Write out results.
void DataPoint::discardCollected ( unsigned int  forLumi)

Definition at line 383 of file DataPoint.cc.

References end, globalDataMap_, i, and streamDataMaps_.

384 {
385  for (unsigned int i=0;i<streamDataMaps_.size();i++)
386  {
387  auto itr = streamDataMaps_[i].find(lumi);
388  if (itr!=streamDataMaps_[i].end()) streamDataMaps_[i].erase(lumi);
389  }
390 
391  auto itr = globalDataMap_.find(lumi);
392  if (itr!=globalDataMap_.end())
393  globalDataMap_.erase(lumi);
394 }
int i
Definition: DBlmapReader.cc:9
tuple lumi
Definition: fjr2json.py:35
std::vector< MonPtrMap > streamDataMaps_
Definition: DataPoint.h:131
#define end
Definition: vmac.h:37
std::string DataPoint::fastOutCSV ( )

Definition at line 251 of file DataPoint.cc.

References fastIndex_, isAtomic_, isStream_, findQualityFiles::size, contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, and tracked_.

252 {
253  if (tracked_) {
254  if (isStream_) {
255  std::stringstream ss;
256  if (isAtomic_) {
257 #if ATOMIC_LEVEL>0
258  ss << (unsigned int) (static_cast<std::vector<AtomicMonUInt*>*>(tracked_))->at(fastIndex_)->load(std::memory_order_relaxed);
259 #else
260  ss << (unsigned int) *((static_cast<std::vector<AtomicMonUInt*>*>(tracked_))->at(fastIndex_));
261 #endif
262  fastIndex_ = (fastIndex_+1) % (static_cast<std::vector<AtomicMonUInt*>*>(tracked_))->size();
263  }
264  else {
265  ss << (static_cast<std::vector<unsigned int>*>(tracked_))->at(fastIndex_);
266  fastIndex_ = (fastIndex_+1) % (static_cast<std::vector<unsigned int>*>(tracked_))->size();
267  }
268 
269  return ss.str();
270  }
271  return (static_cast<JsonMonitorable*>(tracked_))->toString();
272  }
273  return std::string("");
274 }
unsigned int fastIndex_
Definition: DataPoint.h:156
tuple size
Write out results.
std::vector<std::string>& jsoncollector::DataPoint::getData ( void  )
inline

Definition at line 58 of file DataPoint.h.

References data_.

Referenced by evf::EvFDaqDirector::getNFilesFromEoLS(), and FedRawDataInputSource::grabNextJsonFile().

58 {return data_;}
std::vector< std::string > data_
Definition: DataPoint.h:129
std::string& jsoncollector::DataPoint::getDefinition ( )
inline

Definition at line 59 of file DataPoint.h.

References definition_.

Referenced by evf::EvFDaqDirector::getNFilesFromEoLS().

59 {return definition_;}
std::string definition_
Definition: DataPoint.h:128
std::string const& jsoncollector::DataPoint::getName ( void  )
inline

Definition at line 116 of file DataPoint.h.

References name_.

Referenced by plotting.Plot::draw().

116 {return name_;}
void DataPoint::makeStreamLumiMap ( unsigned int  size)

Definition at line 107 of file DataPoint.cc.

References i, findQualityFiles::size, and streamDataMaps_.

Referenced by trackVectorUInt(), and trackVectorUIntAtomic().

108 {
109  for (unsigned int i=0;i<size;i++) {
110  streamDataMaps_.push_back(MonPtrMap());
111  }
112 }
int i
Definition: DBlmapReader.cc:9
std::map< unsigned int, JsonMonPtr > MonPtrMap
Definition: DataPoint.h:34
std::vector< MonPtrMap > streamDataMaps_
Definition: DataPoint.h:131
tuple size
Write out results.
JsonMonitorable * DataPoint::mergeAndRetrieveValue ( unsigned int  forLumi)

Definition at line 276 of file DataPoint.cc.

References jsoncollector::IntJ::add(), assert(), cacheI_, end, i, isCached_, isStream_, monType_, streamDataMaps_, jsoncollector::TYPEUINT, relativeConstraints::value, and jsoncollector::IntJ::value().

277 {
278  assert(monType_==TYPEUINT && isStream_);//for now only support UINT and SUM for stream variables
279  IntJ *newJ = new IntJ;
280  for (unsigned int i=0;i<streamDataMaps_.size();i++) {
281  auto itr = streamDataMaps_[i].find(lumi);
282  if (itr!=streamDataMaps_[i].end()) {
283  newJ->add(static_cast<IntJ*>(itr->second.get())->value());
284  }
285  }
286  cacheI_=newJ->value();
287  isCached_=true;
288  return newJ;//assume the caller takes care of deleting the object
289 }
int i
Definition: DBlmapReader.cc:9
tuple lumi
Definition: fjr2json.py:35
assert(m_qm.get())
std::vector< MonPtrMap > streamDataMaps_
Definition: DataPoint.h:131
void add(long sth)
#define end
Definition: vmac.h:37
void DataPoint::mergeAndSerialize ( Json::Value jsonRoot,
unsigned int  lumi,
bool  initJsonValue 
)

Definition at line 291 of file DataPoint.cc.

References Json::Value::append(), assert(), buf_, bufLen_, cacheI_, DATA, DEFINITION, definition_, end, jsoncollector::JsonMonitorable::getUpdates(), globalDataMap_, i, isCached_, isDummy_, isStream_, monType_, NAifZeroUpdates_, nBinsPtr_, jsoncollector::OPHISTO, opType_, SOURCE, source_, contentValuesCheck::ss, streamDataMaps_, jsoncollector::TYPESTRING, jsoncollector::TYPEUINT, relativeConstraints::value, and jsoncollector::HistoJ< T >::value().

292 {
293  if (initJsonValue) {
294  root[SOURCE] = source_;
296  }
297 
298  if (isDummy_) {
299  root[DATA].append("N/A");
300  return;
301  }
302  if (!isStream_) {
303  auto itr = globalDataMap_.find(lumi);
304  if (itr != globalDataMap_.end()) {
305  root[DATA].append(itr->second.get()->toString());
306  }
307  else {
308  if (NAifZeroUpdates_) root[DATA].append("N/A");
309  else if (monType_==TYPESTRING) root[DATA].append("");
310  else root[DATA].append("0");
311  }
312  return;
313  }
314  else {
316  if (isCached_) {
317  std::stringstream ss;
318  ss << cacheI_;
319  root[DATA].append(ss.str());
320  return;
321  }
322  if (opType_!=OPHISTO) {//sum is default
323  std::stringstream ss;
324  unsigned int updates=0;
325  unsigned int sum=0;
326  for (unsigned int i=0;i<streamDataMaps_.size();i++) {
327  auto itr = streamDataMaps_[i].find(lumi);
328  if (itr!=streamDataMaps_[i].end()) {
329  sum+=static_cast<IntJ*>(itr->second.get())->value();
330  updates++;
331  }
332  }
333  if (!updates && NAifZeroUpdates_) ss << "N/A";
334  ss << sum;
335  root[DATA].append(ss.str());
336  return;
337  }
338  if (opType_==OPHISTO) {
339  if (nBinsPtr_==nullptr) {
340  root[DATA].append("N/A");
341  return;
342  }
343  if (*nBinsPtr_>bufLen_) {
344  if (buf_) delete[] buf_;
346  buf_= new uint32_t[bufLen_];
347  }
348  memset(buf_,0,bufLen_*sizeof(uint32_t));
349  unsigned int updates=0;
350  for (unsigned int i=0;i<streamDataMaps_.size();i++) {
351  auto itr = streamDataMaps_[i].find(lumi);
352  if (itr!=streamDataMaps_[i].end()) {
353  HistoJ <unsigned int>* monObj = static_cast<HistoJ<unsigned int>*>(itr->second.get());
354  updates+=monObj->getUpdates();
355  auto &hvec = monObj->value();
356  for (unsigned int i=0;i<hvec.size();i++) {
357  unsigned int thisbin=(unsigned int) hvec[i];
358  if (thisbin<*nBinsPtr_) {
359  buf_[thisbin]++;
360  }
361  }
362  }
363  }
364  std::stringstream ss;
365  if (!*nBinsPtr_ || (!updates && NAifZeroUpdates_)) ss << "N/A";
366  else {
367  ss << "[";
368  if (*nBinsPtr_) {
369  for (unsigned int i=0;i<*nBinsPtr_-1;i++) {
370  ss << buf_[i] << ",";
371  }
372  ss << buf_[*nBinsPtr_-1];
373  }
374  ss << "]";
375  }
376  root[DATA].append(ss.str());
377  return;
378  }
379  }
380 }
OperationType opType_
Definition: DataPoint.h:145
int i
Definition: DBlmapReader.cc:9
static const std::string SOURCE
Definition: DataPoint.h:121
tuple lumi
Definition: fjr2json.py:35
assert(m_qm.get())
std::vector< T > & value()
std::string definition_
Definition: DataPoint.h:128
static const std::string DATA
Definition: DataPoint.h:123
std::vector< MonPtrMap > streamDataMaps_
Definition: DataPoint.h:131
#define end
Definition: vmac.h:37
unsigned int bufLen_
Definition: DataPoint.h:150
static const std::string DEFINITION
Definition: DataPoint.h:122
unsigned int * nBinsPtr_
Definition: DataPoint.h:152
string root
initialization
Definition: dbtoconf.py:70
void DataPoint::serialize ( Json::Value root) const
virtual

JSON serialization procedure for this class

Implements jsoncollector::JsonSerializable.

Definition at line 43 of file DataPoint.cc.

References python.multivaluedict::append(), DATA, data_, DEFINITION, definition_, i, SOURCE, and source_.

44 {
45  if (source_.size()) {
46  root[SOURCE] = source_;
47  }
48  if (definition_.size()) {
49  root[DEFINITION] = definition_;
50  }
51  for (unsigned int i=0;i<data_.size();i++)
52  root[DATA].append(data_[i]);
53 }
int i
Definition: DBlmapReader.cc:9
static const std::string SOURCE
Definition: DataPoint.h:121
std::string definition_
Definition: DataPoint.h:128
static const std::string DATA
Definition: DataPoint.h:123
std::vector< std::string > data_
Definition: DataPoint.h:129
static const std::string DEFINITION
Definition: DataPoint.h:122
void DataPoint::serialize ( Json::Value root,
bool  rootInit,
std::string const &  input 
) const

Functions specific to new monitoring implementation

Definition at line 114 of file DataPoint.cc.

References Json::Value::append(), DATA, DEFINITION, definition_, SOURCE, and source_.

115 {
116  if (rootInit) {
117  if (source_.size())
118  root[SOURCE] = source_;
119  if (definition_.size())
120  root[DEFINITION] = definition_;
121  }
122  root[DATA].append(input);
123 }
static const std::string SOURCE
Definition: DataPoint.h:121
Value & append(const Value &value)
Append value to array at the end.
std::string definition_
Definition: DataPoint.h:128
static std::string const input
Definition: EdmProvDump.cc:43
static const std::string DATA
Definition: DataPoint.h:123
static const std::string DEFINITION
Definition: DataPoint.h:122
void jsoncollector::DataPoint::setNBins ( unsigned int *  nBins)
inline
void jsoncollector::DataPoint::setOperation ( OperationType  op)
inline

Definition at line 92 of file DataPoint.h.

References opType_.

92  {
93  opType_=op;
94  }
OperationType opType_
Definition: DataPoint.h:145
void jsoncollector::DataPoint::setStreamLumiPtr ( std::vector< unsigned int > *  streamLumiPtr)
inline

Definition at line 97 of file DataPoint.h.

References streamLumisPtr_.

97  {
98  streamLumisPtr_=streamLumiPtr;
99  }
std::vector< unsigned int > * streamLumisPtr_
Definition: DataPoint.h:136
void DataPoint::snap ( unsigned int  lumi)

Definition at line 125 of file DataPoint.cc.

References assert(), end, i, isAtomic_, isCached_, isStream_, MAXUPDATES, monType_, nBinsPtr_, jsoncollector::OPHISTO, opType_, snapGlobal(), streamDataMaps_, streamLumisPtr_, tracked_, jsoncollector::TYPEINT, jsoncollector::TYPEUINT, jsoncollector::IntJ::update(), and jsoncollector::HistoJ< T >::update().

126 {
127  isCached_=false;
128  if (isStream_) {
129  if (monType_==TYPEUINT)
130  {
131  for (unsigned int i=0; i<streamDataMaps_.size();i++) {
132  unsigned int streamLumi_=streamLumisPtr_->at(i);//get currently processed stream lumi
133  unsigned int monVal;
134 
135 #if ATOMIC_LEVEL>0
136  if (isAtomic_) monVal = (static_cast<std::vector<AtomicMonUInt*>*>(tracked_))->at(i)->load(std::memory_order_relaxed);
137 #else
138  if (isAtomic_) monVal = *((static_cast<std::vector<AtomicMonUInt*>*>(tracked_))->at(i));
139 #endif
140  else monVal = (static_cast<std::vector<unsigned int>*>(tracked_))->at(i);
141 
142  auto itr = streamDataMaps_[i].find(streamLumi_);
143  if (itr==streamDataMaps_[i].end())
144  {
145  if (opType_==OPHISTO) {
146  if (*nBinsPtr_) {
148  nh->update(monVal);
149  streamDataMaps_[i][streamLumi_] = nh;
150  }
151  }
152  else {//default to SUM
153  IntJ *nj = new IntJ;
154  nj->update(monVal);
155  streamDataMaps_[i][streamLumi_]= nj;
156  }
157  }
158  else {
159  if (opType_==OPHISTO) {
160  if (*nBinsPtr_) {
161  (static_cast<HistoJ<unsigned int> *>(itr->second.get()))->update(monVal);
162  }
163  }
164  else {
165  *(static_cast<IntJ*>(itr->second.get()))=monVal;
166  }
167  }
168  }
169  }
170  else assert(monType_!=TYPEINT);//not yet implemented, application error
171  }
172  else snapGlobal(lumi);
173 }
OperationType opType_
Definition: DataPoint.h:145
int i
Definition: DBlmapReader.cc:9
std::vector< unsigned int > * streamLumisPtr_
Definition: DataPoint.h:136
tuple lumi
Definition: fjr2json.py:35
assert(m_qm.get())
#define MAXUPDATES
Definition: DataPoint.cc:16
std::vector< MonPtrMap > streamDataMaps_
Definition: DataPoint.h:131
void snapGlobal(unsigned int lumi)
Definition: DataPoint.cc:175
#define end
Definition: vmac.h:37
void update(long sth)
unsigned int * nBinsPtr_
Definition: DataPoint.h:152
void DataPoint::snapGlobal ( unsigned int  lumi)

Definition at line 175 of file DataPoint.cc.

References globalDataMap_, isCached_, isStream_, fjr2json::lumi, monType_, tracked_, jsoncollector::TYPEDOUBLE, jsoncollector::TYPEINT, jsoncollector::TYPESTRING, update, jsoncollector::IntJ::update(), jsoncollector::DoubleJ::update(), jsoncollector::StringJ::update(), and relativeConstraints::value.

Referenced by snap().

176 {
177  isCached_=false;
178  if (isStream_) return;
179  auto itr = globalDataMap_.find(lumi);
180  if (itr==globalDataMap_.end()) {
181  if (monType_==TYPEINT) {
182  IntJ *ij = new IntJ;
183  ij->update((static_cast<IntJ*>(tracked_))->value());
184  globalDataMap_[lumi]=ij;
185  }
186  if (monType_==TYPEDOUBLE) {
187  DoubleJ *dj = new DoubleJ;
188  dj->update((static_cast<DoubleJ*>(tracked_))->value());
189  globalDataMap_[lumi]=dj;
190  }
191  if (monType_==TYPESTRING) {
192  StringJ *sj = new StringJ;
193  sj->update((static_cast<StringJ*>(tracked_))->value());
194  globalDataMap_[lumi]=sj;
195  }
196  } else {
197  if (monType_==TYPEINT)
198  static_cast<IntJ*>(itr->second.get())->update((static_cast<IntJ*>(tracked_))->value());
199  else if (monType_==TYPEDOUBLE)
200  static_cast<DoubleJ*>(itr->second.get())->update((static_cast<DoubleJ*>(tracked_))->value());
201  else if (monType_==TYPESTRING)
202  static_cast<StringJ*>(itr->second.get())->concatenate((static_cast<StringJ*>(tracked_))->value());
203  }
204 }
tuple lumi
Definition: fjr2json.py:35
void update(std::string const &newStr)
void update(long sth)
#define update(a, b)
void update(double sth)
void DataPoint::snapStreamAtomic ( unsigned int  lumi,
unsigned int  streamID 
)

Definition at line 206 of file DataPoint.cc.

References assert(), end, h, isAtomic_, isCached_, isStream_, fjr2json::lumi, MAXUPDATES, monType_, nBinsPtr_, jsoncollector::OPHISTO, opType_, streamDataMaps_, tracked_, jsoncollector::TYPEINT, jsoncollector::TYPEUINT, update, jsoncollector::IntJ::update(), and jsoncollector::HistoJ< T >::update().

207 {
208  if (!isStream_ || !isAtomic_) return;
209  isCached_=false;
210  if (monType_==TYPEUINT)
211  {
212  unsigned int monVal;
213 #if ATOMIC_LEVEL>0
214  if (isAtomic_) monVal = (static_cast<std::vector<AtomicMonUInt*>*>(tracked_))->at(streamID)->load(std::memory_order_relaxed);
215 #else
216  if (isAtomic_) monVal = *((static_cast<std::vector<AtomicMonUInt*>*>(tracked_))->at(streamID));
217 #endif
218  else monVal = (static_cast<std::vector<unsigned int>*>(tracked_))->at(streamID);
219 
220  auto itr = streamDataMaps_[streamID].find(lumi);
221  if (itr==streamDataMaps_[streamID].end()) //insert
222  {
223  if (opType_==OPHISTO) {
224  if (*nBinsPtr_) {
226  h->update(monVal);
227  streamDataMaps_[streamID][lumi] = h;
228  }
229  }
230  else {//default to SUM
231 
232  IntJ *h = new IntJ;
233  h->update(monVal);
234  streamDataMaps_[streamID][lumi] = h;
235  }
236  }
237  else
238  {
239  if (opType_==OPHISTO) {
240  if (*nBinsPtr_) {
241  static_cast<HistoJ<unsigned int>*>(itr->second.get())->update(monVal);
242  }
243  }
244  else
245  *(static_cast<IntJ*>(itr->second.get()))=monVal;
246  }
247  }
248  else assert(monType_!=TYPEINT);//not yet implemented
249 }
OperationType opType_
Definition: DataPoint.h:145
tuple lumi
Definition: fjr2json.py:35
assert(m_qm.get())
#define MAXUPDATES
Definition: DataPoint.cc:16
std::vector< MonPtrMap > streamDataMaps_
Definition: DataPoint.h:131
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
#define end
Definition: vmac.h:37
void update(long sth)
#define update(a, b)
unsigned int * nBinsPtr_
Definition: DataPoint.h:152
void jsoncollector::DataPoint::trackDummy ( std::string const &  name,
bool  setNAifZeroUpdates 
)
inline
void DataPoint::trackMonitorable ( JsonMonitorable monitorable,
bool  NAifZeroUpdates 
)

Definition at line 74 of file DataPoint.cc.

References assert(), jsoncollector::JsonMonitorable::getName(), monType_, NAifZeroUpdates_, name_, tracked_, jsoncollector::TYPEDOUBLE, jsoncollector::TYPEINT, and jsoncollector::TYPESTRING.

Referenced by jsoncollector::FastMonitor::registerFastGlobalMonitorable(), and jsoncollector::FastMonitor::registerGlobalMonitorable().

75 {
76  name_=monitorable->getName();
77  tracked_ = (void*)monitorable;
78  if (dynamic_cast<IntJ*>(monitorable)) monType_=TYPEINT;
79  else if (dynamic_cast<DoubleJ*>(monitorable)) monType_=TYPEDOUBLE;
80  else if (dynamic_cast<StringJ*>(monitorable)) monType_=TYPESTRING;
81  else assert(0);
82  NAifZeroUpdates_=NAifZeroUpdates;
83 
84 }
virtual std::string & getName()
assert(m_qm.get())
void DataPoint::trackVectorUInt ( std::string const &  name,
std::vector< unsigned int > *  monvec,
bool  NAifZeroUpdates 
)
void DataPoint::trackVectorUIntAtomic ( std::string const &  name,
std::vector< AtomicMonUInt * > *  monvec,
bool  NAifZeroUpdates 
)
void jsoncollector::DataPoint::updateDefinition ( std::string const &  definition)
inline

Definition at line 118 of file DataPoint.h.

References definition_.

118 {definition_=definition;}
std::string definition_
Definition: DataPoint.h:128

Member Data Documentation

uint32_t* jsoncollector::DataPoint::buf_ = nullptr
protected

Definition at line 149 of file DataPoint.h.

Referenced by mergeAndSerialize(), and ~DataPoint().

unsigned int jsoncollector::DataPoint::bufLen_ =0
protected

Definition at line 150 of file DataPoint.h.

Referenced by mergeAndSerialize().

int jsoncollector::DataPoint::cacheI_
protected

Definition at line 153 of file DataPoint.h.

Referenced by mergeAndRetrieveValue(), and mergeAndSerialize().

const std::string DataPoint::DATA = "data"
static

Definition at line 123 of file DataPoint.h.

Referenced by deserialize(), mergeAndSerialize(), and serialize().

std::vector<std::string> jsoncollector::DataPoint::data_
protected

Definition at line 129 of file DataPoint.h.

Referenced by deserialize(), getData(), and serialize().

const std::string DataPoint::DEFINITION = "definition"
static

Definition at line 122 of file DataPoint.h.

Referenced by deserialize(), mergeAndSerialize(), and serialize().

std::string jsoncollector::DataPoint::definition_
protected
unsigned int jsoncollector::DataPoint::fastIndex_ = 0
protected

Definition at line 156 of file DataPoint.h.

Referenced by fastOutCSV().

MonPtrMap jsoncollector::DataPoint::globalDataMap_
protected

Definition at line 132 of file DataPoint.h.

Referenced by discardCollected(), mergeAndSerialize(), and snapGlobal().

bool jsoncollector::DataPoint::isAtomic_ = false
protected

Definition at line 139 of file DataPoint.h.

Referenced by fastOutCSV(), snap(), snapStreamAtomic(), and trackVectorUIntAtomic().

bool jsoncollector::DataPoint::isCached_ =0
protected
bool jsoncollector::DataPoint::isDummy_ = false
protected

Definition at line 140 of file DataPoint.h.

Referenced by mergeAndSerialize(), and trackDummy().

bool jsoncollector::DataPoint::isFastOnly_
protected

Definition at line 142 of file DataPoint.h.

bool jsoncollector::DataPoint::isStream_ = false
protected
MonType jsoncollector::DataPoint::monType_
protected
bool jsoncollector::DataPoint::NAifZeroUpdates_ = false
protected
std::string jsoncollector::DataPoint::name_
protected
unsigned int* jsoncollector::DataPoint::nBinsPtr_ = nullptr
protected

Definition at line 152 of file DataPoint.h.

Referenced by mergeAndSerialize(), setNBins(), snap(), and snapStreamAtomic().

OperationType jsoncollector::DataPoint::opType_
protected

Definition at line 145 of file DataPoint.h.

Referenced by mergeAndSerialize(), setOperation(), snap(), and snapStreamAtomic().

const std::string DataPoint::SOURCE = "source"
static

Definition at line 121 of file DataPoint.h.

Referenced by deserialize(), mergeAndSerialize(), and serialize().

std::string jsoncollector::DataPoint::source_
protected
std::vector<MonPtrMap> jsoncollector::DataPoint::streamDataMaps_
protected
std::vector<unsigned int>* jsoncollector::DataPoint::streamLumisPtr_ = nullptr
protected

Definition at line 136 of file DataPoint.h.

Referenced by setStreamLumiPtr(), and snap().

void* jsoncollector::DataPoint::tracked_ = nullptr
protected