CMS 3D CMS Logo

EEOccupancyClient Class Reference

#include <DQM/EcalEndcapMonitorClient/interface/EEOccupancyClient.h>

Inheritance diagram for EEOccupancyClient:

EEClient

List of all members.

Public Member Functions

void analyze (void)
 Analyze.
void beginJob (DQMStore *dqmStore)
 BeginJob.
void beginRun (void)
 BeginRun.
void cleanup (void)
 Cleanup.
 EEOccupancyClient (const edm::ParameterSet &ps)
 Constructor.
void endJob (void)
 EndJob.
void endRun (void)
 EndRun.
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)
 HtmlOutput.
void setup (void)
 Setup.
void softReset (bool flag)
 SoftReset.
bool writeDb (EcalCondDBInterface *econn, RunIOV *runiov, MonRunIOV *moniov, bool &status, bool flag)
 WriteDB.
virtual ~EEOccupancyClient ()
 Destructor.

Private Attributes

bool cloneME_
bool debug_
DQMStoredqmStore_
bool enableCleanup_
TH2F * h01_ [2][3]
TH1F * h01ProjPhi_ [2][3]
TH1F * h01ProjR_ [2][3]
TH2F * h02_ [2][2]
TH1F * h02ProjPhi_ [2][2]
TH1F * h02ProjR_ [2][2]
int ievt_
int jevt_
std::string prefixME_
std::vector< intsuperModules_
bool verbose_

Friends

class EESummaryClient


Detailed Description

Definition at line 31 of file EEOccupancyClient.h.


Constructor & Destructor Documentation

EEOccupancyClient::EEOccupancyClient ( const edm::ParameterSet ps  ) 

Constructor.

Definition at line 36 of file EEOccupancyClient.cc.

References cloneME_, debug_, enableCleanup_, edm::ParameterSet::getUntrackedParameter(), h01_, h01ProjPhi_, h01ProjR_, h02_, h02ProjPhi_, h02ProjR_, i, prefixME_, superModules_, and verbose_.

00036                                                            {
00037 
00038   // cloneME switch
00039   cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
00040 
00041   // verbose switch
00042   verbose_ = ps.getUntrackedParameter<bool>("verbose", true);
00043 
00044   // debug switch
00045   debug_ = ps.getUntrackedParameter<bool>("debug", false);
00046 
00047   // prefixME path
00048   prefixME_ = ps.getUntrackedParameter<string>("prefixME", "");
00049 
00050   // enableCleanup_ switch
00051   enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
00052 
00053   // vector of selected Super Modules (Defaults to all 18).
00054   superModules_.reserve(18);
00055   for ( unsigned int i = 1; i <= 18; i++ ) superModules_.push_back(i);
00056   superModules_ = ps.getUntrackedParameter<vector<int> >("superModules", superModules_);
00057 
00058   for ( int i=0; i<3; i++) {
00059     h01_[0][i] = 0;
00060     h01ProjR_[0][i] = 0;
00061     h01ProjPhi_[0][i] = 0;
00062     h01_[1][i] = 0;
00063     h01ProjR_[1][i] = 0;
00064     h01ProjPhi_[1][i] = 0;
00065   }
00066 
00067   for ( int i=0; i<2; i++) {
00068     h02_[0][i] = 0;
00069     h02ProjR_[0][i] = 0;
00070     h02ProjPhi_[0][i] = 0;
00071     h02_[1][i] = 0;
00072     h02ProjR_[1][i] = 0;
00073     h02ProjPhi_[1][i] = 0;
00074   }
00075 
00076 }

EEOccupancyClient::~EEOccupancyClient (  )  [virtual]

Destructor.

Definition at line 78 of file EEOccupancyClient.cc.

00078                                       {
00079 
00080 }


Member Function Documentation

void EEOccupancyClient::analyze ( void   )  [virtual]

Analyze.

Implements EEClient.

Definition at line 181 of file EEOccupancyClient.cc.

References cloneME_, GenMuonPlsPt100GeV_cfg::cout, debug_, dqmStore_, lat::endl(), DQMStore::get(), h01_, h01ProjPhi_, h01ProjR_, h02_, h02ProjPhi_, h02ProjR_, histo, ievt_, jevt_, me, and prefixME_.

00181                                     {
00182 
00183   ievt_++;
00184   jevt_++;
00185   if ( ievt_ % 10 == 0 ) {
00186     if ( debug_ ) cout << "EEOccupancyClient: ievt/jevt = " << ievt_ << "/" << jevt_ << endl;
00187   }
00188 
00189   char histo[200];
00190 
00191   MonitorElement* me;
00192 
00193   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT digi occupancy EE -").c_str());
00194   me = dqmStore_->get(histo);
00195   h01_[0][0] = UtilsClient::getHisto<TH2F*> ( me, cloneME_, h01_[0][0] );
00196 
00197   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT digi occupancy EE - projection R").c_str());
00198   me = dqmStore_->get(histo);
00199   h01ProjR_[0][0] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjR_[0][0] );
00200 
00201   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT digi occupancy EE - projection phi").c_str());
00202   me = dqmStore_->get(histo);
00203   h01ProjPhi_[0][0] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjPhi_[0][0] );
00204 
00205   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT digi occupancy EE +").c_str());
00206   me = dqmStore_->get(histo);
00207   h01_[1][0] = UtilsClient::getHisto<TH2F*> ( me, cloneME_, h01_[1][0] );
00208 
00209   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT digi occupancy EE + projection R").c_str());
00210   me = dqmStore_->get(histo);
00211   h01ProjR_[1][0] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjR_[1][0] );
00212 
00213   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT digi occupancy EE + projection phi").c_str());
00214   me = dqmStore_->get(histo);
00215   h01ProjPhi_[1][0] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjPhi_[1][0] );
00216 
00217   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT rec hit occupancy EE -").c_str());
00218   me = dqmStore_->get(histo);
00219   h01_[0][1] = UtilsClient::getHisto<TH2F*> ( me, cloneME_, h01_[0][1] );
00220 
00221   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT rec hit occupancy EE - projection R").c_str());
00222   me = dqmStore_->get(histo);
00223   h01ProjR_[0][1] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjR_[0][1] );
00224 
00225   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT rec hit occupancy EE - projection phi").c_str());
00226   me = dqmStore_->get(histo);
00227   h01ProjPhi_[0][1] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjPhi_[0][1] );
00228 
00229   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT rec hit occupancy EE +").c_str());
00230   me = dqmStore_->get(histo);
00231   h01_[1][1] = UtilsClient::getHisto<TH2F*> ( me, cloneME_, h01_[1][1] );
00232 
00233   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT rec hit occupancy EE + projection R").c_str());
00234   me = dqmStore_->get(histo);
00235   h01ProjR_[1][1] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjR_[1][1] );
00236 
00237   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT rec hit occupancy EE + projection phi").c_str());
00238   me = dqmStore_->get(histo);
00239   h01ProjPhi_[1][1] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjPhi_[1][1] );
00240 
00241   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT TP digi occupancy EE -").c_str());
00242   me = dqmStore_->get(histo);
00243   h01_[0][2] = UtilsClient::getHisto<TH2F*> ( me, cloneME_, h01_[0][2] );
00244 
00245   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT TP digi occupancy EE - projection R").c_str());
00246   me = dqmStore_->get(histo);
00247   h01ProjR_[0][2] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjR_[0][2] );
00248 
00249   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT TP digi occupancy EE - projection phi").c_str());
00250   me = dqmStore_->get(histo);
00251   h01ProjPhi_[0][2] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjPhi_[0][2] );
00252 
00253   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT TP digi occupancy EE +").c_str());
00254   me = dqmStore_->get(histo);
00255   h01_[1][2] = UtilsClient::getHisto<TH2F*> ( me, cloneME_, h01_[1][2] );
00256 
00257   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT TP digi occupancy EE + projection R").c_str());
00258   me = dqmStore_->get(histo);
00259   h01ProjR_[1][2] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjR_[1][2] );
00260 
00261   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT TP digi occupancy EE + projection phi").c_str());
00262   me = dqmStore_->get(histo);
00263   h01ProjPhi_[1][2] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjPhi_[1][2] );
00264 
00265   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT rec hit thr occupancy EE -").c_str());
00266   me = dqmStore_->get(histo);
00267   h02_[0][0] = UtilsClient::getHisto<TH2F*> ( me, cloneME_, h02_[0][0] );
00268 
00269   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT rec hit thr occupancy EE - projection R").c_str());
00270   me = dqmStore_->get(histo);
00271   h02ProjR_[0][0] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h02ProjR_[0][0] );
00272 
00273   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT rec hit thr occupancy EE - projection phi").c_str());
00274   me = dqmStore_->get(histo);
00275   h02ProjPhi_[0][0] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h02ProjPhi_[0][0] );
00276 
00277   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT rec hit thr occupancy EE +").c_str());
00278   me = dqmStore_->get(histo);
00279   h02_[1][0] = UtilsClient::getHisto<TH2F*> ( me, cloneME_, h02_[1][0] );
00280 
00281   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT rec hit thr occupancy EE + projection R").c_str());
00282   me = dqmStore_->get(histo);
00283   h02ProjR_[1][0] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h02ProjR_[1][0] );
00284 
00285   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT rec hit thr occupancy EE + projection phi").c_str());
00286   me = dqmStore_->get(histo);
00287   h02ProjPhi_[1][0] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h02ProjPhi_[1][0] );
00288 
00289   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT TP digi thr occupancy EE -").c_str());
00290   me = dqmStore_->get(histo);
00291   h02_[0][1] = UtilsClient::getHisto<TH2F*> ( me, cloneME_, h02_[0][1] );
00292 
00293   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT TP digi thr occupancy EE - projection R").c_str());
00294   me = dqmStore_->get(histo);
00295   h02ProjR_[0][1] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h02ProjR_[0][1] );
00296 
00297   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT TP digi thr occupancy EE - projection phi").c_str());
00298   me = dqmStore_->get(histo);
00299   h02ProjPhi_[0][1] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h02ProjPhi_[0][1] );
00300 
00301   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT TP digi thr occupancy EE +").c_str());
00302   me = dqmStore_->get(histo);
00303   h02_[1][1] = UtilsClient::getHisto<TH2F*> ( me, cloneME_, h02_[1][1] );
00304 
00305   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT TP digi thr occupancy EE + projection R").c_str());
00306   me = dqmStore_->get(histo);
00307   h02ProjR_[1][1] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h02ProjR_[1][1] );
00308 
00309   sprintf(histo, (prefixME_ + "/EEOccupancyTask/EEOT TP digi thr occupancy EE + projection phi").c_str());
00310   me = dqmStore_->get(histo);
00311   h02ProjPhi_[1][1] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h02ProjPhi_[1][1] );
00312 
00313 }

void EEOccupancyClient::beginJob ( DQMStore dqmStore  )  [virtual]

BeginJob.

Implements EEClient.

Definition at line 82 of file EEOccupancyClient.cc.

References GenMuonPlsPt100GeV_cfg::cout, debug_, dqmStore_, lat::endl(), ievt_, and jevt_.

00082                                                    {
00083 
00084   dqmStore_ = dqmStore;
00085 
00086   if ( debug_ ) cout << "EEOccupancyClient: beginJob" << endl;
00087 
00088   ievt_ = 0;
00089   jevt_ = 0;
00090 
00091 }

void EEOccupancyClient::beginRun ( void   )  [virtual]

BeginRun.

Implements EEClient.

Definition at line 93 of file EEOccupancyClient.cc.

References GenMuonPlsPt100GeV_cfg::cout, debug_, lat::endl(), jevt_, and setup().

00093                                      {
00094 
00095   if ( debug_ ) cout << "EEOccupancyClient: beginRun" << endl;
00096 
00097   jevt_ = 0;
00098 
00099   this->setup();
00100 
00101 }

void EEOccupancyClient::cleanup ( void   )  [virtual]

Cleanup.

Implements EEClient.

Definition at line 125 of file EEOccupancyClient.cc.

References cloneME_, enableCleanup_, h01_, h01ProjPhi_, h01ProjR_, h02_, h02ProjPhi_, h02ProjR_, and i.

Referenced by endJob(), and endRun().

00125                                     {
00126 
00127   if ( ! enableCleanup_ ) return;
00128 
00129   if ( cloneME_ ) {
00130 
00131     for ( int i=0; i<3; ++i ) {
00132       if ( h01_[0][i] ) delete h01_[0][i];
00133       if ( h01ProjR_[0][i] ) delete h01ProjR_[0][i];
00134       if ( h01ProjPhi_[0][i] ) delete h01ProjPhi_[0][i];
00135       if ( h01_[1][i] ) delete h01_[1][i];
00136       if ( h01ProjR_[1][i] ) delete h01ProjR_[1][i];
00137       if ( h01ProjPhi_[1][i] ) delete h01ProjPhi_[1][i];
00138     }
00139 
00140     for ( int i=0; i<2; ++i ) {
00141       if ( h02_[0][i] ) delete h02_[0][i];
00142       if ( h02ProjR_[0][i] ) delete h02ProjR_[0][i];
00143       if ( h02ProjPhi_[0][i] ) delete h02ProjPhi_[0][i];
00144       if ( h01_[1][i] ) delete h01_[1][i];
00145       if ( h01ProjR_[1][i] ) delete h01ProjR_[1][i];
00146       if ( h01ProjPhi_[1][i] ) delete h01ProjPhi_[1][i];
00147     }
00148 
00149   }
00150 
00151   for ( int i=0; i<3; i++) {
00152     h01_[0][i] = 0;
00153     h01ProjR_[0][i] = 0;
00154     h01ProjPhi_[0][i] = 0;
00155     h01_[1][i] = 0;
00156     h01ProjR_[1][i] = 0;
00157     h01ProjPhi_[1][i] = 0;
00158   }
00159 
00160   for ( int i=0; i<2; i++) {
00161     h02_[0][i] = 0;
00162     h02ProjR_[0][i] = 0;
00163     h02ProjPhi_[0][i] = 0;
00164     h02_[1][i] = 0;
00165     h02ProjR_[1][i] = 0;
00166     h02ProjPhi_[1][i] = 0;
00167   }
00168 
00169 }

void EEOccupancyClient::endJob ( void   )  [virtual]

EndJob.

Implements EEClient.

Definition at line 103 of file EEOccupancyClient.cc.

References cleanup(), GenMuonPlsPt100GeV_cfg::cout, debug_, lat::endl(), and ievt_.

00103                                    {
00104 
00105   if ( debug_ ) cout << "EEOccupancyClient: endJob, ievt = " << ievt_ << endl;
00106 
00107   this->cleanup();
00108 
00109 }

void EEOccupancyClient::endRun ( void   )  [virtual]

EndRun.

Implements EEClient.

Definition at line 111 of file EEOccupancyClient.cc.

References cleanup(), GenMuonPlsPt100GeV_cfg::cout, debug_, lat::endl(), and jevt_.

00111                                    {
00112 
00113   if ( debug_ ) cout << "EEOccupancyClient: endRun, jevt = " << jevt_ << endl;
00114 
00115   this->cleanup();
00116 
00117 }

int EEOccupancyClient::getEvtPerJob ( void   )  [inline, virtual]

Get Functions.

Implements EEClient.

Definition at line 74 of file EEOccupancyClient.h.

References ievt_.

00074 { return ievt_; }

int EEOccupancyClient::getEvtPerRun ( void   )  [inline, virtual]

Returns the number of processed events in this Run.

Implements EEClient.

Definition at line 75 of file EEOccupancyClient.h.

References jevt_.

00075 { return jevt_; }

void EEOccupancyClient::htmlOutput ( int  run,
std::string &  htmlDir,
std::string &  htmlName 
) [virtual]

HtmlOutput.

Implements EEClient.

void EEOccupancyClient::setup ( void   )  [virtual]

Setup.

Implements EEClient.

Definition at line 119 of file EEOccupancyClient.cc.

References dqmStore_, prefixME_, and DQMStore::setCurrentFolder().

Referenced by beginRun().

00119                                   {
00120 
00121   dqmStore_->setCurrentFolder( prefixME_ + "/EEOccupancyClient" );
00122 
00123 }

void EEOccupancyClient::softReset ( bool  flag  )  [virtual]

SoftReset.

Implements EEClient.

Definition at line 315 of file EEOccupancyClient.cc.

00315                                            {
00316 
00317 }

bool EEOccupancyClient::writeDb ( EcalCondDBInterface econn,
RunIOV runiov,
MonRunIOV moniov,
bool status,
bool  flag 
) [virtual]

WriteDB.

Implements EEClient.

Definition at line 171 of file EEOccupancyClient.cc.

00171                                                                                                                       {
00172 
00173   status = true;
00174 
00175   if ( ! flag ) return false;
00176 
00177   return true;
00178 
00179 }


Friends And Related Function Documentation

friend class EESummaryClient [friend]

Definition at line 33 of file EEOccupancyClient.h.


Member Data Documentation

bool EEOccupancyClient::cloneME_ [private]

Definition at line 82 of file EEOccupancyClient.h.

Referenced by analyze(), cleanup(), and EEOccupancyClient().

bool EEOccupancyClient::debug_ [private]

Definition at line 85 of file EEOccupancyClient.h.

Referenced by analyze(), beginJob(), beginRun(), EEOccupancyClient(), endJob(), and endRun().

DQMStore* EEOccupancyClient::dqmStore_ [private]

Definition at line 93 of file EEOccupancyClient.h.

Referenced by analyze(), beginJob(), and setup().

bool EEOccupancyClient::enableCleanup_ [private]

Definition at line 89 of file EEOccupancyClient.h.

Referenced by cleanup(), and EEOccupancyClient().

TH2F* EEOccupancyClient::h01_[2][3] [private]

Definition at line 95 of file EEOccupancyClient.h.

Referenced by analyze(), cleanup(), and EEOccupancyClient().

TH1F* EEOccupancyClient::h01ProjPhi_[2][3] [private]

Definition at line 97 of file EEOccupancyClient.h.

Referenced by analyze(), cleanup(), and EEOccupancyClient().

TH1F* EEOccupancyClient::h01ProjR_[2][3] [private]

Definition at line 96 of file EEOccupancyClient.h.

Referenced by analyze(), cleanup(), and EEOccupancyClient().

TH2F* EEOccupancyClient::h02_[2][2] [private]

Definition at line 99 of file EEOccupancyClient.h.

Referenced by analyze(), cleanup(), and EEOccupancyClient().

TH1F* EEOccupancyClient::h02ProjPhi_[2][2] [private]

Definition at line 101 of file EEOccupancyClient.h.

Referenced by analyze(), cleanup(), and EEOccupancyClient().

TH1F* EEOccupancyClient::h02ProjR_[2][2] [private]

Definition at line 100 of file EEOccupancyClient.h.

Referenced by analyze(), cleanup(), and EEOccupancyClient().

int EEOccupancyClient::ievt_ [private]

Definition at line 79 of file EEOccupancyClient.h.

Referenced by analyze(), beginJob(), endJob(), and getEvtPerJob().

int EEOccupancyClient::jevt_ [private]

Definition at line 80 of file EEOccupancyClient.h.

Referenced by analyze(), beginJob(), beginRun(), endRun(), and getEvtPerRun().

std::string EEOccupancyClient::prefixME_ [private]

Definition at line 87 of file EEOccupancyClient.h.

Referenced by analyze(), EEOccupancyClient(), and setup().

std::vector<int> EEOccupancyClient::superModules_ [private]

Definition at line 91 of file EEOccupancyClient.h.

Referenced by EEOccupancyClient().

bool EEOccupancyClient::verbose_ [private]

Definition at line 84 of file EEOccupancyClient.h.

Referenced by EEOccupancyClient().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:20:07 2009 for CMSSW by  doxygen 1.5.4