2 #include <boost/regex.hpp> 13 edm::LogInfo(
"DQMHistoryServiceBase") <<
"[DQMHistoryServiceBase::scanTreeAndFillSummary] keyName " << keyName;
21 }
catch ( boost::regex_error&
e ) {
22 std::cout <<
"Error: " << keyName <<
" is not a valid regular expression: \"" 23 << e.what() <<
"\"" << std::endl;
24 std::cout <<
"Skip search for matches" << std::endl;
31 me_name = me->getFullname();
33 me_name = me->getName();
35 if( me_name.find(
"^") != 0 ) {
36 me_name =
"^" + me_name;
40 if ( boost::regex_search(me_name, re) ) {
43 std::vector<std::string> userDBContent;
45 ss <<
"\nFound compatible ME " << me_name <<
" for key " << keyName << std::endl;
48 if (
quant ==
"landau" ) {
51 }
else if (
quant ==
"gauss" ) {
54 }
else if (
quant ==
"stat" ) {
64 ss <<
"detid " << detid <<
" \n";
65 for (
size_t i = 0;
i < values.size(); ++
i )
66 ss <<
"Quantity " << userDBContent[
i] <<
" value " << values[
i] << std::endl;
68 summary->
put(detid, values, userDBContent);
71 edm::LogInfo(
"DQMHistoryServiceBase") <<
"[DQMHistoryServiceBase::scanTreeAndFillSummary] " << ss.str();
77 userDBContent.push_back(keyName+
sep()+
std::string(
"landauPeakErr"));
79 userDBContent.push_back(keyName+
sep()+
std::string(
"landauChi2NDF"));
87 userDBContent.push_back(keyName+
sep()+
std::string(
"gaussChi2NDF"));
106 else values.push_back(-99.);
116 else values.push_back(-99.);
123 values.push_back( me->
getMean());
124 values.push_back( me->
getRMS());
double getLanGaussParErr(std::string s)
bool put(const uint32_t &detID, InputVector &input, std::vector< std::string > &userContent)
virtual bool setDBLabelsForUser(const std::string &keyName, std::vector< std::string > &userDBContent, const std::string &quantity) const
virtual bool setDBValuesForStat(const MonitorElement *me, HDQMSummary::InputVector &values) const
double doGaussFit(MonitorElement *ME)
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
double getLanGaussConv(std::string s)
virtual bool setDBLabelsForStat(const std::string &keyName, std::vector< std::string > &userDBContent) const
std::vector< float > InputVector
virtual bool setDBLabelsForLandau(const std::string &keyName, std::vector< std::string > &userDBContent) const
virtual bool setDBValuesForGauss(const MonitorElement *me, HDQMSummary::InputVector &values) const
virtual void scanTreeAndFillSummary(const std::vector< MonitorElement * > &MEs, HDQMSummary *summary, const std::string &histoName, const std::vector< std::string > &Quantities) const
virtual uint32_t returnDetComponent(const MonitorElement *ME) const =0
double getLanGaussPar(std::string s)
double getGaussPar(std::string s)
double getEntries() const
get # of entries
virtual ~SiStripDQMHistoryHelper()
double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
virtual bool setDBValuesForUser(const MonitorElement *me, HDQMSummary::InputVector &values, const std::string &quantity) const
virtual bool setDBLabelsForGauss(const std::string &keyName, std::vector< std::string > &userDBContent) const
virtual bool setDBValuesForLandau(const MonitorElement *me, HDQMSummary::InputVector &values) const
double doLanGaussFit(MonitorElement *ME)