|
|
Go to the documentation of this file.
17 #include <sys/types.h>
19 #include <boost/filesystem/fstream.hpp>
24 std::string const& defPath,
std::string const defGroup,
bool strictChecking,
bool useSource,
bool useDefinition)
26 strictChecking_(strictChecking),
27 useSource_(useSource),
28 useDefinition_(useDefinition),
41 : strictChecking_(strictChecking), useSource_(useSource), useDefinition_(useDefinition), nStreams_(1), dpd_(dpd) {
68 unsigned int*
nBins) {
70 dp->trackMonitorable(newMonitorable, NAifZeroUpdates);
82 dp->trackMonitorable(newMonitorable,
false);
88 std::vector<unsigned int>*
inputs,
90 unsigned int*
nBins) {
101 std::vector<AtomicMonUInt*>*
inputs,
102 bool NAifZeroUpdates,
103 unsigned int*
nBins) {
108 dp->trackVectorUIntAtomic(
name,
inputs, NAifZeroUpdates);
116 std::vector<std::string>
const& jsonNames =
dpd_->
getNames();
121 std::map<unsigned int, bool> hasJson;
122 for (
unsigned int i = 0;
i < jsonNames.size();
i++) {
123 bool notFoundVar =
true;
151 std::map<unsigned int, bool> fhasJson;
152 for (
unsigned int i = 0;
i < fjsonNames.size();
i++) {
153 bool notFoundVar =
true;
165 bool notFoundVarSlow =
true;
170 notFoundVarSlow =
false;
177 if (notFoundVarSlow) {
216 std::stringstream
ss;
218 for (
unsigned int j = 0;
j < monSize;
j++) {
239 return dataPoints_[it->second]->mergeAndRetrieveValue(forLumi);
244 <<
") in lumisection ";
253 std::stringstream tidext;
254 tidext <<
"_tid" <<
i;
266 <<
") in lumisection ";
282 dp->discardCollected(forLumi);
286 std::stringstream hpid;
287 int pid = (
int)getpid();
289 gethostname(hostname,
sizeof hostname);
290 hpid << hostname <<
"_" << pid;
std::unordered_set< std::string > uids_
unsigned int recentSnapsTimer_
std::vector< std::string > const & getNames()
std::vector< DataPoint * > dataPoints_
void commit(std::vector< unsigned int > *streamLumisPtr)
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)
DataPointDefinition * dpdFast_
virtual std::string & getName()
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)
bool outputFullJSONs(std::string const &pathstem, std::string const &ext, unsigned int lumi)
OperationType getOperationFor(unsigned int index)
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.
void snapGlobal(unsigned int ls)
bool fastPathStrictChecking_
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)
DataPointDefinition * dpd_
void trackDummy(std::string const &name, bool setNAifZeroUpdates)
bool outputFullJSON(std::string const &path, unsigned int lumi)
void snapStreamAtomic(unsigned int ls, unsigned int streamID)
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)
std::vector< DataPoint * > dataPointsFastOnly_