CMS 3D CMS Logo

EBBeamHodoClient Class Reference

#include <DQM/EcalBarrelMonitorClient/interface/EBBeamHodoClient.h>

Inheritance diagram for EBBeamHodoClient:

EBClient

List of all members.

Public Member Functions

void analyze (void)
 Analyze.
void beginJob (DQMStore *dqmStore)
 BeginJob.
void beginRun (void)
 BeginRun.
void cleanup (void)
 Cleanup.
 EBBeamHodoClient (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 ~EBBeamHodoClient ()
 Destructor.

Private Attributes

bool cloneME_
bool debug_
DQMStoredqmStore_
bool enableCleanup_
TH1F * hc01_ [3]
TProfile * he01_ [2]
TH2F * he02_ [2]
TH1F * he03_ [3]
TH1F * hm01_
TH1F * ho01_ [4]
TH1F * hp01_ [2]
TH2F * hp02_
TH1F * hq01_ [2]
TH1F * hr01_ [4]
TH1F * hs01_ [2]
TH1F * ht01_
int ievt_
int jevt_
std::string prefixME_
std::vector< intsuperModules_
bool verbose_


Detailed Description

Definition at line 31 of file EBBeamHodoClient.h.


Constructor & Destructor Documentation

EBBeamHodoClient::EBBeamHodoClient ( const edm::ParameterSet ps  ) 

Constructor.

Definition at line 29 of file EBBeamHodoClient.cc.

References cloneME_, debug_, enableCleanup_, edm::ParameterSet::getUntrackedParameter(), hc01_, he01_, he02_, he03_, hm01_, ho01_, hp01_, hp02_, hq01_, hr01_, hs01_, ht01_, i, prefixME_, superModules_, and verbose_.

00029                                                          {
00030 
00031   // cloneME switch
00032   cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
00033 
00034   // verbose switch
00035   verbose_ = ps.getUntrackedParameter<bool>("verbose", true);
00036 
00037   // debug switch
00038   debug_ = ps.getUntrackedParameter<bool>("debug", false);
00039 
00040   // prefixME path
00041   prefixME_ = ps.getUntrackedParameter<string>("prefixME", "");
00042 
00043   // enableCleanup_ switch
00044   enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
00045 
00046   // vector of selected Super Modules (Defaults to all 36).
00047   superModules_.reserve(36);
00048   for ( unsigned int i = 1; i <= 36; i++ ) superModules_.push_back(i);
00049   superModules_ = ps.getUntrackedParameter<vector<int> >("superModules", superModules_);
00050 
00051   for (int i=0; i<4; i++) {
00052 
00053     ho01_[i] = 0;
00054     hr01_[i] = 0;
00055 
00056   }
00057 
00058   hp01_[0] = 0;
00059   hp01_[1] = 0;
00060 
00061   hp02_ = 0;
00062 
00063   hs01_[0] = 0;
00064   hs01_[1] = 0;
00065 
00066   hq01_[0] = 0;
00067   hq01_[1] = 0;
00068 
00069   ht01_ = 0;
00070 
00071   hc01_[0] = 0;
00072   hc01_[1] = 0;
00073   hc01_[2] = 0;
00074 
00075   hm01_    = 0;
00076 
00077   he01_[0] = 0;
00078   he01_[1] = 0;
00079 
00080   he02_[0] = 0;
00081   he02_[1] = 0;
00082 
00083   he03_[0] = 0;
00084   he03_[1] = 0;
00085   he03_[2] = 0;
00086 
00087 }

EBBeamHodoClient::~EBBeamHodoClient (  )  [virtual]

Destructor.

Definition at line 89 of file EBBeamHodoClient.cc.

00089                                     {
00090 
00091 }


Member Function Documentation

void EBBeamHodoClient::analyze ( void   )  [virtual]

Analyze.

Implements EBClient.

Definition at line 230 of file EBBeamHodoClient.cc.

References cloneME_, GenMuonPlsPt100GeV_cfg::cout, debug_, dqmStore_, lat::endl(), DQMStore::get(), hc01_, he01_, he02_, he03_, histo, hm01_, ho01_, hp01_, hp02_, hq01_, hr01_, hs01_, ht01_, i, ievt_, jevt_, me, prefixME_, and Numbers::sEB().

00230                                    {
00231 
00232   ievt_++;
00233   jevt_++;
00234   if ( ievt_ % 10 == 0 ) {
00235     if ( debug_ ) cout << "EBBeamHodoClient: ievt/jevt = " << ievt_ << "/" << jevt_ << endl;
00236   }
00237 
00238   int smId = 1;
00239 
00240   char histo[200];
00241 
00242   MonitorElement* me;
00243 
00244   for (int i=0; i<4; i++) {
00245 
00246     sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT occup %s %02d").c_str(), Numbers::sEB(smId).c_str(), i+1);
00247     me = dqmStore_->get(histo);
00248     ho01_[i] = UtilsClient::getHisto<TH1F*>( me, cloneME_, ho01_[i] );
00249 
00250     sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT raw %s %02d").c_str(), Numbers::sEB(smId).c_str(), i+1);
00251     me = dqmStore_->get(histo);
00252     hr01_[i] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hr01_[i] );
00253 
00254   }
00255 
00256   sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT PosX rec %s").c_str(), Numbers::sEB(smId).c_str());
00257   me = dqmStore_->get(histo);
00258   hp01_[0] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hp01_[0] );
00259 
00260   sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT PosY rec %s").c_str(), Numbers::sEB(smId).c_str());
00261   me = dqmStore_->get(histo);
00262   hp01_[1] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hp01_[1] );
00263 
00264   sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT PosYX rec %s").c_str(), Numbers::sEB(smId).c_str());
00265   me = dqmStore_->get(histo);
00266   hp02_ = UtilsClient::getHisto<TH2F*>( me, cloneME_, hp02_ );
00267 
00268   sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT SloX %s").c_str(), Numbers::sEB(smId).c_str());
00269   me = dqmStore_->get(histo);
00270   hs01_[0] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hs01_[0] );
00271 
00272   sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT SloY %s").c_str(), Numbers::sEB(smId).c_str());
00273   me = dqmStore_->get(histo);
00274   hs01_[1] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hs01_[1] );
00275 
00276   sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT QualX %s").c_str(), Numbers::sEB(smId).c_str());
00277   me = dqmStore_->get(histo);
00278   hq01_[0] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hq01_[0] );
00279 
00280   sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT QualY %s").c_str(), Numbers::sEB(smId).c_str());
00281   me = dqmStore_->get(histo);
00282   hq01_[1] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hq01_[1] );
00283 
00284   sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT TDC rec %s").c_str(), Numbers::sEB(smId).c_str());
00285   me = dqmStore_->get(histo);
00286   ht01_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, ht01_ );
00287 
00288   sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT Hodo-Calo X vs Cry %s").c_str(), Numbers::sEB(smId).c_str());
00289   me = dqmStore_->get(histo);
00290   hc01_[0] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hc01_[0] );
00291 
00292   sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT Hodo-Calo Y vs Cry %s").c_str(), Numbers::sEB(smId).c_str());
00293   me = dqmStore_->get(histo);
00294   hc01_[1] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hc01_[1] );
00295 
00296   sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT TDC-Calo vs Cry %s").c_str(), Numbers::sEB(smId).c_str());
00297   me = dqmStore_->get(histo);
00298   hc01_[2] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hc01_[2] );
00299 
00300   sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT Missing Collections %s").c_str(), Numbers::sEB(smId).c_str());
00301   me = dqmStore_->get(histo);
00302   hm01_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, hm01_ );
00303 
00304   sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT prof E1 vs X %s").c_str(), Numbers::sEB(smId).c_str());
00305   me = dqmStore_->get(histo);
00306   he01_[0] = UtilsClient::getHisto<TProfile*>( me, cloneME_, he01_[0] );
00307 
00308   sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT prof E1 vs Y %s").c_str(), Numbers::sEB(smId).c_str());
00309   me = dqmStore_->get(histo);
00310   he01_[1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, he01_[1] );
00311 
00312   sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT his E1 vs X %s").c_str(), Numbers::sEB(smId).c_str());
00313   me = dqmStore_->get(histo);
00314   he02_[0] = UtilsClient::getHisto<TH2F*>( me, cloneME_, he02_[0] );
00315 
00316   sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT his E1 vs Y %s").c_str(), Numbers::sEB(smId).c_str());
00317   me = dqmStore_->get(histo);
00318   he02_[1] = UtilsClient::getHisto<TH2F*>( me, cloneME_, he02_[1] );
00319 
00320   sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT PosX Hodo-Calo %s").c_str(), Numbers::sEB(smId).c_str());
00321   me = dqmStore_->get(histo);
00322   he03_[0] = UtilsClient::getHisto<TH1F*>( me, cloneME_, he03_[0] );
00323 
00324   sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT PosY Hodo-Calo %s").c_str(), Numbers::sEB(smId).c_str());
00325   me = dqmStore_->get(histo);
00326   he03_[1] = UtilsClient::getHisto<TH1F*>( me, cloneME_, he03_[1] );
00327 
00328   sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT TimeMax TDC-Calo %s").c_str(), Numbers::sEB(smId).c_str());
00329   me = dqmStore_->get(histo);
00330   he03_[2] = UtilsClient::getHisto<TH1F*>( me, cloneME_, he03_[2] );
00331 
00332 }

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

BeginJob.

Implements EBClient.

Definition at line 93 of file EBBeamHodoClient.cc.

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

00093                                                   {
00094 
00095   dqmStore_ = dqmStore;
00096 
00097   if ( debug_ ) cout << "EBBeamHodoClient: beginJob" << endl;
00098 
00099   ievt_ = 0;
00100   jevt_ = 0;
00101 
00102 }

void EBBeamHodoClient::beginRun ( void   )  [virtual]

BeginRun.

Implements EBClient.

Definition at line 104 of file EBBeamHodoClient.cc.

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

00104                                     {
00105 
00106   if ( debug_ ) cout << "EBBeamHodoClient: beginRun" << endl;
00107 
00108   jevt_ = 0;
00109 
00110   this->setup();
00111 
00112 }

void EBBeamHodoClient::cleanup ( void   )  [virtual]

Cleanup.

Implements EBClient.

Definition at line 212 of file EBBeamHodoClient.cc.

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

Referenced by endJob(), and endRun().

00212                                    {
00213 
00214   if ( ! enableCleanup_ ) return;
00215 
00216   dqmStore_->setCurrentFolder( prefixME_ + "/EBBeamHodoClient" );
00217 
00218 }

void EBBeamHodoClient::endJob ( void   )  [virtual]

EndJob.

Implements EBClient.

Definition at line 114 of file EBBeamHodoClient.cc.

References cleanup(), cloneME_, GenMuonPlsPt100GeV_cfg::cout, debug_, lat::endl(), hc01_, he01_, he02_, he03_, hm01_, ho01_, hp01_, hp02_, hq01_, hr01_, hs01_, ht01_, i, and ievt_.

00114                                   {
00115 
00116   if ( debug_ ) cout << "EBBeamHodoClient: endJob, ievt = " << ievt_ << endl;
00117 
00118   this->cleanup();
00119 
00120   if ( cloneME_ ) {
00121 
00122     for (int i=0; i<4; i++) {
00123 
00124       if ( ho01_[i] ) delete ho01_[i];
00125       if ( hr01_[i] ) delete hr01_[i];
00126 
00127     }
00128 
00129     if ( hp01_[0] ) delete hp01_[0];
00130     if ( hp01_[1] ) delete hp01_[1];
00131 
00132     if ( hp02_ ) delete hp02_;
00133 
00134     if ( hs01_[0] ) delete hs01_[0];
00135     if ( hs01_[1] ) delete hs01_[1];
00136 
00137     if ( hq01_[0] ) delete hq01_[0];
00138     if ( hq01_[1] ) delete hq01_[1];
00139 
00140     if ( ht01_ ) delete ht01_;
00141 
00142     if ( hc01_[0] ) delete hc01_[0];
00143     if ( hc01_[1] ) delete hc01_[1];
00144     if ( hc01_[2] ) delete hc01_[2];
00145 
00146     if ( hm01_ )    delete hm01_;
00147 
00148     if ( he01_[0] ) delete he01_[0];
00149     if ( he01_[1] ) delete he01_[1];
00150 
00151     if ( he02_[0] ) delete he02_[0];
00152     if ( he02_[1] ) delete he02_[1];
00153 
00154     if ( he03_[0] ) delete he03_[0];
00155     if ( he03_[1] ) delete he03_[1];
00156     if ( he03_[2] ) delete he03_[2];
00157 
00158   }
00159 
00160   for (int i=0; i<4; i++) {
00161 
00162     ho01_[i] = 0;
00163     hr01_[i] = 0;
00164 
00165   }
00166 
00167   hp01_[0] = 0;
00168   hp01_[1] = 0;
00169 
00170   hp02_ = 0;
00171 
00172   hs01_[0] = 0;
00173   hs01_[1] = 0;
00174 
00175   hq01_[0] = 0;
00176   hq01_[1] = 0;
00177 
00178   ht01_ = 0;
00179 
00180   hc01_[0] = 0;
00181   hc01_[1] = 0;
00182   hc01_[2] = 0;
00183 
00184   hm01_    = 0;
00185 
00186   he01_[0] = 0;
00187   he01_[1] = 0;
00188 
00189   he02_[0] = 0;
00190   he02_[1] = 0;
00191 
00192   he03_[0] = 0;
00193   he03_[1] = 0;
00194   he03_[2] = 0;
00195 
00196 }

void EBBeamHodoClient::endRun ( void   )  [virtual]

EndRun.

Implements EBClient.

Definition at line 198 of file EBBeamHodoClient.cc.

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

00198                                   {
00199 
00200   if ( debug_ ) cout << "EBBeamHodoClient: endRun, jevt = " << jevt_ << endl;
00201 
00202   this->cleanup();
00203 
00204 }

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

Get Functions.

Implements EBClient.

Definition at line 72 of file EBBeamHodoClient.h.

References ievt_.

00072 { return ievt_; }

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

Returns the number of processed events in this Run.

Implements EBClient.

Definition at line 73 of file EBBeamHodoClient.h.

References jevt_.

00073 { return jevt_; }

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

HtmlOutput.

Implements EBClient.

void EBBeamHodoClient::setup ( void   )  [virtual]

Setup.

Implements EBClient.

Definition at line 206 of file EBBeamHodoClient.cc.

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

Referenced by beginRun().

00206                                  {
00207 
00208   dqmStore_->setCurrentFolder( prefixME_ + "/EBBeamHodoClient" );
00209 
00210 }

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

SoftReset.

Implements EBClient.

Definition at line 334 of file EBBeamHodoClient.cc.

00334                                           {
00335 
00336 }

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

WriteDB.

Implements EBClient.

Definition at line 220 of file EBBeamHodoClient.cc.

00220                                                                                                                      {
00221 
00222   status = true;
00223 
00224   if ( ! flag ) return false;
00225 
00226   return true;
00227 
00228 }


Member Data Documentation

bool EBBeamHodoClient::cloneME_ [private]

Definition at line 80 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

bool EBBeamHodoClient::debug_ [private]

Definition at line 83 of file EBBeamHodoClient.h.

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

DQMStore* EBBeamHodoClient::dqmStore_ [private]

Definition at line 91 of file EBBeamHodoClient.h.

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

bool EBBeamHodoClient::enableCleanup_ [private]

Definition at line 87 of file EBBeamHodoClient.h.

Referenced by cleanup(), and EBBeamHodoClient().

TH1F* EBBeamHodoClient::hc01_[3] [private]

Definition at line 105 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TProfile* EBBeamHodoClient::he01_[2] [private]

Definition at line 109 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TH2F* EBBeamHodoClient::he02_[2] [private]

Definition at line 110 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TH1F* EBBeamHodoClient::he03_[3] [private]

Definition at line 112 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TH1F* EBBeamHodoClient::hm01_ [private]

Definition at line 107 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TH1F* EBBeamHodoClient::ho01_[4] [private]

Definition at line 93 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TH1F* EBBeamHodoClient::hp01_[2] [private]

Definition at line 96 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TH2F* EBBeamHodoClient::hp02_ [private]

Definition at line 97 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TH1F* EBBeamHodoClient::hq01_[2] [private]

Definition at line 101 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TH1F* EBBeamHodoClient::hr01_[4] [private]

Definition at line 94 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TH1F* EBBeamHodoClient::hs01_[2] [private]

Definition at line 99 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TH1F* EBBeamHodoClient::ht01_ [private]

Definition at line 103 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

int EBBeamHodoClient::ievt_ [private]

Definition at line 77 of file EBBeamHodoClient.h.

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

int EBBeamHodoClient::jevt_ [private]

Definition at line 78 of file EBBeamHodoClient.h.

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

std::string EBBeamHodoClient::prefixME_ [private]

Definition at line 85 of file EBBeamHodoClient.h.

Referenced by analyze(), cleanup(), EBBeamHodoClient(), and setup().

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

Definition at line 89 of file EBBeamHodoClient.h.

Referenced by EBBeamHodoClient().

bool EBBeamHodoClient::verbose_ [private]

Definition at line 82 of file EBBeamHodoClient.h.

Referenced by EBBeamHodoClient().


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