CMS 3D CMS Logo

Public Member Functions | Private Attributes | Friends

EEOccupancyClient Class Reference

#include <EEOccupancyClient.h>

Inheritance diagram for EEOccupancyClient:
EEClient

List of all members.

Public Member Functions

void analyze (void)
 Analyze.
void beginJob (void)
 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 setup (void)
 Setup.
virtual ~EEOccupancyClient ()
 Destructor.

Private Attributes

bool cloneME_
bool debug_
DQMStoredqmStore_
bool enableCleanup_
TH2F * h01_ [2][3]
TH1F * h01ProjEta_ [2][3]
TH1F * h01ProjPhi_ [2][3]
TH2F * h02_ [2][2]
TH1F * h02ProjEta_ [2][2]
TH1F * h02ProjPhi_ [2][2]
TH2F * i01_ [18]
TProfile2D * i02_ [18]
int ievt_
int jevt_
std::string prefixME_
std::vector< int > superModules_
bool verbose_

Friends

class EESummaryClient

Detailed Description

Definition at line 33 of file EEOccupancyClient.h.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 33 of file EEOccupancyClient.cc.

References cloneME_, debug_, enableCleanup_, edm::ParameterSet::getUntrackedParameter(), h01_, h01ProjEta_, h01ProjPhi_, h02_, h02ProjEta_, h02ProjPhi_, i, i01_, i02_, ecalpyutils::ism(), prefixME_, AlCaHLTBitMon_QueryRunRegistry::string, 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_);

  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
    int ism = superModules_[i];
    i01_[ism-1] = 0;
    i02_[ism-1] = 0;
  }

  for ( int i=0; i<3; i++) {
    h01_[0][i] = 0;
    h01ProjEta_[0][i] = 0;
    h01ProjPhi_[0][i] = 0;
    h01_[1][i] = 0;
    h01ProjEta_[1][i] = 0;
    h01ProjPhi_[1][i] = 0;
  }

  for ( int i=0; i<2; i++) {
    h02_[0][i] = 0;
    h02ProjEta_[0][i] = 0;
    h02ProjPhi_[0][i] = 0;
    h02_[1][i] = 0;
    h02ProjEta_[1][i] = 0;
    h02ProjPhi_[1][i] = 0;
  }

}
EEOccupancyClient::~EEOccupancyClient ( ) [virtual]

Destructor.

Definition at line 81 of file EEOccupancyClient.cc.

                                      {

}

Member Function Documentation

void EEOccupancyClient::analyze ( void  ) [virtual]

Analyze.

Implements EEClient.

Definition at line 284 of file EEOccupancyClient.cc.

References cloneME_, gather_cfg::cout, debug_, dqmStore_, DQMStore::get(), getHisto(), h01_, h01ProjEta_, h01ProjPhi_, h02_, h02ProjEta_, h02ProjPhi_, i, i01_, i02_, ievt_, jevt_, prefixME_, Numbers::sEE(), and superModules_.

                                    {

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

  MonitorElement* me;

  for ( unsigned int i=0; i<superModules_.size(); i++ ) {

    int ism = superModules_[i];

    me = dqmStore_->get( prefixME_ + "/EEOccupancyTask/EEOT digi occupancy " + Numbers::sEE(ism) );
    i01_[ism-1] = UtilsClient::getHisto( me, cloneME_, i01_[ism-1] );

    me = dqmStore_->get( prefixME_ + "/EEOccupancyTask/EEOT rec hit energy " + Numbers::sEE(ism) );
    i02_[ism-1] = UtilsClient::getHisto( me, cloneME_, i02_[ism-1] );

  }

  me = dqmStore_->get( "/EEOccupancyTask/EEOT digi occupancy EE -" );
  h01_[0][0] = UtilsClient::getHisto( me, cloneME_, h01_[0][0] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT digi occupancy EE - projection eta" );
  h01ProjEta_[0][0] = UtilsClient::getHisto( me, cloneME_, h01ProjEta_[0][0] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT digi occupancy EE - projection phi" );
  h01ProjPhi_[0][0] = UtilsClient::getHisto( me, cloneME_, h01ProjPhi_[0][0] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT digi occupancy EE +" );
  h01_[1][0] = UtilsClient::getHisto( me, cloneME_, h01_[1][0] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT digi occupancy EE + projection eta" );
  h01ProjEta_[1][0] = UtilsClient::getHisto( me, cloneME_, h01ProjEta_[1][0] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT digi occupancy EE + projection phi" );
  h01ProjPhi_[1][0] = UtilsClient::getHisto( me, cloneME_, h01ProjPhi_[1][0] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT rec hit occupancy EE -" );
  h01_[0][1] = UtilsClient::getHisto( me, cloneME_, h01_[0][1] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT rec hit occupancy EE - projection eta" );
  h01ProjEta_[0][1] = UtilsClient::getHisto( me, cloneME_, h01ProjEta_[0][1] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT rec hit occupancy EE - projection phi" );
  h01ProjPhi_[0][1] = UtilsClient::getHisto( me, cloneME_, h01ProjPhi_[0][1] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT rec hit occupancy EE +" );
  h01_[1][1] = UtilsClient::getHisto( me, cloneME_, h01_[1][1] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT rec hit occupancy EE + projection eta" );
  h01ProjEta_[1][1] = UtilsClient::getHisto( me, cloneME_, h01ProjEta_[1][1] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT rec hit occupancy EE + projection phi" );
  h01ProjPhi_[1][1] = UtilsClient::getHisto( me, cloneME_, h01ProjPhi_[1][1] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT TP digi occupancy EE -" );
  h01_[0][2] = UtilsClient::getHisto( me, cloneME_, h01_[0][2] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT TP digi occupancy EE - projection eta" );
  h01ProjEta_[0][2] = UtilsClient::getHisto( me, cloneME_, h01ProjEta_[0][2] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT TP digi occupancy EE - projection phi" );
  h01ProjPhi_[0][2] = UtilsClient::getHisto( me, cloneME_, h01ProjPhi_[0][2] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT TP digi occupancy EE +" );
  h01_[1][2] = UtilsClient::getHisto( me, cloneME_, h01_[1][2] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT TP digi occupancy EE + projection eta" );
  h01ProjEta_[1][2] = UtilsClient::getHisto( me, cloneME_, h01ProjEta_[1][2] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT TP digi occupancy EE + projection phi" );
  h01ProjPhi_[1][2] = UtilsClient::getHisto( me, cloneME_, h01ProjPhi_[1][2] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT rec hit thr occupancy EE -" );
  h02_[0][0] = UtilsClient::getHisto( me, cloneME_, h02_[0][0] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT rec hit thr occupancy EE - projection eta" );
  h02ProjEta_[0][0] = UtilsClient::getHisto( me, cloneME_, h02ProjEta_[0][0] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT rec hit thr occupancy EE - projection phi" );
  h02ProjPhi_[0][0] = UtilsClient::getHisto( me, cloneME_, h02ProjPhi_[0][0] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT rec hit thr occupancy EE +" );
  h02_[1][0] = UtilsClient::getHisto( me, cloneME_, h02_[1][0] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT rec hit thr occupancy EE + projection eta" );
  h02ProjEta_[1][0] = UtilsClient::getHisto( me, cloneME_, h02ProjEta_[1][0] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT rec hit thr occupancy EE + projection phi" );
  h02ProjPhi_[1][0] = UtilsClient::getHisto( me, cloneME_, h02ProjPhi_[1][0] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT TP digi thr occupancy EE -" );
  h02_[0][1] = UtilsClient::getHisto( me, cloneME_, h02_[0][1] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT TP digi thr occupancy EE - projection eta" );
  h02ProjEta_[0][1] = UtilsClient::getHisto( me, cloneME_, h02ProjEta_[0][1] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT TP digi thr occupancy EE - projection phi" );
  h02ProjPhi_[0][1] = UtilsClient::getHisto( me, cloneME_, h02ProjPhi_[0][1] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT TP digi thr occupancy EE +" );
  h02_[1][1] = UtilsClient::getHisto( me, cloneME_, h02_[1][1] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT TP digi thr occupancy EE + projection eta" );
  h02ProjEta_[1][1] = UtilsClient::getHisto( me, cloneME_, h02ProjEta_[1][1] );

  me = dqmStore_->get( "/EEOccupancyTask/EEOT TP digi thr occupancy EE + projection phi" );
  h02ProjPhi_[1][1] = UtilsClient::getHisto( me, cloneME_, h02ProjPhi_[1][1] );

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

BeginJob.

Implements EEClient.

Definition at line 85 of file EEOccupancyClient.cc.

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

                                     {

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

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

  ievt_ = 0;
  jevt_ = 0;

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

BeginRun.

Implements EEClient.

Definition at line 96 of file EEOccupancyClient.cc.

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

                                     {

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

  jevt_ = 0;

  this->setup();

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

Cleanup.

Implements EEClient.

Definition at line 128 of file EEOccupancyClient.cc.

References cloneME_, enableCleanup_, h01_, h01ProjEta_, h01ProjPhi_, h02_, h02ProjEta_, h02ProjPhi_, i, i01_, i02_, ecalpyutils::ism(), and superModules_.

Referenced by endJob(), and endRun().

                                    {

  if ( ! enableCleanup_ ) return;

  if ( cloneME_ ) {

    for ( unsigned int i=0; i<superModules_.size(); i++ ) {
      int ism = superModules_[i];
      if ( i01_[ism-1] ) delete i01_[ism-1];
      if ( i02_[ism-1] ) delete i02_[ism-1];
    }

    for ( int i=0; i<3; ++i ) {
      if ( h01_[0][i] ) delete h01_[0][i];
      if ( h01ProjEta_[0][i] ) delete h01ProjEta_[0][i];
      if ( h01ProjPhi_[0][i] ) delete h01ProjPhi_[0][i];
      if ( h01_[1][i] ) delete h01_[1][i];
      if ( h01ProjEta_[1][i] ) delete h01ProjEta_[1][i];
      if ( h01ProjPhi_[1][i] ) delete h01ProjPhi_[1][i];
    }

    for ( int i=0; i<2; ++i ) {
      if ( h02_[0][i] ) delete h02_[0][i];
      if ( h02ProjEta_[0][i] ) delete h02ProjEta_[0][i];
      if ( h02ProjPhi_[0][i] ) delete h02ProjPhi_[0][i];
      if ( h01_[1][i] ) delete h01_[1][i];
      if ( h01ProjEta_[1][i] ) delete h01ProjEta_[1][i];
      if ( h01ProjPhi_[1][i] ) delete h01ProjPhi_[1][i];
    }

  }

  for ( int i=0; i<3; i++) {
    h01_[0][i] = 0;
    h01ProjEta_[0][i] = 0;
    h01ProjPhi_[0][i] = 0;
    h01_[1][i] = 0;
    h01ProjEta_[1][i] = 0;
    h01ProjPhi_[1][i] = 0;
  }

  for ( int i=0; i<2; i++) {
    h02_[0][i] = 0;
    h02ProjEta_[0][i] = 0;
    h02ProjPhi_[0][i] = 0;
    h02_[1][i] = 0;
    h02ProjEta_[1][i] = 0;
    h02ProjPhi_[1][i] = 0;
  }

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

EndJob.

Implements EEClient.

Definition at line 106 of file EEOccupancyClient.cc.

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

                                   {

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

  this->cleanup();

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

EndRun.

Implements EEClient.

Definition at line 114 of file EEOccupancyClient.cc.

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

                                   {

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

  this->cleanup();

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

Get Functions.

Implements EEClient.

Definition at line 72 of file EEOccupancyClient.h.

References ievt_.

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

Returns the number of processed events in this Run.

Implements EEClient.

Definition at line 73 of file EEOccupancyClient.h.

References jevt_.

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

Setup.

Implements EEClient.

Definition at line 122 of file EEOccupancyClient.cc.

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

Referenced by beginRun().

                                  {

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

}

Friends And Related Function Documentation

friend class EESummaryClient [friend]

Definition at line 35 of file EEOccupancyClient.h.


Member Data Documentation

Definition at line 80 of file EEOccupancyClient.h.

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

bool EEOccupancyClient::debug_ [private]

Definition at line 83 of file EEOccupancyClient.h.

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

Definition at line 91 of file EEOccupancyClient.h.

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

Definition at line 87 of file EEOccupancyClient.h.

Referenced by cleanup(), and EEOccupancyClient().

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

Definition at line 96 of file EEOccupancyClient.h.

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

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

Definition at line 97 of file EEOccupancyClient.h.

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

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

Definition at line 98 of file EEOccupancyClient.h.

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

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

Definition at line 100 of file EEOccupancyClient.h.

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

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

Definition at line 101 of file EEOccupancyClient.h.

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

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

Definition at line 102 of file EEOccupancyClient.h.

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

TH2F* EEOccupancyClient::i01_[18] [private]

Definition at line 93 of file EEOccupancyClient.h.

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

TProfile2D* EEOccupancyClient::i02_[18] [private]

Definition at line 94 of file EEOccupancyClient.h.

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

int EEOccupancyClient::ievt_ [private]

Definition at line 77 of file EEOccupancyClient.h.

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

int EEOccupancyClient::jevt_ [private]

Definition at line 78 of file EEOccupancyClient.h.

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

std::string EEOccupancyClient::prefixME_ [private]

Definition at line 85 of file EEOccupancyClient.h.

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

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

Definition at line 89 of file EEOccupancyClient.h.

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

Definition at line 82 of file EEOccupancyClient.h.

Referenced by EEOccupancyClient().