CMS 3D CMS Logo

Public Member Functions | Private Attributes | Friends

EEClusterClient Class Reference

#include <EEClusterClient.h>

Inheritance diagram for EEClusterClient:
EEClient

List of all members.

Public Member Functions

void analyze (void)
 Analyze.
void beginJob (void)
 BeginJob.
void beginRun (void)
 BeginRun.
void cleanup (void)
 Cleanup.
 EEClusterClient (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 setup (void)
 Setup.
virtual ~EEClusterClient ()
 Destructor.

Private Attributes

bool cloneME_
bool debug_
DQMStoredqmStore_
bool enableCleanup_
TH1F * h01_ [3]
TProfile * h02ProjEta_ [3][2]
TProfile * h02ProjPhi_ [3][2]
TH2F * h03_ [2]
TH1F * h03ProjEta_ [2]
TH1F * h03ProjPhi_ [2]
TProfile2D * h04_ [3][2]
TH1F * i01_ [3]
int ievt_
int jevt_
std::string prefixME_
TH1F * s01_ [3]
std::vector< int > superModules_
bool verbose_

Friends

class EESummaryClient

Detailed Description

Definition at line 34 of file EEClusterClient.h.


Constructor & Destructor Documentation

EEClusterClient::EEClusterClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 25 of file EEClusterClient.cc.

References cloneME_, debug_, enableCleanup_, edm::ParameterSet::getUntrackedParameter(), h01_, h02ProjEta_, h02ProjPhi_, h03_, h03ProjEta_, h03ProjPhi_, h04_, i, i01_, prefixME_, s01_, superModules_, and verbose_.

                                                          {

  // cloneME switch
  cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);

  // verbose switch
  verbose_ = ps.getUntrackedParameter<bool>("verbose", true);

  // debug switch
  debug_ = ps.getUntrackedParameter<bool>("debug", false);

  // prefixME path
  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");

  // enableCleanup_ switch
  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);

  // vector of selected Super Modules (Defaults to all 18).
  superModules_.reserve(18);
  for ( unsigned int i = 1; i <= 18; i++ ) superModules_.push_back(i);
  superModules_ = ps.getUntrackedParameter<std::vector<int> >("superModules", superModules_);

  h01_[0] = 0;
  h01_[1] = 0;
  h01_[2] = 0;

  for(int iEE=0;iEE<2;iEE++) {
    for(int i=0;i<3;++i) {
      h04_[i][iEE] = 0;
      h02ProjEta_[i][iEE] = 0;
      h02ProjPhi_[i][iEE] = 0;
    }
  }

  h03_[0] = 0;
  h03ProjEta_[0] = 0;
  h03ProjPhi_[0] = 0;

  h03_[1] = 0;
  h03ProjEta_[1] = 0;
  h03ProjPhi_[1] = 0;

  i01_[0] = 0;
  i01_[1] = 0;
  i01_[2] = 0;

  s01_[0] = 0;
  s01_[1] = 0;
  s01_[2] = 0;

}
EEClusterClient::~EEClusterClient ( ) [virtual]

Destructor.

Definition at line 77 of file EEClusterClient.cc.

                                  {

}

Member Function Documentation

void EEClusterClient::analyze ( void  ) [virtual]

Analyze.

Implements EEClient.

Definition at line 199 of file EEClusterClient.cc.

References cloneME_, gather_cfg::cout, debug_, dqmStore_, DQMStore::get(), getHisto(), h01_, h02ProjEta_, h02ProjPhi_, h03_, h03ProjEta_, h03ProjPhi_, h04_, i01_, ievt_, jevt_, prefixME_, and s01_.

                                  {

  ievt_++;
  jevt_++;
  if ( ievt_ % 10 == 0 ) {
    if ( debug_ ) std::cout << "EEClusterClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl;
  }

  MonitorElement* me;

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy" );
  h01_[0] = UtilsClient::getHisto( me, cloneME_, h01_[0] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size" );
  h01_[1] = UtilsClient::getHisto( me, cloneME_, h01_[1] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number" );
  h01_[2] = UtilsClient::getHisto( me, cloneME_, h01_[2] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy map EE -" );
  h04_[0][0] = UtilsClient::getHisto( me, cloneME_, h04_[0][0] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number map EE -" );
  h03_[0] = UtilsClient::getHisto( me, cloneME_, h03_[0] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC ET map EE -" );
  h04_[1][0] = UtilsClient::getHisto( me, cloneME_, h04_[1][0] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size map EE -" );
  h04_[2][0] = UtilsClient::getHisto( me, cloneME_, h04_[2][0] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy projection eta EE -" );
  h02ProjEta_[0][0] = UtilsClient::getHisto( me, cloneME_, h02ProjEta_[0][0] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy projection phi EE -" );
  h02ProjPhi_[0][0] = UtilsClient::getHisto( me, cloneME_, h02ProjPhi_[0][0] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number projection eta EE -" );
  h03ProjEta_[0] = UtilsClient::getHisto( me, cloneME_, h03ProjEta_[0] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number projection phi EE -" );
  h03ProjPhi_[0] = UtilsClient::getHisto( me, cloneME_, h03ProjPhi_[0] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC ET projection eta EE -" );
  h02ProjEta_[1][0] = UtilsClient::getHisto( me, cloneME_, h02ProjEta_[1][0] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC ET projection phi EE -" );
  h02ProjPhi_[1][0] = UtilsClient::getHisto( me, cloneME_, h02ProjPhi_[1][0] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size projection eta EE -" );
  h02ProjEta_[2][0] = UtilsClient::getHisto( me, cloneME_, h02ProjEta_[2][0] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size projection phi EE -" );
  h02ProjPhi_[2][0] = UtilsClient::getHisto( me, cloneME_, h02ProjPhi_[2][0] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy map EE +" );
  h04_[0][1] = UtilsClient::getHisto( me, cloneME_, h04_[0][1] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number map EE +" );
  h03_[1] = UtilsClient::getHisto( me, cloneME_, h03_[1] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC ET map EE +" );
  h04_[1][1] = UtilsClient::getHisto( me, cloneME_, h04_[1][1] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size map EE +" );
  h04_[2][1] = UtilsClient::getHisto( me, cloneME_, h04_[2][1] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy projection eta EE +" );
  h02ProjEta_[0][1] = UtilsClient::getHisto( me, cloneME_, h02ProjEta_[0][1] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy projection phi EE +" );
  h02ProjPhi_[0][1] = UtilsClient::getHisto( me, cloneME_, h02ProjPhi_[0][1] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number projection eta EE +" );
  h03ProjEta_[1] = UtilsClient::getHisto( me, cloneME_, h03ProjEta_[1] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number projection phi EE +" );
  h03ProjPhi_[1] = UtilsClient::getHisto( me, cloneME_, h03ProjPhi_[1] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC ET projection eta EE +" );
  h02ProjEta_[1][1] = UtilsClient::getHisto( me, cloneME_, h02ProjEta_[1][1] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC ET projection phi EE +" );
  h02ProjPhi_[1][1] = UtilsClient::getHisto( me, cloneME_, h02ProjPhi_[1][1] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size projection eta EE +" );
  h02ProjEta_[2][1] = UtilsClient::getHisto( me, cloneME_, h02ProjEta_[2][1] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size projection phi EE +" );
  h02ProjPhi_[2][1] = UtilsClient::getHisto( me, cloneME_, h02ProjPhi_[2][1] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT SC energy" );
  i01_[0] = UtilsClient::getHisto( me, cloneME_, i01_[0] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT SC size" );
  i01_[1] = UtilsClient::getHisto( me, cloneME_, i01_[1] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT SC number" );
  i01_[2] = UtilsClient::getHisto( me, cloneME_, i01_[2] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT s1s9" );
  s01_[0] = UtilsClient::getHisto( me, cloneME_, s01_[0] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT s9s25" );
  s01_[1] = UtilsClient::getHisto( me, cloneME_, s01_[1] );

  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT dicluster invariant mass Pi0" );
  s01_[2] = UtilsClient::getHisto( me, cloneME_, s01_[2] );

}
void EEClusterClient::beginJob ( void  ) [virtual]

BeginJob.

Implements EEClient.

Definition at line 81 of file EEClusterClient.cc.

References gather_cfg::cout, debug_, dqmStore_, ievt_, jevt_, and cmsCodeRules::cppFunctionSkipper::operator.

                                   {

  dqmStore_ = edm::Service<DQMStore>().operator->();

  if ( debug_ ) std::cout << "EEClusterClient: beginJob" << std::endl;

  ievt_ = 0;
  jevt_ = 0;

}
void EEClusterClient::beginRun ( void  ) [virtual]

BeginRun.

Implements EEClient.

Definition at line 92 of file EEClusterClient.cc.

References gather_cfg::cout, debug_, jevt_, and setup().

                                   {

  if ( debug_ ) std::cout << "EEClusterClient: beginRun" << std::endl;

  jevt_ = 0;

  this->setup();

}
void EEClusterClient::cleanup ( void  ) [virtual]

Cleanup.

Implements EEClient.

Definition at line 124 of file EEClusterClient.cc.

References cloneME_, enableCleanup_, h01_, h02ProjEta_, h02ProjPhi_, h03_, h03ProjEta_, h03ProjPhi_, h04_, i, i01_, and s01_.

Referenced by endJob(), and endRun().

                                  {

  if ( ! enableCleanup_ ) return;

  if ( cloneME_ ) {
    if ( h01_[0] ) delete h01_[0];
    if ( h01_[1] ) delete h01_[1];
    if ( h01_[2] ) delete h01_[2];

    for(int iEE=0;iEE<2;iEE++) {
      for(int i=0;i<3;++i) {
        if(h04_[i][iEE]) delete h04_[i][iEE];
        if(h02ProjEta_[i][iEE]) delete h02ProjEta_[i][iEE];
        if(h02ProjPhi_[i][iEE]) delete h02ProjPhi_[i][iEE];
      }
    }

    if(h03_[0]) delete h03_[0];
    if(h03ProjEta_[0]) delete h03ProjEta_[0];
    if(h03ProjPhi_[0]) delete h03ProjPhi_[0];

    if(h03_[1]) delete h03_[1];
    if(h03ProjEta_[1]) delete h03ProjEta_[1];
    if(h03ProjPhi_[1]) delete h03ProjPhi_[1];

    if(i01_[0]) delete i01_[0];
    if(i01_[1]) delete i01_[1];
    if(i01_[2]) delete i01_[2];

    if(s01_[0]) delete s01_[0];
    if(s01_[1]) delete s01_[1];
    if(s01_[2]) delete s01_[2];

  }

  h01_[0] = 0;
  h01_[1] = 0;
  h01_[2] = 0;

  for(int iEE=0;iEE<2;iEE++) {
    for(int i=0;i<3;++i) {
      h04_[i][iEE] = 0;
      h02ProjEta_[i][iEE] = 0;
      h02ProjPhi_[i][iEE] = 0;
    }
  }

  h03_[0] = 0;
  h03ProjEta_[0] = 0;
  h03ProjPhi_[0] = 0;

  h03_[1] = 0;
  h03ProjEta_[1] = 0;
  h03ProjPhi_[1] = 0;

  i01_[0] = 0;
  i01_[1] = 0;
  i01_[2] = 0;

  s01_[0] = 0;
  s01_[1] = 0;
  s01_[2] = 0;

}
void EEClusterClient::endJob ( void  ) [virtual]

EndJob.

Implements EEClient.

Definition at line 102 of file EEClusterClient.cc.

References cleanup(), gather_cfg::cout, debug_, and ievt_.

                                 {

  if ( debug_ ) std::cout << "EEClusterClient: endJob, ievt = " << ievt_ << std::endl;

  this->cleanup();

}
void EEClusterClient::endRun ( void  ) [virtual]

EndRun.

Implements EEClient.

Definition at line 110 of file EEClusterClient.cc.

References cleanup(), gather_cfg::cout, debug_, and jevt_.

                                 {

  if ( debug_ ) std::cout << "EEClusterClient: endRun, jevt = " << jevt_ << std::endl;

  this->cleanup();

}
int EEClusterClient::getEvtPerJob ( void  ) [inline, virtual]

Get Functions.

Implements EEClient.

Definition at line 73 of file EEClusterClient.h.

References ievt_.

{ return ievt_; }
int EEClusterClient::getEvtPerRun ( void  ) [inline, virtual]

Returns the number of processed events in this Run.

Implements EEClient.

Definition at line 74 of file EEClusterClient.h.

References jevt_.

{ return jevt_; }
void EEClusterClient::setup ( void  ) [virtual]

Setup.

Implements EEClient.

Definition at line 118 of file EEClusterClient.cc.

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

Referenced by beginRun().

                                {

  dqmStore_->setCurrentFolder( prefixME_ + "/EEClusterClient" );

}

Friends And Related Function Documentation

friend class EESummaryClient [friend]

Definition at line 36 of file EEClusterClient.h.


Member Data Documentation

bool EEClusterClient::cloneME_ [private]

Definition at line 81 of file EEClusterClient.h.

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

bool EEClusterClient::debug_ [private]

Definition at line 84 of file EEClusterClient.h.

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

Definition at line 92 of file EEClusterClient.h.

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

Definition at line 88 of file EEClusterClient.h.

Referenced by cleanup(), and EEClusterClient().

TH1F* EEClusterClient::h01_[3] [private]

Definition at line 94 of file EEClusterClient.h.

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

TProfile* EEClusterClient::h02ProjEta_[3][2] [private]

Definition at line 96 of file EEClusterClient.h.

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

TProfile* EEClusterClient::h02ProjPhi_[3][2] [private]

Definition at line 97 of file EEClusterClient.h.

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

TH2F* EEClusterClient::h03_[2] [private]

Definition at line 98 of file EEClusterClient.h.

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

TH1F* EEClusterClient::h03ProjEta_[2] [private]

Definition at line 99 of file EEClusterClient.h.

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

TH1F* EEClusterClient::h03ProjPhi_[2] [private]

Definition at line 100 of file EEClusterClient.h.

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

TProfile2D* EEClusterClient::h04_[3][2] [private]

Definition at line 95 of file EEClusterClient.h.

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

TH1F* EEClusterClient::i01_[3] [private]

Definition at line 101 of file EEClusterClient.h.

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

int EEClusterClient::ievt_ [private]

Definition at line 78 of file EEClusterClient.h.

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

int EEClusterClient::jevt_ [private]

Definition at line 79 of file EEClusterClient.h.

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

std::string EEClusterClient::prefixME_ [private]

Definition at line 86 of file EEClusterClient.h.

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

TH1F* EEClusterClient::s01_[3] [private]

Definition at line 102 of file EEClusterClient.h.

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

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

Definition at line 90 of file EEClusterClient.h.

Referenced by EEClusterClient().

bool EEClusterClient::verbose_ [private]

Definition at line 83 of file EEClusterClient.h.

Referenced by EEClusterClient().