#include <DQM/EcalBarrelMonitorClient/interface/EBPedestalClient.h>
Public Member Functions | |
void | analyze (void) |
Analyze. | |
void | beginJob (DQMStore *dqmStore) |
begin of job method | |
void | beginRun (void) |
begin of run method | |
void | cleanup (void) |
clean up method | |
EBPedestalClient (const edm::ParameterSet &ps) | |
Constructor. | |
void | endJob (void) |
end of job method | |
void | endRun (void) |
end of run method | |
int | getEvtPerJob () |
Get Functions. | |
int | getEvtPerRun () |
Returns the number of processed events in this Run. | |
void | htmlOutput (int run, std::string &htmlDir, std::string &htmlName) |
create HTML page | |
void | setup (void) |
Setup. | |
void | softReset (bool flag) |
SoftReset. | |
bool | writeDb (EcalCondDBInterface *econn, RunIOV *runiov, MonRunIOV *moniov, bool &status, bool flag) |
Write data to DataBase. | |
virtual | ~EBPedestalClient () |
Destructor. | |
Private Attributes | |
bool | cloneME_ |
bool | debug_ |
float | discrepancyMean_ [3] |
float | discrepancyMeanPn_ [2] |
DQMStore * | dqmStore_ |
bool | enableCleanup_ |
float | expectedMean_ [3] |
float | expectedMeanPn_ [2] |
TProfile2D * | h01_ [36] |
TProfile2D * | h02_ [36] |
TProfile2D * | h03_ [36] |
TProfile * | i01_ [36] |
TProfile * | i02_ [36] |
int | ievt_ |
TProfile2D * | j01_ [36] |
TProfile2D * | j02_ [36] |
TProfile2D * | j03_ [36] |
int | jevt_ |
TProfile2D * | k01_ [36] |
TProfile2D * | k02_ [36] |
TProfile2D * | k03_ [36] |
MonitorElement * | meg01_ [36] |
MonitorElement * | meg02_ [36] |
MonitorElement * | meg03_ [36] |
MonitorElement * | meg04_ [36] |
MonitorElement * | meg05_ [36] |
MonitorElement * | mep01_ [36] |
MonitorElement * | mep02_ [36] |
MonitorElement * | mep03_ [36] |
MonitorElement * | mer01_ [36] |
MonitorElement * | mer02_ [36] |
MonitorElement * | mer03_ [36] |
MonitorElement * | mer04_ [36] |
MonitorElement * | mer05_ [36] |
MonitorElement * | mes01_ [36] |
MonitorElement * | mes02_ [36] |
MonitorElement * | mes03_ [36] |
MonitorElement * | met01_ [36] |
MonitorElement * | met02_ [36] |
MonitorElement * | met03_ [36] |
std::string | prefixME_ |
float | RMSThreshold_ [3] |
float | RMSThresholdPn_ [2] |
std::vector< int > | superModules_ |
bool | verbose_ |
Friends | |
class | EBSummaryClient |
Definition at line 31 of file EBPedestalClient.h.
EBPedestalClient::EBPedestalClient | ( | const edm::ParameterSet & | ps | ) |
Constructor.
Definition at line 43 of file EBPedestalClient.cc.
References cloneME_, debug_, discrepancyMean_, discrepancyMeanPn_, enableCleanup_, expectedMean_, expectedMeanPn_, edm::ParameterSet::getUntrackedParameter(), h01_, h02_, h03_, i, i01_, i02_, j01_, j02_, j03_, k01_, k02_, k03_, meg01_, meg02_, meg03_, meg04_, meg05_, mep01_, mep02_, mep03_, mer01_, mer02_, mer03_, mer04_, mer05_, mes01_, mes02_, mes03_, met01_, met02_, met03_, prefixME_, RMSThreshold_, RMSThresholdPn_, superModules_, and verbose_.
00043 { 00044 00045 // cloneME switch 00046 cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true); 00047 00048 // verbose switch 00049 verbose_ = ps.getUntrackedParameter<bool>("verbose", true); 00050 00051 // debug switch 00052 debug_ = ps.getUntrackedParameter<bool>("debug", false); 00053 00054 // prefixME path 00055 prefixME_ = ps.getUntrackedParameter<string>("prefixME", ""); 00056 00057 // enableCleanup_ switch 00058 enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false); 00059 00060 // vector of selected Super Modules (Defaults to all 36). 00061 superModules_.reserve(36); 00062 for ( unsigned int i = 1; i <= 36; i++ ) superModules_.push_back(i); 00063 superModules_ = ps.getUntrackedParameter<vector<int> >("superModules", superModules_); 00064 00065 for ( unsigned int i=0; i<superModules_.size(); i++ ) { 00066 00067 int ism = superModules_[i]; 00068 00069 h01_[ism-1] = 0; 00070 h02_[ism-1] = 0; 00071 h03_[ism-1] = 0; 00072 00073 j01_[ism-1] = 0; 00074 j02_[ism-1] = 0; 00075 j03_[ism-1] = 0; 00076 00077 k01_[ism-1] = 0; 00078 k02_[ism-1] = 0; 00079 k03_[ism-1] = 0; 00080 00081 i01_[ism-1] = 0; 00082 i02_[ism-1] = 0; 00083 00084 } 00085 00086 for ( unsigned int i=0; i<superModules_.size(); i++ ) { 00087 00088 int ism = superModules_[i]; 00089 00090 meg01_[ism-1] = 0; 00091 meg02_[ism-1] = 0; 00092 meg03_[ism-1] = 0; 00093 00094 meg04_[ism-1] = 0; 00095 meg05_[ism-1] = 0; 00096 00097 mep01_[ism-1] = 0; 00098 mep02_[ism-1] = 0; 00099 mep03_[ism-1] = 0; 00100 00101 mer01_[ism-1] = 0; 00102 mer02_[ism-1] = 0; 00103 mer03_[ism-1] = 0; 00104 00105 mer04_[ism-1] = 0; 00106 mer05_[ism-1] = 0; 00107 00108 mes01_[ism-1] = 0; 00109 mes02_[ism-1] = 0; 00110 mes03_[ism-1] = 0; 00111 00112 met01_[ism-1] = 0; 00113 met02_[ism-1] = 0; 00114 met03_[ism-1] = 0; 00115 00116 } 00117 00118 expectedMean_[0] = 200.0; 00119 expectedMean_[1] = 200.0; 00120 expectedMean_[2] = 200.0; 00121 00122 discrepancyMean_[0] = 25.0; 00123 discrepancyMean_[1] = 25.0; 00124 discrepancyMean_[2] = 25.0; 00125 00126 RMSThreshold_[0] = 1.0; 00127 RMSThreshold_[1] = 1.2; 00128 RMSThreshold_[2] = 2.0; 00129 00130 expectedMeanPn_[0] = 750.0; 00131 expectedMeanPn_[1] = 750.0; 00132 00133 discrepancyMeanPn_[0] = 100.0; 00134 discrepancyMeanPn_[1] = 100.0; 00135 00136 RMSThresholdPn_[0] = 1.0; 00137 RMSThresholdPn_[1] = 3.0; 00138 00139 }
EBPedestalClient::~EBPedestalClient | ( | ) | [virtual] |
Analyze.
Implements EBClient.
Definition at line 629 of file EBPedestalClient.cc.
References cloneME_, GenMuonPlsPt100GeV_cfg::cout, debug_, discrepancyMean_, discrepancyMeanPn_, dqmStore_, EcalBarrel, lat::endl(), expectedMean_, expectedMeanPn_, EcalErrorMask::fetchDataSet(), MonitorElement::Fill(), DQMStore::get(), UtilsClient::getBinStatistics(), LogicID::getEcalLogicID(), EcalLogicID::getLogicID(), EcalErrorDictionary::getMask(), h01_, h02_, h03_, histo, i, i01_, i02_, ievt_, Numbers::indexEB(), Numbers::iSM(), Numbers::iTT(), j, j01_, j02_, j03_, jevt_, k01_, k02_, k03_, m, UtilsClient::maskBinContent(), me, meg01_, meg02_, meg03_, meg04_, meg05_, mep01_, mep02_, mep03_, mer01_, mer02_, mer03_, mer04_, mer05_, mes01_, mes02_, mes03_, met01_, met02_, met03_, prefixME_, MonitorElement::Reset(), RMSThreshold_, RMSThresholdPn_, Numbers::sEB(), MonitorElement::setBinContent(), funct::sqrt(), and superModules_.
00629 { 00630 00631 ievt_++; 00632 jevt_++; 00633 if ( ievt_ % 10 == 0 ) { 00634 if ( debug_ ) cout << "EBPedestalClient: ievt/jevt = " << ievt_ << "/" << jevt_ << endl; 00635 } 00636 00637 uint64_t bits01 = 0; 00638 bits01 |= EcalErrorDictionary::getMask("PEDESTAL_LOW_GAIN_MEAN_WARNING"); 00639 bits01 |= EcalErrorDictionary::getMask("PEDESTAL_LOW_GAIN_RMS_WARNING"); 00640 bits01 |= EcalErrorDictionary::getMask("PEDESTAL_LOW_GAIN_MEAN_ERROR"); 00641 bits01 |= EcalErrorDictionary::getMask("PEDESTAL_LOW_GAIN_RMS_ERROR"); 00642 00643 uint64_t bits02 = 0; 00644 bits02 |= EcalErrorDictionary::getMask("PEDESTAL_MIDDLE_GAIN_MEAN_WARNING"); 00645 bits02 |= EcalErrorDictionary::getMask("PEDESTAL_MIDDLE_GAIN_RMS_WARNING"); 00646 bits02 |= EcalErrorDictionary::getMask("PEDESTAL_MIDDLE_GAIN_MEAN_ERROR"); 00647 bits02 |= EcalErrorDictionary::getMask("PEDESTAL_MIDDLE_GAIN_RMS_ERROR"); 00648 00649 uint64_t bits03 = 0; 00650 bits03 |= EcalErrorDictionary::getMask("PEDESTAL_HIGH_GAIN_MEAN_WARNING"); 00651 bits03 |= EcalErrorDictionary::getMask("PEDESTAL_HIGH_GAIN_RMS_WARNING"); 00652 bits03 |= EcalErrorDictionary::getMask("PEDESTAL_HIGH_GAIN_MEAN_ERROR"); 00653 bits03 |= EcalErrorDictionary::getMask("PEDESTAL_HIGH_GAIN_RMS_ERROR"); 00654 00655 map<EcalLogicID, RunCrystalErrorsDat> mask1; 00656 map<EcalLogicID, RunPNErrorsDat> mask2; 00657 map<EcalLogicID, RunTTErrorsDat> mask3; 00658 00659 EcalErrorMask::fetchDataSet(&mask1); 00660 EcalErrorMask::fetchDataSet(&mask2); 00661 EcalErrorMask::fetchDataSet(&mask3); 00662 00663 char histo[200]; 00664 00665 MonitorElement* me; 00666 00667 for ( unsigned int i=0; i<superModules_.size(); i++ ) { 00668 00669 int ism = superModules_[i]; 00670 00671 sprintf(histo, (prefixME_ + "/EBPedestalTask/Gain01/EBPT pedestal %s G01").c_str(), Numbers::sEB(ism).c_str()); 00672 me = dqmStore_->get(histo); 00673 h01_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h01_[ism-1] ); 00674 00675 sprintf(histo, (prefixME_ + "/EBPedestalTask/Gain06/EBPT pedestal %s G06").c_str(), Numbers::sEB(ism).c_str()); 00676 me = dqmStore_->get(histo); 00677 h02_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h02_[ism-1] ); 00678 00679 sprintf(histo, (prefixME_ + "/EBPedestalTask/Gain12/EBPT pedestal %s G12").c_str(), Numbers::sEB(ism).c_str()); 00680 me = dqmStore_->get(histo); 00681 h03_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h03_[ism-1] ); 00682 00683 sprintf(histo, (prefixME_ + "/EBPedestalTask/Gain01/EBPT pedestal 3sum %s G01").c_str(), Numbers::sEB(ism).c_str()); 00684 me = dqmStore_->get(histo); 00685 j01_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, j01_[ism-1] ); 00686 00687 sprintf(histo, (prefixME_ + "/EBPedestalTask/Gain06/EBPT pedestal 3sum %s G06").c_str(), Numbers::sEB(ism).c_str()); 00688 me = dqmStore_->get(histo); 00689 j02_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, j02_[ism-1] ); 00690 00691 sprintf(histo, (prefixME_ + "/EBPedestalTask/Gain12/EBPT pedestal 3sum %s G12").c_str(), Numbers::sEB(ism).c_str()); 00692 me = dqmStore_->get(histo); 00693 j03_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, j03_[ism-1] ); 00694 00695 sprintf(histo, (prefixME_ + "/EBPedestalTask/Gain01/EBPT pedestal 5sum %s G01").c_str(), Numbers::sEB(ism).c_str()); 00696 me = dqmStore_->get(histo); 00697 k01_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, k01_[ism-1] ); 00698 00699 sprintf(histo, (prefixME_ + "/EBPedestalTask/Gain06/EBPT pedestal 5sum %s G06").c_str(), Numbers::sEB(ism).c_str()); 00700 me = dqmStore_->get(histo); 00701 k02_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, k02_[ism-1] ); 00702 00703 sprintf(histo, (prefixME_ + "/EBPedestalTask/Gain12/EBPT pedestal 5sum %s G12").c_str(), Numbers::sEB(ism).c_str()); 00704 me = dqmStore_->get(histo); 00705 k03_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, k03_[ism-1] ); 00706 00707 sprintf(histo, (prefixME_ + "/EBPedestalTask/PN/Gain01/EBPDT PNs pedestal %s G01").c_str(), Numbers::sEB(ism).c_str()); 00708 me = dqmStore_->get(histo); 00709 i01_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i01_[ism-1] ); 00710 00711 sprintf(histo, (prefixME_ + "/EBPedestalTask/PN/Gain16/EBPDT PNs pedestal %s G16").c_str(), Numbers::sEB(ism).c_str()); 00712 me = dqmStore_->get(histo); 00713 i02_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i02_[ism-1] ); 00714 00715 if ( meg01_[ism-1] ) meg01_[ism-1]->Reset(); 00716 if ( meg02_[ism-1] ) meg02_[ism-1]->Reset(); 00717 if ( meg03_[ism-1] ) meg03_[ism-1]->Reset(); 00718 00719 if ( meg04_[ism-1] ) meg04_[ism-1]->Reset(); 00720 if ( meg05_[ism-1] ) meg05_[ism-1]->Reset(); 00721 00722 if ( mep01_[ism-1] ) mep01_[ism-1]->Reset(); 00723 if ( mep02_[ism-1] ) mep02_[ism-1]->Reset(); 00724 if ( mep03_[ism-1] ) mep03_[ism-1]->Reset(); 00725 00726 if ( mer01_[ism-1] ) mer01_[ism-1]->Reset(); 00727 if ( mer02_[ism-1] ) mer02_[ism-1]->Reset(); 00728 if ( mer03_[ism-1] ) mer03_[ism-1]->Reset(); 00729 00730 if ( mer04_[ism-1] ) mer04_[ism-1]->Reset(); 00731 if ( mer05_[ism-1] ) mer05_[ism-1]->Reset(); 00732 00733 if ( mes01_[ism-1] ) mes01_[ism-1]->Reset(); 00734 if ( mes02_[ism-1] ) mes02_[ism-1]->Reset(); 00735 if ( mes03_[ism-1] ) mes03_[ism-1]->Reset(); 00736 00737 if ( met01_[ism-1] ) met01_[ism-1]->Reset(); 00738 if ( met02_[ism-1] ) met02_[ism-1]->Reset(); 00739 if ( met03_[ism-1] ) met03_[ism-1]->Reset(); 00740 00741 for ( int ie = 1; ie <= 85; ie++ ) { 00742 for ( int ip = 1; ip <= 20; ip++ ) { 00743 00744 if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent(ie, ip, 2.); 00745 if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent(ie, ip, 2.); 00746 if ( meg03_[ism-1] ) meg03_[ism-1]->setBinContent(ie, ip, 2.); 00747 00748 bool update01; 00749 bool update02; 00750 bool update03; 00751 00752 float num01, num02, num03; 00753 float mean01, mean02, mean03; 00754 float rms01, rms02, rms03; 00755 00756 update01 = UtilsClient::getBinStatistics(h01_[ism-1], ie, ip, num01, mean01, rms01); 00757 update02 = UtilsClient::getBinStatistics(h02_[ism-1], ie, ip, num02, mean02, rms02); 00758 update03 = UtilsClient::getBinStatistics(h03_[ism-1], ie, ip, num03, mean03, rms03); 00759 00760 if ( update01 ) { 00761 00762 float val; 00763 00764 val = 1.; 00765 if ( fabs(mean01 - expectedMean_[0]) > discrepancyMean_[0] ) 00766 val = 0.; 00767 if ( rms01 > RMSThreshold_[0] ) 00768 val = 0.; 00769 if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent(ie, ip, val); 00770 00771 if ( mep01_[ism-1] ) mep01_[ism-1]->Fill(mean01); 00772 if ( mer01_[ism-1] ) mer01_[ism-1]->Fill(rms01); 00773 00774 } 00775 00776 if ( update02 ) { 00777 00778 float val; 00779 00780 val = 1.; 00781 if ( fabs(mean02 - expectedMean_[1]) > discrepancyMean_[1] ) 00782 val = 0.; 00783 if ( rms02 > RMSThreshold_[1] ) 00784 val = 0.; 00785 if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent(ie, ip, val); 00786 00787 if ( mep02_[ism-1] ) mep02_[ism-1]->Fill(mean02); 00788 if ( mer02_[ism-1] ) mer02_[ism-1]->Fill(rms02); 00789 00790 } 00791 00792 if ( update03 ) { 00793 00794 float val; 00795 00796 val = 1.; 00797 if ( fabs(mean03 - expectedMean_[2]) > discrepancyMean_[2] ) 00798 val = 0.; 00799 if ( rms03 > RMSThreshold_[2] ) 00800 val = 0.; 00801 if ( meg03_[ism-1] ) meg03_[ism-1]->setBinContent(ie, ip, val); 00802 00803 if ( mep03_[ism-1] ) mep03_[ism-1]->Fill(mean03); 00804 if ( mer03_[ism-1] ) mer03_[ism-1]->Fill(rms03); 00805 00806 } 00807 00808 // masking 00809 00810 if ( mask1.size() != 0 ) { 00811 map<EcalLogicID, RunCrystalErrorsDat>::const_iterator m; 00812 for (m = mask1.begin(); m != mask1.end(); m++) { 00813 00814 EcalLogicID ecid = m->first; 00815 00816 int ic = Numbers::indexEB(ism, ie, ip); 00817 00818 if ( ecid.getLogicID() == LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic).getLogicID() ) { 00819 if ( (m->second).getErrorBits() & bits01 ) { 00820 UtilsClient::maskBinContent( meg01_[ism-1], ie, ip ); 00821 } 00822 if ( (m->second).getErrorBits() & bits02 ) { 00823 UtilsClient::maskBinContent( meg02_[ism-1], ie, ip ); 00824 } 00825 if ( (m->second).getErrorBits() & bits03 ) { 00826 UtilsClient::maskBinContent( meg03_[ism-1], ie, ip ); 00827 } 00828 } 00829 00830 } 00831 } 00832 00833 // TT masking 00834 00835 if ( mask3.size() != 0 ) { 00836 map<EcalLogicID, RunTTErrorsDat>::const_iterator m; 00837 for (m = mask3.begin(); m != mask3.end(); m++) { 00838 00839 EcalLogicID ecid = m->first; 00840 00841 int itt = Numbers::iTT(ism, EcalBarrel, ie, ip); 00842 00843 if ( ecid.getLogicID() == LogicID::getEcalLogicID("EB_trigger_tower", Numbers::iSM(ism, EcalBarrel), itt).getLogicID() ) { 00844 if ( (m->second).getErrorBits() & bits01 ) { 00845 UtilsClient::maskBinContent( meg01_[ism-1], ie, ip ); 00846 } 00847 if ( (m->second).getErrorBits() & bits02 ) { 00848 UtilsClient::maskBinContent( meg02_[ism-1], ie, ip ); 00849 } 00850 if ( (m->second).getErrorBits() & bits03 ) { 00851 UtilsClient::maskBinContent( meg03_[ism-1], ie, ip ); 00852 } 00853 } 00854 00855 } 00856 } 00857 00858 } 00859 } 00860 00861 // PN diodes 00862 00863 for ( int i = 1; i <= 10; i++ ) { 00864 00865 if ( meg04_[ism-1] ) meg04_[ism-1]->setBinContent( i, 1, 2. ); 00866 if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent( i, 1, 2. ); 00867 00868 bool update01; 00869 bool update02; 00870 00871 float num01, num02; 00872 float mean01, mean02; 00873 float rms01, rms02; 00874 00875 update01 = UtilsClient::getBinStatistics(i01_[ism-1], i, 0, num01, mean01, rms01); 00876 update02 = UtilsClient::getBinStatistics(i02_[ism-1], i, 0, num02, mean02, rms02); 00877 00878 // filling projections 00879 if ( mer04_[ism-1] ) mer04_[ism-1]->Fill(rms01); 00880 if ( mer05_[ism-1] ) mer05_[ism-1]->Fill(rms02); 00881 00882 00883 if ( update01 ) { 00884 00885 float val; 00886 00887 val = 1.; 00888 if ( mean01 < (expectedMeanPn_[0] - discrepancyMeanPn_[0]) 00889 || (expectedMeanPn_[0] + discrepancyMeanPn_[0]) < mean01) 00890 val = 0.; 00891 if ( rms01 > RMSThresholdPn_[0]) 00892 val = 0.; 00893 00894 if ( meg04_[ism-1] ) meg04_[ism-1]->setBinContent(i, 1, val); 00895 } 00896 00897 if ( update02 ) { 00898 00899 float val; 00900 00901 val = 1.; 00902 if ( mean02 < (expectedMeanPn_[1] - discrepancyMeanPn_[1]) 00903 || (expectedMeanPn_[1] + discrepancyMeanPn_[1]) < mean02) 00904 val = 0.; 00905 if ( rms02 > RMSThresholdPn_[1]) 00906 val = 0.; 00907 00908 if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent(i, 1, val); 00909 } 00910 00911 00912 // masking 00913 00914 if ( mask2.size() != 0 ) { 00915 map<EcalLogicID, RunPNErrorsDat>::const_iterator m; 00916 for (m = mask2.begin(); m != mask2.end(); m++) { 00917 00918 EcalLogicID ecid = m->first; 00919 00920 if ( ecid.getLogicID() == LogicID::getEcalLogicID("EB_LM_PN", Numbers::iSM(ism, EcalBarrel), i-1).getLogicID() ) { 00921 if ( (m->second).getErrorBits() & bits01 ) { 00922 UtilsClient::maskBinContent( meg04_[ism-1], i, 1 ); 00923 } 00924 if ( (m->second).getErrorBits() & bits03 ) { 00925 UtilsClient::maskBinContent( meg05_[ism-1], i, 1 ); 00926 } 00927 } 00928 00929 } 00930 } 00931 00932 } 00933 00934 00935 for ( int ie = 1; ie <= 85; ie++ ) { 00936 for ( int ip = 1; ip <= 20; ip++ ) { 00937 00938 float x3val01; 00939 float x3val02; 00940 float x3val03; 00941 00942 float y3val01; 00943 float y3val02; 00944 float y3val03; 00945 00946 float z3val01; 00947 float z3val02; 00948 float z3val03; 00949 00950 float x5val01; 00951 float x5val02; 00952 float x5val03; 00953 00954 float y5val01; 00955 float y5val02; 00956 float y5val03; 00957 00958 float z5val01; 00959 float z5val02; 00960 float z5val03; 00961 00962 if ( mes01_[ism-1] ) mes01_[ism-1]->setBinContent(ie, ip, -999.); 00963 if ( mes02_[ism-1] ) mes02_[ism-1]->setBinContent(ie, ip, -999.); 00964 if ( mes03_[ism-1] ) mes03_[ism-1]->setBinContent(ie, ip, -999.); 00965 00966 if ( met01_[ism-1] ) met01_[ism-1]->setBinContent(ie, ip, -999.); 00967 if ( met02_[ism-1] ) met02_[ism-1]->setBinContent(ie, ip, -999.); 00968 if ( met03_[ism-1] ) met03_[ism-1]->setBinContent(ie, ip, -999.); 00969 00970 if ( ie >= 2 && ie <= 84 && ip >= 2 && ip <= 19 ) { 00971 00972 x3val01 = 0.; 00973 x3val02 = 0.; 00974 x3val03 = 0.; 00975 for ( int i = -1; i <= +1; i++ ) { 00976 for ( int j = -1; j <= +1; j++ ) { 00977 00978 if ( h01_[ism-1] ) x3val01 = x3val01 + h01_[ism-1]->GetBinError(ie+i, ip+j) * 00979 h01_[ism-1]->GetBinError(ie+i, ip+j); 00980 00981 if ( h02_[ism-1] ) x3val02 = x3val02 + h02_[ism-1]->GetBinError(ie+i, ip+j) * 00982 h02_[ism-1]->GetBinError(ie+i, ip+j); 00983 00984 if ( h03_[ism-1] ) x3val03 = x3val03 + h03_[ism-1]->GetBinError(ie+i, ip+j) * 00985 h03_[ism-1]->GetBinError(ie+i, ip+j); 00986 00987 } 00988 } 00989 x3val01 = x3val01 / (9.*9.); 00990 x3val02 = x3val02 / (9.*9.); 00991 x3val03 = x3val03 / (9.*9.); 00992 00993 y3val01 = 0.; 00994 if ( j01_[ism-1] ) y3val01 = j01_[ism-1]->GetBinError(ie, ip) * 00995 j01_[ism-1]->GetBinError(ie, ip); 00996 00997 y3val02 = 0.; 00998 if ( j02_[ism-1] ) y3val02 = j02_[ism-1]->GetBinError(ie, ip) * 00999 j02_[ism-1]->GetBinError(ie, ip); 01000 01001 y3val03 = 0.; 01002 if ( j03_[ism-1] ) y3val03 = j03_[ism-1]->GetBinError(ie, ip) * 01003 j03_[ism-1]->GetBinError(ie, ip); 01004 01005 z3val01 = -999.; 01006 if ( x3val01 != 0 && y3val01 != 0 ) z3val01 = sqrt(fabs(x3val01 - y3val01)); 01007 if ( (x3val01 - y3val01) < 0 ) z3val01 = -z3val01; 01008 01009 if ( mes01_[ism-1] ) mes01_[ism-1]->setBinContent(ie, ip, z3val01); 01010 01011 z3val02 = -999.; 01012 if ( x3val02 != 0 && y3val02 != 0 ) z3val02 = sqrt(fabs(x3val02 - y3val02)); 01013 if ( (x3val02 - y3val02) < 0 ) z3val02 = -z3val02; 01014 01015 if ( mes02_[ism-1] ) mes02_[ism-1]->setBinContent(ie, ip, z3val02); 01016 01017 z3val03 = -999.; 01018 if ( x3val03 != 0 && y3val03 != 0 ) z3val03 = sqrt(fabs(x3val03 - y3val03)); 01019 if ( (x3val03 - y3val03) < 0 ) z3val03 = -z3val03; 01020 01021 if ( mes03_[ism-1] ) mes03_[ism-1]->setBinContent(ie, ip, z3val03); 01022 01023 } 01024 01025 if ( ie >= 3 && ie <= 83 && ip >= 3 && ip <= 18 ) { 01026 01027 x5val01 = 0.; 01028 x5val02 = 0.; 01029 x5val03 = 0.; 01030 for ( int i = -2; i <= +2; i++ ) { 01031 for ( int j = -2; j <= +2; j++ ) { 01032 01033 if ( h01_[ism-1] ) x5val01 = x5val01 + h01_[ism-1]->GetBinError(ie+i, ip+j) * 01034 h01_[ism-1]->GetBinError(ie+i, ip+j); 01035 01036 if ( h02_[ism-1] ) x5val02 = x5val02 + h02_[ism-1]->GetBinError(ie+i, ip+j) * 01037 h02_[ism-1]->GetBinError(ie+i, ip+j); 01038 01039 if ( h03_[ism-1] ) x5val03 = x5val03 + h03_[ism-1]->GetBinError(ie+i, ip+j) * 01040 h03_[ism-1]->GetBinError(ie+i, ip+j); 01041 01042 } 01043 } 01044 x5val01 = x5val01 / (25.*25.); 01045 x5val02 = x5val02 / (25.*25.); 01046 x5val03 = x5val03 / (25.*25.); 01047 01048 y5val01 = 0.; 01049 if ( k01_[ism-1] ) y5val01 = k01_[ism-1]->GetBinError(ie, ip) * 01050 k01_[ism-1]->GetBinError(ie, ip); 01051 01052 y5val02 = 0.; 01053 if ( k02_[ism-1] ) y5val02 = k02_[ism-1]->GetBinError(ie, ip) * 01054 k02_[ism-1]->GetBinError(ie, ip); 01055 01056 y5val03 = 0.; 01057 if ( k03_[ism-1] ) y5val03 = k03_[ism-1]->GetBinError(ie, ip) * 01058 k03_[ism-1]->GetBinError(ie, ip); 01059 01060 z5val01 = -999.; 01061 if ( x5val01 != 0 && y5val01 != 0 ) z5val01 = sqrt(fabs(x5val01 - y5val01)); 01062 if ( (x5val01 - y5val01) < 0 ) z5val01 = -z5val01; 01063 01064 if ( met01_[ism-1] ) met01_[ism-1]->setBinContent(ie, ip, z5val01); 01065 01066 z5val02 = -999.; 01067 if ( x5val02 != 0 && y5val02 != 0 ) z5val02 = sqrt(fabs(x5val02 - y5val02)); 01068 if ( (x5val02 - y5val02) < 0 ) z5val02 = -z5val02; 01069 01070 if ( met02_[ism-1] ) met02_[ism-1]->setBinContent(ie, ip, z5val02); 01071 01072 z5val03 = -999.; 01073 if ( x5val03 != 0 && y5val03 != 0 ) z5val03 = sqrt(fabs(x5val03 - y5val03)); 01074 if ( (x5val03 - y5val03) < 0 ) z5val03 = -z5val03; 01075 01076 if ( met03_[ism-1] ) met03_[ism-1]->setBinContent(ie, ip, z5val03); 01077 01078 } 01079 01080 } 01081 } 01082 01083 } 01084 01085 }
begin of job method
Implements EBClient.
Definition at line 145 of file EBPedestalClient.cc.
References GenMuonPlsPt100GeV_cfg::cout, debug_, dqmStore_, lat::endl(), ievt_, and jevt_.
00145 { 00146 00147 dqmStore_ = dqmStore; 00148 00149 if ( debug_ ) cout << "EBPedestalClient: beginJob" << endl; 00150 00151 ievt_ = 0; 00152 jevt_ = 0; 00153 00154 }
begin of run method
Implements EBClient.
Definition at line 156 of file EBPedestalClient.cc.
References GenMuonPlsPt100GeV_cfg::cout, debug_, lat::endl(), jevt_, and setup().
00156 { 00157 00158 if ( debug_ ) cout << "EBPedestalClient: beginRun" << endl; 00159 00160 jevt_ = 0; 00161 00162 this->setup(); 00163 00164 }
clean up method
Implements EBClient.
Definition at line 353 of file EBPedestalClient.cc.
References cloneME_, dqmStore_, enableCleanup_, edm::getName(), h01_, h02_, h03_, i, i01_, i02_, j01_, j02_, j03_, k01_, k02_, k03_, meg01_, meg02_, meg03_, meg04_, meg05_, mep01_, mep02_, mep03_, mer01_, mer02_, mer03_, mer04_, mer05_, mes01_, mes02_, mes03_, met01_, met02_, met03_, prefixME_, DQMStore::removeElement(), DQMStore::setCurrentFolder(), and superModules_.
Referenced by endJob(), and endRun().
00353 { 00354 00355 if ( ! enableCleanup_ ) return; 00356 00357 for ( unsigned int i=0; i<superModules_.size(); i++ ) { 00358 00359 int ism = superModules_[i]; 00360 00361 if ( cloneME_ ) { 00362 if ( h01_[ism-1] ) delete h01_[ism-1]; 00363 if ( h02_[ism-1] ) delete h02_[ism-1]; 00364 if ( h03_[ism-1] ) delete h03_[ism-1]; 00365 00366 if ( j01_[ism-1] ) delete j01_[ism-1]; 00367 if ( j02_[ism-1] ) delete j02_[ism-1]; 00368 if ( j03_[ism-1] ) delete j03_[ism-1]; 00369 00370 if ( k01_[ism-1] ) delete k01_[ism-1]; 00371 if ( k02_[ism-1] ) delete k02_[ism-1]; 00372 if ( k03_[ism-1] ) delete k03_[ism-1]; 00373 00374 if ( i01_[ism-1] ) delete i01_[ism-1]; 00375 if ( i02_[ism-1] ) delete i02_[ism-1]; 00376 } 00377 00378 h01_[ism-1] = 0; 00379 h02_[ism-1] = 0; 00380 h03_[ism-1] = 0; 00381 00382 j01_[ism-1] = 0; 00383 j02_[ism-1] = 0; 00384 j03_[ism-1] = 0; 00385 00386 k01_[ism-1] = 0; 00387 k02_[ism-1] = 0; 00388 k03_[ism-1] = 0; 00389 00390 i01_[ism-1] = 0; 00391 i02_[ism-1] = 0; 00392 00393 } 00394 00395 dqmStore_->setCurrentFolder( prefixME_ + "/EBPedestalClient" ); 00396 00397 for ( unsigned int i=0; i<superModules_.size(); i++ ) { 00398 00399 int ism = superModules_[i]; 00400 00401 if ( meg01_[ism-1] ) dqmStore_->removeElement( meg01_[ism-1]->getName() ); 00402 meg01_[ism-1] = 0; 00403 if ( meg02_[ism-1] ) dqmStore_->removeElement( meg02_[ism-1]->getName() ); 00404 meg02_[ism-1] = 0; 00405 if ( meg03_[ism-1] ) dqmStore_->removeElement( meg03_[ism-1]->getName() ); 00406 meg03_[ism-1] = 0; 00407 00408 if ( meg04_[ism-1] ) dqmStore_->removeElement( meg04_[ism-1]->getName() ); 00409 meg04_[ism-1] = 0; 00410 if ( meg05_[ism-1] ) dqmStore_->removeElement( meg05_[ism-1]->getName() ); 00411 meg05_[ism-1] = 0; 00412 00413 if ( mep01_[ism-1] ) dqmStore_->removeElement( mep01_[ism-1]->getName() ); 00414 mep01_[ism-1] = 0; 00415 if ( mep02_[ism-1] ) dqmStore_->removeElement( mep02_[ism-1]->getName() ); 00416 mep02_[ism-1] = 0; 00417 if ( mep03_[ism-1] ) dqmStore_->removeElement( mep03_[ism-1]->getName() ); 00418 mep03_[ism-1] = 0; 00419 00420 if ( mer01_[ism-1] ) dqmStore_->removeElement( mer01_[ism-1]->getName() ); 00421 mer01_[ism-1] = 0; 00422 if ( mer02_[ism-1] ) dqmStore_->removeElement( mer02_[ism-1]->getName() ); 00423 mer02_[ism-1] = 0; 00424 if ( mer03_[ism-1] ) dqmStore_->removeElement( mer03_[ism-1]->getName() ); 00425 mer03_[ism-1] = 0; 00426 00427 if ( mer04_[ism-1] ) dqmStore_->removeElement( mer04_[ism-1]->getName() ); 00428 mer04_[ism-1] = 0; 00429 if ( mer05_[ism-1] ) dqmStore_->removeElement( mer05_[ism-1]->getName() ); 00430 mer05_[ism-1] = 0; 00431 00432 if ( mes01_[ism-1] ) dqmStore_->removeElement( mes01_[ism-1]->getName() ); 00433 mes01_[ism-1] = 0; 00434 if ( mes02_[ism-1] ) dqmStore_->removeElement( mes02_[ism-1]->getName() ); 00435 mes02_[ism-1] = 0; 00436 if ( mes03_[ism-1] ) dqmStore_->removeElement( mes03_[ism-1]->getName() ); 00437 mes03_[ism-1] = 0; 00438 00439 if ( met01_[ism-1] ) dqmStore_->removeElement( met01_[ism-1]->getName() ); 00440 met01_[ism-1] = 0; 00441 if ( met02_[ism-1] ) dqmStore_->removeElement( met02_[ism-1]->getName() ); 00442 met02_[ism-1] = 0; 00443 if ( met03_[ism-1] ) dqmStore_->removeElement( met03_[ism-1]->getName() ); 00444 met03_[ism-1] = 0; 00445 00446 } 00447 00448 }
end of job method
Implements EBClient.
Definition at line 166 of file EBPedestalClient.cc.
References cleanup(), GenMuonPlsPt100GeV_cfg::cout, debug_, lat::endl(), and ievt_.
00166 { 00167 00168 if ( debug_ ) cout << "EBPedestalClient: endJob, ievt = " << ievt_ << endl; 00169 00170 this->cleanup(); 00171 00172 }
end of run method
Implements EBClient.
Definition at line 174 of file EBPedestalClient.cc.
References cleanup(), GenMuonPlsPt100GeV_cfg::cout, debug_, lat::endl(), and jevt_.
00174 { 00175 00176 if ( debug_ ) cout << "EBPedestalClient: endRun, jevt = " << jevt_ << endl; 00177 00178 this->cleanup(); 00179 00180 }
Get Functions.
Implements EBClient.
Definition at line 74 of file EBPedestalClient.h.
References ievt_.
00074 { return ievt_; }
void EBPedestalClient::htmlOutput | ( | int | run, | |
std::string & | htmlDir, | |||
std::string & | htmlName | |||
) | [virtual] |
create HTML page
run | run number | |
htmlDir | path to HTML file | |
htmlName | HTML file name |
Implements EBClient.
Setup.
Implements EBClient.
Definition at line 182 of file EBPedestalClient.cc.
References DQMStore::book1D(), DQMStore::book2D(), dqmStore_, edm::getName(), histo, i, meg01_, meg02_, meg03_, meg04_, meg05_, mep01_, mep02_, mep03_, mer01_, mer02_, mer03_, mer04_, mer05_, mes01_, mes02_, mes03_, met01_, met02_, met03_, prefixME_, DQMStore::removeElement(), MonitorElement::Reset(), Numbers::sEB(), MonitorElement::setAxisTitle(), MonitorElement::setBinContent(), DQMStore::setCurrentFolder(), and superModules_.
Referenced by beginRun().
00182 { 00183 00184 char histo[200]; 00185 00186 dqmStore_->setCurrentFolder( prefixME_ + "/EBPedestalClient" ); 00187 00188 for ( unsigned int i=0; i<superModules_.size(); i++ ) { 00189 00190 int ism = superModules_[i]; 00191 00192 if ( meg01_[ism-1] ) dqmStore_->removeElement( meg01_[ism-1]->getName() ); 00193 sprintf(histo, "EBPT pedestal quality G01 %s", Numbers::sEB(ism).c_str()); 00194 meg01_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.); 00195 meg01_[ism-1]->setAxisTitle("ieta", 1); 00196 meg01_[ism-1]->setAxisTitle("iphi", 2); 00197 if ( meg02_[ism-1] ) dqmStore_->removeElement( meg02_[ism-1]->getName() ); 00198 sprintf(histo, "EBPT pedestal quality G06 %s", Numbers::sEB(ism).c_str()); 00199 meg02_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.); 00200 meg02_[ism-1]->setAxisTitle("ieta", 1); 00201 meg02_[ism-1]->setAxisTitle("iphi", 2); 00202 if ( meg03_[ism-1] ) dqmStore_->removeElement( meg03_[ism-1]->getName() ); 00203 sprintf(histo, "EBPT pedestal quality G12 %s", Numbers::sEB(ism).c_str()); 00204 meg03_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.); 00205 meg03_[ism-1]->setAxisTitle("ieta", 1); 00206 meg03_[ism-1]->setAxisTitle("iphi", 2); 00207 00208 if ( meg04_[ism-1] ) dqmStore_->removeElement( meg04_[ism-1]->getName() ); 00209 sprintf(histo, "EBPT pedestal quality PNs G01 %s", Numbers::sEB(ism).c_str()); 00210 meg04_[ism-1] = dqmStore_->book2D(histo, histo, 10, 0., 10., 1, 0., 5.); 00211 meg04_[ism-1]->setAxisTitle("pseudo-strip", 1); 00212 meg04_[ism-1]->setAxisTitle("channel", 2); 00213 if ( meg05_[ism-1] ) dqmStore_->removeElement( meg05_[ism-1]->getName() ); 00214 sprintf(histo, "EBPT pedestal quality PNs G16 %s", Numbers::sEB(ism).c_str()); 00215 meg05_[ism-1] = dqmStore_->book2D(histo, histo, 10, 0., 10., 1, 0., 5.); 00216 meg05_[ism-1]->setAxisTitle("pseudo-strip", 1); 00217 meg05_[ism-1]->setAxisTitle("channel", 2); 00218 00219 if ( mep01_[ism-1] ) dqmStore_->removeElement( mep01_[ism-1]->getName() ); 00220 sprintf(histo, "EBPT pedestal mean G01 %s", Numbers::sEB(ism).c_str()); 00221 mep01_[ism-1] = dqmStore_->book1D(histo, histo, 100, 150., 250.); 00222 mep01_[ism-1]->setAxisTitle("mean", 1); 00223 if ( mep02_[ism-1] ) dqmStore_->removeElement( mep02_[ism-1]->getName() ); 00224 sprintf(histo, "EBPT pedestal mean G06 %s", Numbers::sEB(ism).c_str()); 00225 mep02_[ism-1] = dqmStore_->book1D(histo, histo, 100, 150., 250.); 00226 mep02_[ism-1]->setAxisTitle("mean", 1); 00227 if ( mep03_[ism-1] ) dqmStore_->removeElement( mep03_[ism-1]->getName() ); 00228 sprintf(histo, "EBPT pedestal mean G12 %s", Numbers::sEB(ism).c_str()); 00229 mep03_[ism-1] = dqmStore_->book1D(histo, histo, 100, 150., 250.); 00230 mep03_[ism-1]->setAxisTitle("mean", 1); 00231 00232 if ( mer01_[ism-1] ) dqmStore_->removeElement( mer01_[ism-1]->getName() ); 00233 sprintf(histo, "EBPT pedestal rms G01 %s", Numbers::sEB(ism).c_str()); 00234 mer01_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.); 00235 mer01_[ism-1]->setAxisTitle("rms", 1); 00236 if ( mer02_[ism-1] ) dqmStore_->removeElement( mer02_[ism-1]->getName() ); 00237 sprintf(histo, "EBPT pedestal rms G06 %s", Numbers::sEB(ism).c_str()); 00238 mer02_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.); 00239 mer02_[ism-1]->setAxisTitle("rms", 1); 00240 if ( mer03_[ism-1] ) dqmStore_->removeElement( mer03_[ism-1]->getName() ); 00241 sprintf(histo, "EBPT pedestal rms G12 %s", Numbers::sEB(ism).c_str()); 00242 mer03_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.); 00243 mer03_[ism-1]->setAxisTitle("rms", 1); 00244 00245 if ( mer04_[ism-1] ) dqmStore_->removeElement( mer04_[ism-1]->getName() ); 00246 sprintf(histo, "EBPDT PNs pedestal rms %s G01", Numbers::sEB(ism).c_str()); 00247 mer04_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.); 00248 mer04_[ism-1]->setAxisTitle("rms", 1); 00249 if ( mer05_[ism-1] ) dqmStore_->removeElement( mer05_[ism-1]->getName() ); 00250 sprintf(histo, "EBPDT PNs pedestal rms %s G16", Numbers::sEB(ism).c_str()); 00251 mer05_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.); 00252 mer05_[ism-1]->setAxisTitle("rms", 1); 00253 00254 if ( mes01_[ism-1] ) dqmStore_->removeElement( mes01_[ism-1]->getName() ); 00255 sprintf(histo, "EBPT pedestal 3sum G01 %s", Numbers::sEB(ism).c_str()); 00256 mes01_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.); 00257 mes01_[ism-1]->setAxisTitle("ieta", 1); 00258 mes01_[ism-1]->setAxisTitle("iphi", 2); 00259 if ( mes02_[ism-1] ) dqmStore_->removeElement( mes02_[ism-1]->getName() ); 00260 sprintf(histo, "EBPT pedestal 3sum G06 %s", Numbers::sEB(ism).c_str()); 00261 mes02_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.); 00262 mes02_[ism-1]->setAxisTitle("ieta", 1); 00263 mes02_[ism-1]->setAxisTitle("iphi", 2); 00264 if ( mes03_[ism-1] ) dqmStore_->removeElement( mes03_[ism-1]->getName() ); 00265 sprintf(histo, "EBPT pedestal 3sum G12 %s", Numbers::sEB(ism).c_str()); 00266 mes03_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.); 00267 mes03_[ism-1]->setAxisTitle("ieta", 1); 00268 mes03_[ism-1]->setAxisTitle("iphi", 2); 00269 00270 if ( met01_[ism-1] ) dqmStore_->removeElement( met01_[ism-1]->getName() ); 00271 sprintf(histo, "EBPT pedestal 5sum G01 %s", Numbers::sEB(ism).c_str()); 00272 met01_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.); 00273 met01_[ism-1]->setAxisTitle("ieta", 1); 00274 met01_[ism-1]->setAxisTitle("iphi", 2); 00275 if ( met02_[ism-1] ) dqmStore_->removeElement( met02_[ism-1]->getName() ); 00276 sprintf(histo, "EBPT pedestal 5sum G06 %s", Numbers::sEB(ism).c_str()); 00277 met02_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.); 00278 met02_[ism-1]->setAxisTitle("ieta", 1); 00279 met02_[ism-1]->setAxisTitle("iphi", 2); 00280 if ( met03_[ism-1] ) dqmStore_->removeElement( met03_[ism-1]->getName() ); 00281 sprintf(histo, "EBPT pedestal 5sum G12 %s", Numbers::sEB(ism).c_str()); 00282 met03_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.); 00283 met03_[ism-1]->setAxisTitle("ieta", 1); 00284 met03_[ism-1]->setAxisTitle("iphi", 2); 00285 00286 } 00287 00288 for ( unsigned int i=0; i<superModules_.size(); i++ ) { 00289 00290 int ism = superModules_[i]; 00291 00292 if ( meg01_[ism-1] ) meg01_[ism-1]->Reset(); 00293 if ( meg02_[ism-1] ) meg02_[ism-1]->Reset(); 00294 if ( meg03_[ism-1] ) meg03_[ism-1]->Reset(); 00295 00296 if ( meg04_[ism-1] ) meg04_[ism-1]->Reset(); 00297 if ( meg05_[ism-1] ) meg05_[ism-1]->Reset(); 00298 00299 for ( int ie = 1; ie <= 85; ie++ ) { 00300 for ( int ip = 1; ip <= 20; ip++ ) { 00301 00302 if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent( ie, ip, 2. ); 00303 if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent( ie, ip, 2. ); 00304 if ( meg03_[ism-1] ) meg03_[ism-1]->setBinContent( ie, ip, 2. ); 00305 00306 } 00307 } 00308 00309 for ( int i = 1; i <= 10; i++ ) { 00310 00311 if ( meg04_[ism-1] ) meg04_[ism-1]->setBinContent( i, 1, 2. ); 00312 if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent( i, 1, 2. ); 00313 00314 } 00315 00316 if ( mep01_[ism-1] ) mep01_[ism-1]->Reset(); 00317 if ( mep02_[ism-1] ) mep02_[ism-1]->Reset(); 00318 if ( mep03_[ism-1] ) mep03_[ism-1]->Reset(); 00319 00320 if ( mer01_[ism-1] ) mer01_[ism-1]->Reset(); 00321 if ( mer02_[ism-1] ) mer02_[ism-1]->Reset(); 00322 if ( mer03_[ism-1] ) mer03_[ism-1]->Reset(); 00323 00324 if ( mer04_[ism-1] ) mer04_[ism-1]->Reset(); 00325 if ( mer05_[ism-1] ) mer05_[ism-1]->Reset(); 00326 00327 if ( mes01_[ism-1] ) mes01_[ism-1]->Reset(); 00328 if ( mes02_[ism-1] ) mes02_[ism-1]->Reset(); 00329 if ( mes03_[ism-1] ) mes03_[ism-1]->Reset(); 00330 00331 if ( met01_[ism-1] ) met01_[ism-1]->Reset(); 00332 if ( met02_[ism-1] ) met02_[ism-1]->Reset(); 00333 if ( met03_[ism-1] ) met03_[ism-1]->Reset(); 00334 00335 for ( int ie = 1; ie <= 85; ie++ ) { 00336 for ( int ip = 1; ip <= 20; ip++ ) { 00337 00338 if ( mes01_[ism-1] ) mes01_[ism-1]->setBinContent( ie, ip, -999. ); 00339 if ( mes02_[ism-1] ) mes02_[ism-1]->setBinContent( ie, ip, -999. ); 00340 if ( mes03_[ism-1] ) mes03_[ism-1]->setBinContent( ie, ip, -999. ); 00341 00342 if ( met01_[ism-1] ) met01_[ism-1]->setBinContent( ie, ip, -999. ); 00343 if ( met02_[ism-1] ) met02_[ism-1]->setBinContent( ie, ip, -999. ); 00344 if ( met03_[ism-1] ) met03_[ism-1]->setBinContent( ie, ip, -999. ); 00345 00346 } 00347 } 00348 00349 } 00350 00351 }
bool EBPedestalClient::writeDb | ( | EcalCondDBInterface * | econn, | |
RunIOV * | runiov, | |||
MonRunIOV * | moniov, | |||
bool & | status, | |||
bool | flag | |||
) | [virtual] |
Write data to DataBase.
econn | DB interface | |
moniov | IOV interface | |
status | good or bad | |
flag | run with softReset or not |
Implements EBClient.
Definition at line 450 of file EBPedestalClient.cc.
References TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, e, EcalBarrel, lat::endl(), UtilsClient::getBinQuality(), UtilsClient::getBinStatistics(), UtilsClient::getBinStatus(), LogicID::getEcalLogicID(), h01_, h02_, h03_, i, i01_, i02_, Numbers::icEB(), Numbers::indexEB(), EcalCondDBInterface::insertDataArraySet(), Numbers::iSM(), meg01_, meg02_, meg03_, meg04_, meg05_, p, UtilsClient::printBadChannels(), Numbers::sEB(), MonPedestalsDat::setPedMeanG1(), MonPNPedDat::setPedMeanG1(), MonPedestalsDat::setPedMeanG12(), MonPNPedDat::setPedMeanG16(), MonPedestalsDat::setPedMeanG6(), MonPedestalsDat::setPedRMSG1(), MonPNPedDat::setPedRMSG1(), MonPedestalsDat::setPedRMSG12(), MonPNPedDat::setPedRMSG16(), MonPedestalsDat::setPedRMSG6(), MonPNPedDat::setTaskStatus(), MonPedestalsDat::setTaskStatus(), superModules_, and verbose_.
00450 { 00451 00452 status = true; 00453 00454 if ( ! flag ) return false; 00455 00456 EcalLogicID ecid; 00457 00458 MonPedestalsDat p; 00459 map<EcalLogicID, MonPedestalsDat> dataset1; 00460 00461 for ( unsigned int i=0; i<superModules_.size(); i++ ) { 00462 00463 int ism = superModules_[i]; 00464 00465 if ( verbose_ ) { 00466 cout << " " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl; 00467 cout << endl; 00468 UtilsClient::printBadChannels(meg01_[ism-1], h01_[ism-1]); 00469 UtilsClient::printBadChannels(meg02_[ism-1], h02_[ism-1]); 00470 UtilsClient::printBadChannels(meg03_[ism-1], h03_[ism-1]); 00471 } 00472 00473 for ( int ie = 1; ie <= 85; ie++ ) { 00474 for ( int ip = 1; ip <= 20; ip++ ) { 00475 00476 bool update01; 00477 bool update02; 00478 bool update03; 00479 00480 float num01, num02, num03; 00481 float mean01, mean02, mean03; 00482 float rms01, rms02, rms03; 00483 00484 update01 = UtilsClient::getBinStatistics(h01_[ism-1], ie, ip, num01, mean01, rms01); 00485 update02 = UtilsClient::getBinStatistics(h02_[ism-1], ie, ip, num02, mean02, rms02); 00486 update03 = UtilsClient::getBinStatistics(h03_[ism-1], ie, ip, num03, mean03, rms03); 00487 00488 if ( update01 || update02 || update03 ) { 00489 00490 if ( Numbers::icEB(ism, ie, ip) == 1 ) { 00491 00492 if ( verbose_ ) { 00493 cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl; 00494 cout << "G01 (" << ie << "," << ip << ") " << num01 << " " << mean01 << " " << rms01 << endl; 00495 cout << "G06 (" << ie << "," << ip << ") " << num02 << " " << mean02 << " " << rms02 << endl; 00496 cout << "G12 (" << ie << "," << ip << ") " << num03 << " " << mean03 << " " << rms03 << endl; 00497 cout << endl; 00498 } 00499 00500 } 00501 00502 p.setPedMeanG1(mean01); 00503 p.setPedRMSG1(rms01); 00504 00505 p.setPedMeanG6(mean02); 00506 p.setPedRMSG6(rms02); 00507 00508 p.setPedMeanG12(mean03); 00509 p.setPedRMSG12(rms03); 00510 00511 if ( UtilsClient::getBinStatus(meg01_[ism-1], ie, ip) && 00512 UtilsClient::getBinStatus(meg02_[ism-1], ie, ip) && 00513 UtilsClient::getBinStatus(meg03_[ism-1], ie, ip) ) { 00514 p.setTaskStatus(true); 00515 } else { 00516 p.setTaskStatus(false); 00517 } 00518 00519 status = status && UtilsClient::getBinQuality(meg01_[ism-1], ie, ip) && 00520 UtilsClient::getBinQuality(meg02_[ism-1], ie, ip) && 00521 UtilsClient::getBinQuality(meg03_[ism-1], ie, ip); 00522 00523 int ic = Numbers::indexEB(ism, ie, ip); 00524 00525 if ( econn ) { 00526 ecid = LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic); 00527 dataset1[ecid] = p; 00528 } 00529 00530 } 00531 00532 } 00533 } 00534 00535 } 00536 00537 if ( econn ) { 00538 try { 00539 if ( verbose_ ) cout << "Inserting MonPedestalsDat ..." << endl; 00540 if ( dataset1.size() != 0 ) econn->insertDataArraySet(&dataset1, moniov); 00541 if ( verbose_ ) cout << "done." << endl; 00542 } catch (runtime_error &e) { 00543 cerr << e.what() << endl; 00544 } 00545 } 00546 00547 if ( verbose_ ) cout << endl; 00548 00549 MonPNPedDat pn; 00550 map<EcalLogicID, MonPNPedDat> dataset2; 00551 00552 for ( unsigned int i=0; i<superModules_.size(); i++ ) { 00553 00554 int ism = superModules_[i]; 00555 00556 if ( verbose_ ) { 00557 cout << " " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl; 00558 cout << endl; 00559 UtilsClient::printBadChannels(meg04_[ism-1], i01_[ism-1]); 00560 UtilsClient::printBadChannels(meg05_[ism-1], i02_[ism-1]); 00561 } 00562 00563 for ( int i = 1; i <= 10; i++ ) { 00564 00565 bool update01; 00566 bool update02; 00567 00568 float num01, num02; 00569 float mean01, mean02; 00570 float rms01, rms02; 00571 00572 update01 = UtilsClient::getBinStatistics(i01_[ism-1], i, 0, num01, mean01, rms01); 00573 update02 = UtilsClient::getBinStatistics(i02_[ism-1], i, 0, num02, mean02, rms02); 00574 00575 if ( update01 || update02 ) { 00576 00577 if ( i == 1 ) { 00578 00579 if ( verbose_ ) { 00580 cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl; 00581 cout << "PNs (" << i << ") G01 " << num01 << " " << mean01 << " " << rms01 << endl; 00582 cout << "PNs (" << i << ") G16 " << num01 << " " << mean01 << " " << rms01 << endl; 00583 cout << endl; 00584 } 00585 00586 } 00587 00588 pn.setPedMeanG1(mean01); 00589 pn.setPedRMSG1(rms01); 00590 00591 pn.setPedMeanG16(mean02); 00592 pn.setPedRMSG16(rms02); 00593 00594 if ( UtilsClient::getBinStatus(meg04_[ism-1], i, 1) && 00595 UtilsClient::getBinStatus(meg05_[ism-1], i, 1) ) { 00596 pn.setTaskStatus(true); 00597 } else { 00598 pn.setTaskStatus(false); 00599 } 00600 00601 status = status && UtilsClient::getBinQuality(meg04_[ism-1], i, 1) && 00602 UtilsClient::getBinQuality(meg05_[ism-1], i, 1); 00603 00604 if ( econn ) { 00605 ecid = LogicID::getEcalLogicID("EB_LM_PN", Numbers::iSM(ism, EcalBarrel), i-1); 00606 dataset2[ecid] = pn; 00607 } 00608 00609 } 00610 00611 } 00612 00613 } 00614 00615 if ( econn ) { 00616 try { 00617 if ( verbose_ ) cout << "Inserting MonPNPedDat ..." << endl; 00618 if ( dataset2.size() != 0 ) econn->insertDataArraySet(&dataset2, moniov); 00619 if ( verbose_ ) cout << "done." << endl; 00620 } catch (runtime_error &e) { 00621 cerr << e.what() << endl; 00622 } 00623 } 00624 00625 return true; 00626 00627 }
friend class EBSummaryClient [friend] |
Definition at line 33 of file EBPedestalClient.h.
bool EBPedestalClient::cloneME_ [private] |
Definition at line 82 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), and EBPedestalClient().
bool EBPedestalClient::debug_ [private] |
Definition at line 85 of file EBPedestalClient.h.
Referenced by analyze(), beginJob(), beginRun(), EBPedestalClient(), endJob(), and endRun().
float EBPedestalClient::discrepancyMean_[3] [private] |
float EBPedestalClient::discrepancyMeanPn_[2] [private] |
DQMStore* EBPedestalClient::dqmStore_ [private] |
Definition at line 93 of file EBPedestalClient.h.
Referenced by analyze(), beginJob(), cleanup(), and setup().
bool EBPedestalClient::enableCleanup_ [private] |
float EBPedestalClient::expectedMean_[3] [private] |
float EBPedestalClient::expectedMeanPn_[2] [private] |
TProfile2D* EBPedestalClient::h01_[36] [private] |
Definition at line 95 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), and writeDb().
TProfile2D* EBPedestalClient::h02_[36] [private] |
Definition at line 96 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), and writeDb().
TProfile2D* EBPedestalClient::h03_[36] [private] |
Definition at line 97 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), and writeDb().
TProfile* EBPedestalClient::i01_[36] [private] |
Definition at line 133 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), and writeDb().
TProfile* EBPedestalClient::i02_[36] [private] |
Definition at line 134 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), and writeDb().
int EBPedestalClient::ievt_ [private] |
Definition at line 79 of file EBPedestalClient.h.
Referenced by analyze(), beginJob(), endJob(), and getEvtPerJob().
TProfile2D* EBPedestalClient::j01_[36] [private] |
Definition at line 99 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), and EBPedestalClient().
TProfile2D* EBPedestalClient::j02_[36] [private] |
Definition at line 100 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), and EBPedestalClient().
TProfile2D* EBPedestalClient::j03_[36] [private] |
Definition at line 101 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), and EBPedestalClient().
int EBPedestalClient::jevt_ [private] |
Definition at line 80 of file EBPedestalClient.h.
Referenced by analyze(), beginJob(), beginRun(), endRun(), and getEvtPerRun().
TProfile2D* EBPedestalClient::k01_[36] [private] |
Definition at line 103 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), and EBPedestalClient().
TProfile2D* EBPedestalClient::k02_[36] [private] |
Definition at line 104 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), and EBPedestalClient().
TProfile2D* EBPedestalClient::k03_[36] [private] |
Definition at line 105 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), and EBPedestalClient().
MonitorElement* EBPedestalClient::meg01_[36] [private] |
Definition at line 107 of file EBPedestalClient.h.
Referenced by EBSummaryClient::analyze(), analyze(), cleanup(), EBPedestalClient(), setup(), and writeDb().
MonitorElement* EBPedestalClient::meg02_[36] [private] |
Definition at line 108 of file EBPedestalClient.h.
Referenced by EBSummaryClient::analyze(), analyze(), cleanup(), EBPedestalClient(), setup(), and writeDb().
MonitorElement* EBPedestalClient::meg03_[36] [private] |
Definition at line 109 of file EBPedestalClient.h.
Referenced by EBSummaryClient::analyze(), analyze(), cleanup(), EBPedestalClient(), setup(), and writeDb().
MonitorElement* EBPedestalClient::meg04_[36] [private] |
Definition at line 111 of file EBPedestalClient.h.
Referenced by EBSummaryClient::analyze(), analyze(), cleanup(), EBPedestalClient(), setup(), and writeDb().
MonitorElement* EBPedestalClient::meg05_[36] [private] |
Definition at line 112 of file EBPedestalClient.h.
Referenced by EBSummaryClient::analyze(), analyze(), cleanup(), EBPedestalClient(), setup(), and writeDb().
MonitorElement* EBPedestalClient::mep01_[36] [private] |
Definition at line 114 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), and setup().
MonitorElement* EBPedestalClient::mep02_[36] [private] |
Definition at line 115 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), and setup().
MonitorElement* EBPedestalClient::mep03_[36] [private] |
Definition at line 116 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), and setup().
MonitorElement* EBPedestalClient::mer01_[36] [private] |
Definition at line 118 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), and setup().
MonitorElement* EBPedestalClient::mer02_[36] [private] |
Definition at line 119 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), and setup().
MonitorElement* EBPedestalClient::mer03_[36] [private] |
Definition at line 120 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), and setup().
MonitorElement* EBPedestalClient::mer04_[36] [private] |
Definition at line 122 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), and setup().
MonitorElement* EBPedestalClient::mer05_[36] [private] |
Definition at line 123 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), and setup().
MonitorElement* EBPedestalClient::mes01_[36] [private] |
Definition at line 125 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), and setup().
MonitorElement* EBPedestalClient::mes02_[36] [private] |
Definition at line 126 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), and setup().
MonitorElement* EBPedestalClient::mes03_[36] [private] |
Definition at line 127 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), and setup().
MonitorElement* EBPedestalClient::met01_[36] [private] |
Definition at line 129 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), and setup().
MonitorElement* EBPedestalClient::met02_[36] [private] |
Definition at line 130 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), and setup().
MonitorElement* EBPedestalClient::met03_[36] [private] |
Definition at line 131 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), and setup().
std::string EBPedestalClient::prefixME_ [private] |
Definition at line 87 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), and setup().
float EBPedestalClient::RMSThreshold_[3] [private] |
float EBPedestalClient::RMSThresholdPn_[2] [private] |
std::vector<int> EBPedestalClient::superModules_ [private] |
Definition at line 91 of file EBPedestalClient.h.
Referenced by analyze(), cleanup(), EBPedestalClient(), setup(), and writeDb().
bool EBPedestalClient::verbose_ [private] |