CMS 3D CMS Logo

Public Member Functions | Private Attributes | Friends

EBStatusFlagsClient Class Reference

#include <EBStatusFlagsClient.h>

Inheritance diagram for EBStatusFlagsClient:
EBClient

List of all members.

Public Member Functions

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

Private Attributes

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

Friends

class EBSummaryClient

Detailed Description

Definition at line 32 of file EBStatusFlagsClient.h.


Constructor & Destructor Documentation

EBStatusFlagsClient::EBStatusFlagsClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 32 of file EBStatusFlagsClient.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 36).
  superModules_.reserve(36);
  for ( unsigned int i = 1; i <= 36; 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;

  }

}
EBStatusFlagsClient::~EBStatusFlagsClient ( ) [virtual]

Destructor.

Definition at line 74 of file EBStatusFlagsClient.cc.

                                          {

}

Member Function Documentation

void EBStatusFlagsClient::analyze ( void  ) [virtual]

Analyze.

Implements EBClient.

Definition at line 175 of file EBStatusFlagsClient.cc.

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

                                      {

  ievt_++;
  jevt_++;
  if ( ievt_ % 10 == 0 ) {
    if ( debug_ ) std::cout << "EBStatusFlagsClient: 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_ + "/EBStatusFlagsTask/FEStatus/EBSFT front-end status " + Numbers::sEB(ism) );
    h01_[ism-1] = UtilsClient::getHisto( me, cloneME_, h01_[ism-1] );
    meh01_[ism-1] = me;

    me = dqmStore_->get( prefixME_ + "/EBStatusFlagsTask/FEStatus/EBSFT front-end status bits " + Numbers::sEB(ism) );
    h02_[ism-1] = UtilsClient::getHisto( me, cloneME_, h02_[ism-1] );
    meh02_[ism-1] = me;

    me = dqmStore_->get( prefixME_ + "/EBStatusFlagsTask/FEStatus/EBSFT MEM front-end status " + Numbers::sEB(ism) );
    h03_[ism-1] = UtilsClient::getHisto( me, cloneME_, h01_[ism-1] );
    meh03_[ism-1] = me;

    for ( int ie = 1; ie <= 85; ie++ ) {
      for ( int ip = 1; ip <= 20; ip++ ) {
        if ( Masks::maskChannel(ism, ie, ip, bits01, EcalBarrel) ) {
          int iet = (ie-1)/5 + 1;
          int ipt = (ip-1)/5 + 1;
          if ( meh01_[ism-1] ) meh01_[ism-1]->setBinError( iet, ipt, 0.01 );
        }
      }
    }

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

  }

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

BeginJob.

Implements EBClient.

Definition at line 78 of file EBStatusFlagsClient.cc.

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

                                       {

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

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

  ievt_ = 0;
  jevt_ = 0;

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

BeginRun.

Implements EBClient.

Definition at line 89 of file EBStatusFlagsClient.cc.

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

                                       {

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

  jevt_ = 0;

  this->setup();

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

Cleanup.

Implements EBClient.

Definition at line 121 of file EBStatusFlagsClient.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_ + "/EBStatusFlagsClient" );

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

EndJob.

Implements EBClient.

Definition at line 99 of file EBStatusFlagsClient.cc.

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

                                     {

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

  this->cleanup();

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

EndRun.

Implements EBClient.

Definition at line 107 of file EBStatusFlagsClient.cc.

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

                                     {

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

  this->cleanup();

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

Get Functions.

Implements EBClient.

Definition at line 71 of file EBStatusFlagsClient.h.

References ievt_.

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

Returns the number of processed events in this Run.

Implements EBClient.

Definition at line 72 of file EBStatusFlagsClient.h.

References jevt_.

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

Setup.

Implements EBClient.

Definition at line 115 of file EBStatusFlagsClient.cc.

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

Referenced by beginRun().

                                    {

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

}

Friends And Related Function Documentation

friend class EBSummaryClient [friend]

Definition at line 34 of file EBStatusFlagsClient.h.


Member Data Documentation

Definition at line 79 of file EBStatusFlagsClient.h.

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

Definition at line 82 of file EBStatusFlagsClient.h.

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

Definition at line 90 of file EBStatusFlagsClient.h.

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

Definition at line 86 of file EBStatusFlagsClient.h.

Referenced by cleanup(), and EBStatusFlagsClient().

TH2F* EBStatusFlagsClient::h01_[36] [private]

Definition at line 94 of file EBStatusFlagsClient.h.

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

TH1F* EBStatusFlagsClient::h02_[36] [private]

Definition at line 98 of file EBStatusFlagsClient.h.

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

TH2F* EBStatusFlagsClient::h03_[36] [private]

Definition at line 102 of file EBStatusFlagsClient.h.

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

Definition at line 76 of file EBStatusFlagsClient.h.

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

Definition at line 77 of file EBStatusFlagsClient.h.

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

Definition at line 96 of file EBStatusFlagsClient.h.

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

Definition at line 100 of file EBStatusFlagsClient.h.

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

std::string EBStatusFlagsClient::prefixME_ [private]

Definition at line 84 of file EBStatusFlagsClient.h.

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

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

Definition at line 88 of file EBStatusFlagsClient.h.

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

Definition at line 81 of file EBStatusFlagsClient.h.

Referenced by EBStatusFlagsClient().