CMS Web-Based Monitoring
CMS Web-Based Monitoring (WBM):
- https://cmswbm.cern.ch/cmsdb/servlet/FillReport?FILL=7324 (particular Fill)
- https://cmswbm.cern.ch/cmsdb/servlet/RunSummary?RUN=281707 (particular Run)
You can also find trigger rate vs. PU plots:
Update: WBM has been succeeded by OMS (Online Monitoring System):
If needed, you can still access the offline edition of WBM:
Concatenate two C++ maps of vectors
To concatenate two C++ std::vector
s, it is as simple as:
vec2.insert(vec2.end(), vec1.begin(), vec1.end());
Likewise, to concatenate two std::map
s:
map2.insert(map1.begin(), map1.end());
Note that when a key is present in both maps, the old value is overwritten by the new value. What if you have two maps of vectors, and when the same key exists in both maps, you want to keep all the values? The following is my implementation:
// Check type for map of vector
template<typename>
struct is_map_of_vectors : public std::false_type { };
template<typename T1, typename T2>
struct is_map_of_vectors<std::map<T1, std::vector<T2> > > : public std::true_type { };
// Merge a map of vectors (map1) into another map of vectors (map2)
template<typename Map>
void concatenate_maps_of_vectors(Map& map1, Map& map2) {
typedef typename Map::iterator Iterator;
typedef typename Map::mapped_type Container;
Iterator first = map1.begin();
Iterator last = map1.end();
for (; first != last; ++first) {
std::pair<Iterator, bool> ins = map2.insert(*first);
if (!ins.second) { // if insertion into map2 was not successful
if (is_map_of_vectors<Map>::value) { // special case for map of vectors
Container* vec1 = &(first->second);
Container* vec2 = &(ins.first->second);
vec2->insert(vec2->end(), vec1->begin(), vec1->end());
} else {
// do nothing
}
}
}
}
CMS Plot Styles
Instructions for CMS plot styles:
- https://twiki.cern.ch/twiki/bin/view/CMS/Internal/PubGuidelines
- https://twiki.cern.ch/twiki/bin/view/CMS/Internal/FigGuidelines
To use the ROOT .C macros in pyROOT, the simplest way is:
from ROOT import gROOT
# Set TDR styles
gROOT.LoadMacro("tdrstyle.C")
gROOT.ProcessLine("setTDRStyle();")
# Add CMS text
gROOT.LoadMacro("CMS_lumi.C")
gROOT.ProcessLine("CMS_lumi(c1);")