|
|
Go to the documentation of this file.
17 #include <sys/types.h>
23 std::string const& defPath,
std::string const defGroup,
bool strictChecking,
bool useSource,
bool useDefinition)
25 strictChecking_(strictChecking),
26 useSource_(useSource),
27 useDefinition_(useDefinition),
41 : strictChecking_(strictChecking), useSource_(useSource), useDefinition_(useDefinition), nStreams_(1), dpd_(dpd) {
69 unsigned int*
nBins) {
71 dp->trackMonitorable(newMonitorable, NAifZeroUpdates);
83 dp->trackMonitorable(newMonitorable,
false);
89 std::vector<unsigned int>*
inputs,
91 unsigned int*
nBins) {
102 std::vector<AtomicMonUInt*>*
inputs,
103 bool NAifZeroUpdates,
104 unsigned int*
nBins) {
109 dp->trackVectorUIntAtomic(
name,
inputs, NAifZeroUpdates);
117 std::vector<std::string>
const& jsonNames =
dpd_->
getNames();
122 std::map<unsigned int, bool> hasJson;
123 for (
unsigned int i = 0;
i < jsonNames.size();
i++) {
124 bool notFoundVar =
true;
152 std::map<unsigned int, bool> fhasJson;
153 for (
unsigned int i = 0;
i < fjsonNames.size();
i++) {
154 bool notFoundVar =
true;
166 bool notFoundVarSlow =
true;
171 notFoundVarSlow =
false;
178 if (notFoundVarSlow) {
217 std::stringstream
ss;
219 for (
unsigned int j = 0;
j < monSize;
j++) {
240 return dataPoints_[it->second]->mergeAndRetrieveValue(forLumi);
245 <<
") in lumisection ";
257 std::stringstream tidext;
258 tidext <<
"_tid" <<
i;
270 <<
") in lumisection ";
288 dp->discardCollected(forLumi);
292 std::stringstream hpid;
293 int pid = (
int)getpid();
295 gethostname(hostname,
sizeof hostname);
296 hpid << hostname <<
"_" << pid;
std::unordered_set< std::string > uids_
unsigned int recentSnapsTimer_
std::vector< DataPoint * > dataPoints_
void commit(std::vector< unsigned int > *streamLumisPtr)
bool outputFullJSON(std::string const &path, unsigned int lumi, bool output=true)
JsonMonitorable * getMergedIntJForLumi(std::string const &name, unsigned int forLumi)
U second(std::pair< T, U > const &p)
unsigned int recentSnaps_
void getHostAndPID(std::string &sHPid)
std::vector< DataPoint * > jsonDpIndexFast_
void registerGlobalMonitorable(JsonMonitorable *newMonitorable, bool NAifZeroUpdates, unsigned int *nBins=nullptr)
unsigned int fregDpCount_
void registerStreamMonitorableUIntVec(std::string const &name, std::vector< unsigned int > *inputs, bool NAifZeroUpdates, unsigned int *nBins=nullptr)
static bool getDataPointDefinitionFor(std::string &defFilePath, DataPointDefinition *dpd, const std::string *defaultGroup=nullptr)
void addFastPathDefinition(std::string const &defPathFast, std::string const defGroupFast, bool strict)
void outputCSV(std::string const &path, std::string const &csvString)
TString getName(TString structure, int layer, TString geometry)
Writes a Value in JSON format in a human friendly way.
std::vector< std::string > const & getNames() const
void snapGlobal(unsigned int ls)
bool outputFullJSONs(std::string const &pathstem, std::string const &ext, unsigned int lumi, bool output=true)
bool fastPathStrictChecking_
OperationType getOperationFor(unsigned int index) const
void registerStreamMonitorableUIntVecAtomic(std::string const &name, std::vector< AtomicMonUInt * > *inputs, bool NAifZeroUpdates, unsigned int *nBins=nullptr)
static void writeStringToFile(std::string const &filename, std::string &content)
void registerFastGlobalMonitorable(JsonMonitorable *newMonitorable)
void trackDummy(std::string const &name, bool setNAifZeroUpdates)
DataPointDefinition const * dpd_
void snapStreamAtomic(unsigned int ls, unsigned int streamID)
virtual std::string const & getName() const
std::map< std::string, unsigned int > dpNameMap_
void snap(unsigned int ls)
FastMonitor(std::string const &defPath, std::string const defGroup, bool strictChecking, bool useSource=true, bool useDefinition=true)
std::string getCSVString(int sid=-1)
std::vector< unsigned int > jsonDpIndex_
void discardCollected(unsigned int forLumi)
DataPointDefinition const * dpdFast_
std::vector< DataPoint * > dataPointsFastOnly_