CMS 3D CMS Logo

Public Member Functions | Private Attributes | Friends

EEStatusFlagsClient Class Reference

#include <EEStatusFlagsClient.h>

Inheritance diagram for EEStatusFlagsClient:
EEClient

List of all members.

Public Member Functions

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

Private Attributes

bool cloneME_
bool debug_
DQMStoredqmStore_
bool enableCleanup_
TH2F * h01_ [18]
TH1F * h02_ [18]
TH2F * h03_ [18]
int ievt_
int jevt_
MonitorElementmeh01_ [18]
MonitorElementmeh02_ [18]
MonitorElementmeh03_ [18]
std::string prefixME_
std::vector< int > superModules_
bool verbose_

Friends

class EESummaryClient

Detailed Description

Definition at line 32 of file EEStatusFlagsClient.h.


Constructor & Destructor Documentation

EEStatusFlagsClient::EEStatusFlagsClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 34 of file EEStatusFlagsClient.cc.

References cloneME_, debug_, enableCleanup_, edm::ParameterSet::getUntrackedParameter(), h01_, h02_, h03_, i, ecalpyutils::ism(), meh01_, meh02_, meh03_, 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];

    h01_[ism-1] = 0;

    meh01_[ism-1] = 0;

    h02_[ism-1] = 0;

    meh02_[ism-1] = 0;

    h03_[ism-1] = 0;

    meh03_[ism-1] = 0;

  }

}
EEStatusFlagsClient::~EEStatusFlagsClient ( ) [virtual]

Destructor.

Definition at line 76 of file EEStatusFlagsClient.cc.

                                          {

}

Member Function Documentation

void EEStatusFlagsClient::analyze ( void  ) [virtual]

Analyze.

Implements EEClient.

Definition at line 177 of file EEStatusFlagsClient.cc.

References cloneME_, gather_cfg::cout, debug_, dqmStore_, EcalEndcap, DQMStore::get(), h01_, h02_, h03_, i, ievt_, jevt_, Masks::maskChannel(), Masks::maskPn(), meh01_, meh02_, meh03_, prefixME_, Numbers::sEE(), MonitorElement::setBinError(), EcalDQMStatusHelper::STATUS_FLAG_ERROR, and superModules_.

                                      {

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

  uint32_t bits01 = 0;
  bits01 |= 1 << EcalDQMStatusHelper::STATUS_FLAG_ERROR;

  MonitorElement* me;

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

    int ism = superModules_[i];

    me = dqmStore_->get( prefixME_ + "/EEStatusFlagsTask/FEStatus/EESFT front-end status " + Numbers::sEE(ism) );
    h01_[ism-1] = UtilsClient::getHisto<TH2F*>( me, cloneME_, h01_[ism-1] );
    meh01_[ism-1] = me;

    me = dqmStore_->get( prefixME_ + "/EEStatusFlagsTask/FEStatus/EESFT front-end status bits " + Numbers::sEE(ism) );
    h02_[ism-1] = UtilsClient::getHisto<TH1F*>( me, cloneME_, h02_[ism-1] );
    meh02_[ism-1] = me;

    me = dqmStore_->get( prefixME_ + "/EEStatusFlagsTask/FEStatus/EESFT MEM front-end status " + Numbers::sEE(ism) );
    h03_[ism-1] = UtilsClient::getHisto<TH2F*>( me, cloneME_, h01_[ism-1] );
    meh03_[ism-1] = me;

    for ( int ix = 1; ix <= 50; ix++ ) {
      for ( int iy = 1; iy <= 50; iy++ ) {
        if ( Masks::maskChannel(ism, ix, iy, bits01, EcalEndcap) ) {
          if ( meh01_[ism-1] ) meh01_[ism-1]->setBinError( ix, iy, 0.01 );
        }
      }
    }

    for ( int i = 1; i <= 10; i++ ) {
      if ( Masks::maskPn(ism, i, bits01, EcalEndcap) ) {
        int it = (i-1)/5 + 1;
        if ( meh03_[ism-1] ) meh03_[ism-1]->setBinError( it, 1, 0.01 );
      }
    }

  }

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

BeginJob.

Implements EEClient.

Definition at line 80 of file EEStatusFlagsClient.cc.

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

                                       {

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

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

  ievt_ = 0;
  jevt_ = 0;

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

BeginRun.

Implements EEClient.

Definition at line 91 of file EEStatusFlagsClient.cc.

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

                                       {

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

  jevt_ = 0;

  this->setup();

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

Cleanup.

Implements EEClient.

Definition at line 123 of file EEStatusFlagsClient.cc.

References cloneME_, dqmStore_, enableCleanup_, h01_, h02_, h03_, i, ecalpyutils::ism(), meh01_, meh02_, meh03_, prefixME_, DQMStore::setCurrentFolder(), and superModules_.

Referenced by endJob(), and endRun().

                                      {

  if ( ! enableCleanup_ ) return;

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

    int ism = superModules_[i];

    if ( cloneME_ ) {
      if ( h01_[ism-1] ) delete h01_[ism-1];
      if ( h02_[ism-1] ) delete h02_[ism-1];
      if ( h03_[ism-1] ) delete h03_[ism-1];
    }

    h01_[ism-1] = 0;
    h02_[ism-1] = 0;
    h03_[ism-1] = 0;

    meh01_[ism-1] = 0;
    meh02_[ism-1] = 0;
    meh03_[ism-1] = 0;

  }

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

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

EndJob.

Implements EEClient.

Definition at line 101 of file EEStatusFlagsClient.cc.

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

                                     {

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

  this->cleanup();

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

EndRun.

Implements EEClient.

Definition at line 109 of file EEStatusFlagsClient.cc.

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

                                     {

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

  this->cleanup();

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

Get Functions.

Implements EEClient.

Definition at line 71 of file EEStatusFlagsClient.h.

References ievt_.

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

Returns the number of processed events in this Run.

Implements EEClient.

Definition at line 72 of file EEStatusFlagsClient.h.

References jevt_.

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

Setup.

Implements EEClient.

Definition at line 117 of file EEStatusFlagsClient.cc.

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

Referenced by beginRun().

                                    {

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

}

Friends And Related Function Documentation

friend class EESummaryClient [friend]

Definition at line 34 of file EEStatusFlagsClient.h.


Member Data Documentation

Definition at line 79 of file EEStatusFlagsClient.h.

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

Definition at line 82 of file EEStatusFlagsClient.h.

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

Definition at line 90 of file EEStatusFlagsClient.h.

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

Definition at line 86 of file EEStatusFlagsClient.h.

Referenced by cleanup(), and EEStatusFlagsClient().

TH2F* EEStatusFlagsClient::h01_[18] [private]

Definition at line 94 of file EEStatusFlagsClient.h.

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

TH1F* EEStatusFlagsClient::h02_[18] [private]

Definition at line 98 of file EEStatusFlagsClient.h.

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

TH2F* EEStatusFlagsClient::h03_[18] [private]

Definition at line 102 of file EEStatusFlagsClient.h.

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

Definition at line 76 of file EEStatusFlagsClient.h.

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

Definition at line 77 of file EEStatusFlagsClient.h.

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

Definition at line 96 of file EEStatusFlagsClient.h.

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

Definition at line 100 of file EEStatusFlagsClient.h.

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

std::string EEStatusFlagsClient::prefixME_ [private]

Definition at line 84 of file EEStatusFlagsClient.h.

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

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

Definition at line 88 of file EEStatusFlagsClient.h.

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

Definition at line 81 of file EEStatusFlagsClient.h.

Referenced by EEStatusFlagsClient().