CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

EcalPreshowerMonitorClient Class Reference

#include <EcalPreshowerMonitorClient.h>

Inheritance diagram for EcalPreshowerMonitorClient:
edm::EDAnalyzer

List of all members.

Public Member Functions

 EcalPreshowerMonitorClient (const edm::ParameterSet &ps)
virtual ~EcalPreshowerMonitorClient ()

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void analyze ()
virtual void beginJob ()
void beginLuminosityBlock (const edm::LuminosityBlock &l, const edm::EventSetup &c)
virtual void beginRun (void)
virtual void beginRun (const edm::Run &, const edm::EventSetup &)
virtual void endJob ()
void endLuminosityBlock (const edm::LuminosityBlock &l, const edm::EventSetup &c)
virtual void endRun (const edm::Run &, const edm::EventSetup &)
virtual void endRun (void)
void htmlOutput (int)

Private Attributes

bool begin_run_
std::vector< ESClient * > clients_
int dac_
bool debug_
DQMStoredqmStore_
std::vector< std::string > enabledClients_
bool end_run_
int firstDAC_
int gain_
int ievt_
std::string inputFile_
int isPed_
int jevt_
int layer_
int nDAC_
int nLines_
std::string outputFile_
int precision_
std::string prefixME_
int prescaleFactor_
int qt [40][40]
int qtCriteria
int runNum_
int runtype_
int senP_ [4288]
int senX_ [4288]
int senY_ [4288]
int senZ_ [4288]
int seqtype_
int vDAC_ [5]
bool verbose_

Detailed Description

Definition at line 13 of file EcalPreshowerMonitorClient.h.


Constructor & Destructor Documentation

EcalPreshowerMonitorClient::EcalPreshowerMonitorClient ( const edm::ParameterSet ps)

Definition at line 25 of file EcalPreshowerMonitorClient.cc.

References gather_cfg::cout, spr::find(), edm::ParameterSet::getUntrackedParameter(), and i.

                                                                                {

   verbose_    = ps.getUntrackedParameter<bool>("verbose", false);
   outputFile_ = ps.getUntrackedParameter<string>("OutputFile","");
   inputFile_  = ps.getUntrackedParameter<string>("InputFile","");
   prefixME_   = ps.getUntrackedParameter<string>("prefixME", "EcalPreshower");
   debug_      = ps.getUntrackedParameter<bool>("debug", false);

   prescaleFactor_ = ps.getUntrackedParameter<int>("prescaleFactor", 1);

   //Initial enabledClients
   enabledClients_.push_back("Integrity");
   enabledClients_.push_back("Pedestal");
   enabledClients_.push_back("Summary");

   enabledClients_ = ps.getUntrackedParameter<vector<string> >("enabledClients", enabledClients_);      

   if ( verbose_ ) {
      cout << " Enabled Clients:";
      for ( unsigned int i = 0; i < enabledClients_.size(); i++ ) {
         cout << " " << enabledClients_[i];
      }
      cout << endl;
   }

   //Setup Clients
   if ( find(enabledClients_.begin(), enabledClients_.end(), "Integrity" ) != enabledClients_.end() ){
      clients_.push_back( new ESIntegrityClient(ps) );
   }

   if ( find(enabledClients_.begin(), enabledClients_.end(), "Pedestal" ) != enabledClients_.end() ){
      clients_.push_back( new ESPedestalClient(ps) );
   }

   if ( find(enabledClients_.begin(), enabledClients_.end(), "Summary" ) != enabledClients_.end() ){
      clients_.push_back( new ESSummaryClient(ps) );
   }

   if(debug_){
      cout<<"PrescaleFactor = "<<prescaleFactor_<<endl; 
   }
}
EcalPreshowerMonitorClient::~EcalPreshowerMonitorClient ( ) [virtual]

Definition at line 68 of file EcalPreshowerMonitorClient.cc.

References gather_cfg::cout, and i.

                                                        {

   if ( verbose_ ) cout << "Finish EcalPreshowerMonitorClient" << endl;

   for ( unsigned int i=0; i<clients_.size(); i++ ) {
      delete clients_[i];
   }

}

Member Function Documentation

void EcalPreshowerMonitorClient::analyze ( const edm::Event e,
const edm::EventSetup c 
) [private, virtual]

Implements edm::EDAnalyzer.

Definition at line 200 of file EcalPreshowerMonitorClient.cc.

References Vispa::Share::Profiling::analyze(), and gather_cfg::cout.

                                                                              {

   ievt_++;
   jevt_++;

   if(debug_) cout<<" analyze(const Event & e, const EventSetup & c) is called"<<endl;

   if ( prescaleFactor_ > 0 ) {
      if ( jevt_ % prescaleFactor_ == 0 ) this->analyze();
   }

}
void EcalPreshowerMonitorClient::analyze ( void  ) [private, virtual]

Definition at line 189 of file EcalPreshowerMonitorClient.cc.

References gather_cfg::cout, and i.

                                             {

   if(debug_){ 
      cout << "EcalPreshowerMonitorClient: ievt/jevt = " << ievt_ << "/" << jevt_ << endl;
   }

   for ( unsigned int i=0; i<clients_.size(); i++ ) {
      clients_[i]->analyze();
   }
}
void EcalPreshowerMonitorClient::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 78 of file EcalPreshowerMonitorClient.cc.

References gather_cfg::cout, i, and cmsCodeRules::cppFunctionSkipper::operator.

                                          {

   if(debug_){ 
      cout<<"EcalPreshowerMonitorClient: beginJob"<<endl;
   }

   ievt_ = 0;
   jevt_ = 0;

   // get hold of back-end interface

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

   if ( inputFile_.size() != 0 ) {
     if ( dqmStore_ ) {
       dqmStore_->open(inputFile_);
    }
  }

  for ( unsigned int i=0; i<clients_.size(); i++ ) {
    clients_[i]->beginJob(dqmStore_);
    clients_[i]->setup();
  }
}
void EcalPreshowerMonitorClient::beginLuminosityBlock ( const edm::LuminosityBlock l,
const edm::EventSetup c 
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 213 of file EcalPreshowerMonitorClient.cc.

                                                                                                          {
}
void EcalPreshowerMonitorClient::beginRun ( void  ) [private, virtual]

Definition at line 103 of file EcalPreshowerMonitorClient.cc.

References gather_cfg::cout, and i.

                                              {

   if (debug_) { 
      cout << "EcalPreshowerMonitorClient: beginRun" << endl;
   }

   jevt_ = 0;

   begin_run_ = true;
   end_run_   = false;

   for ( unsigned int i=0; i<clients_.size(); i++ ) {
      clients_[i]->beginRun();
   }
}
void EcalPreshowerMonitorClient::beginRun ( const edm::Run r,
const edm::EventSetup c 
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 119 of file EcalPreshowerMonitorClient.cc.

References gather_cfg::cout, and i.

                                                                                   {

   if (debug_) { 
      cout << "EcalPreshowerMonitorClient: beginRun" << endl;
   }

   jevt_ = 0;

   begin_run_ = true;
   end_run_   = false;

   for ( unsigned int i=0; i<clients_.size(); i++ ) {
      clients_[i]->beginRun();
   }
}
void EcalPreshowerMonitorClient::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 135 of file EcalPreshowerMonitorClient.cc.

References Vispa::Share::Profiling::analyze(), gather_cfg::cout, and i.

                                            {

   if (debug_) { 
      cout << "EcalPreshowerMonitorClient: endJob, ievt = " << ievt_ << endl;
   }

   if ( ! end_run_ ) {
     this->analyze(); 
     this->endRun();
   }
   
   if ( outputFile_.size() != 0 ) {
     cout<<"Store Result in "<<outputFile_<<endl;
     dqmStore_->save(outputFile_);
   }
   
   for ( unsigned int i=0; i<clients_.size(); i++ ) {
     clients_[i]->endJob();
   }

}
void EcalPreshowerMonitorClient::endLuminosityBlock ( const edm::LuminosityBlock l,
const edm::EventSetup c 
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 216 of file EcalPreshowerMonitorClient.cc.

References i.

                                                                                                        {

  for ( unsigned int i=0; i<clients_.size(); i++ ) {
    clients_[i]->endLumiAnalyze();
  }
   
}
void EcalPreshowerMonitorClient::endRun ( const edm::Run r,
const edm::EventSetup c 
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 173 of file EcalPreshowerMonitorClient.cc.

References gather_cfg::cout, and i.

                                                                                 {

   if(debug_){ 
      cout << "EcalPreshowerMonitorClient: endRun, jevt = " << jevt_ << endl;
   }

   begin_run_ = false;
   end_run_   = true;

   for ( unsigned int i=0; i<clients_.size(); i++ ) {
     clients_[i]->analyze();
     clients_[i]->endRun();
   }

}
void EcalPreshowerMonitorClient::endRun ( void  ) [private, virtual]

Definition at line 157 of file EcalPreshowerMonitorClient.cc.

References gather_cfg::cout, and i.

                                            {

   if(debug_){ 
      cout << "EcalPreshowerMonitorClient: endRun, jevt = " << jevt_ << endl;
   }

   begin_run_ = false;
   end_run_   = true;

   for ( unsigned int i=0; i<clients_.size(); i++ ) {
     clients_[i]->analyze();
     clients_[i]->endRun();
   }
   
}
void EcalPreshowerMonitorClient::htmlOutput ( int  run) [private]

Definition at line 224 of file EcalPreshowerMonitorClient.cc.

References sistrip::extrainfo::gain_, i, j, and sistrip::layer_.

                                                   {

   //Change runNum_ into run by Yeong-jyi 

   string border[2][10] = {
      {"style=\"border-top:solid white; border-left:solid white; border-bottom:solid white; border-right:solid white; border-width:1\"",
         "style=\"border-top:solid black; border-left:solid black; border-bottom:solid white; border-right:solid white; border-width:1\"",
         "style=\"border-top:solid black; border-left:solid white; border-bottom:solid white; border-right:solid black; border-width:1\"",
         "style=\"border-top:solid white; border-left:solid black; border-bottom:solid white; border-right:solid white; border-width:1\"",
         "style=\"border-top:solid white; border-left:solid white; border-bottom:solid white; border-right:solid black; border-width:1\"",
         "style=\"border-top:solid black; border-left:solid black; border-bottom:solid white; border-right:solid black; border-width:1\"",
         "style=\"border-top:solid white; border-left:solid black; border-bottom:solid black; border-right:solid black; border-width:1\"",
         "style=\"border-top:solid white; border-left:solid black; border-bottom:solid black; border-right:solid white; border-width:1\"",
         "style=\"border-top:solid white; border-left:solid white; border-bottom:solid black; border-right:solid black; border-width:1\"",
         "style=\"border-top:solid white; border-left:solid black; border-bottom:solid white; border-right:solid black; border-width:1\""},

      {"style=\"border-top:solid white; border-left:solid white; border-bottom:solid white; border-right:solid white; border-width:1\"",
         "style=\"border-top:solid black; border-left:solid black; border-bottom:solid white; border-right:solid white; border-width:1\"",
         "style=\"border-top:solid black; border-left:solid white; border-bottom:solid white; border-right:solid black; border-width:1\"",
         "style=\"border-top:solid black; border-left:solid white; border-bottom:solid white; border-right:solid white; border-width:1\"",
         "style=\"border-top:solid white; border-left:solid white; border-bottom:solid black; border-right:solid white; border-width:1\"",
         "style=\"border-top:solid black; border-left:solid black; border-bottom:solid black; border-right:solid white; border-width:1\"",
         "style=\"border-top:solid black; border-left:solid white; border-bottom:solid black; border-right:solid black; border-width:1\"",
         "style=\"border-top:solid white; border-left:solid black; border-bottom:solid black; border-right:solid white; border-width:1\"",
         "style=\"border-top:solid white; border-left:solid white; border-bottom:solid black; border-right:solid black; border-width:1\"",
         "style=\"border-top:solid black; border-left:solid white; border-bottom:solid black; border-right:solid white; border-width:1\""}
   };

   int iborder[2][40][40] = {
      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
         {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
         {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
         {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0},
         {0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 3, 4, 3, 4, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 3, 4, 3, 4, 3, 4, 1, 2, 0, 0, 0, 0, 0, 0, 0},
         {0, 0, 0, 0, 0, 0, 0, 3, 4, 7, 8, 3, 4, 7, 8, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 7, 8, 3, 4, 7, 8, 3, 4, 0, 0, 0, 0, 0, 0, 0},
         {0, 0, 0, 0, 0, 0, 5, 3, 4, 1, 2, 7, 8, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 7, 8, 1, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0},
         {0, 0, 0, 0, 0, 1, 4, 7, 8, 3, 4, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 3,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8, 0, 0, 0, 0, 0, 0, 0},
         {0, 0, 0, 0, 0, 0, 0, 0, 5, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 6, 0, 0, 0, 0, 0, 0, 0, 0},
         {0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 4, 8, 7, 4, 4, 8, 7, 4, 4, 8, 7, 4, 4, 8, 7, 4, 4, 8, 7, 4, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0},
         {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 9, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 9, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
         {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 7, 4, 4, 8, 7, 4, 4, 8, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
         {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
      }
   };

   // Make HTML
   if (runtype_ ==3) {

      Char_t run_s[50];
      sprintf(run_s, "/var/www/html/DQM/%08d", run);
      string htmlDir = run_s;
      system(("/bin/mkdir -m 777 -p " + htmlDir).c_str());
      sprintf(run_s, "/var/www/html/DQM/%08d/gif", run);
      string gifDir = run_s;
      system(("/bin/mkdir -m 777 -p " + gifDir).c_str());
      ofstream htmlFile;
      htmlFile.open((htmlDir+"/index.html").c_str(), ios::app);

      // Start to display ES planes 
      int iquad_M[2][40] = {{  5,  7, 10, 11, 13, 13, 14, 15, 16, 17,
         17, 17, 18, 18, 19, 19, 19, 19, 19, 19,
         19, 19, 19, 19, 19, 19, 18, 18, 17, 17,
         17, 16, 15, 14, 13, 13, 11, 10,  7,  5},
          {  0,  6,  8, 11, 12, 13, 14, 16, 16, 17,
             18, 18, 18, 19, 19, 20, 20, 20, 20, 20,  
             20, 20, 20, 20, 20, 19, 19, 18, 18, 18,
             17, 16, 16, 14, 13, 12, 11,  8,  6,  0}
      };
      int iquad_m[2][40] = {{1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
         1,  1,  1,  3,  5,  6,  7,  7,  8,  8,
         8,  8,  7,  7,  6,  5,  3,  1,  1,  1,
         1,  1,  1,  1,  1,  1,  1,  1,  1,  1},
          {1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
             1,  1,  1,  3,  5,  6,  7,  7,  8,  8,
             8,  8,  7,  7,  6,  5,  3,  1,  1,  1,
             1,  1,  1,  1,  1,  1,  1,  1,  1,  1}
      };

      htmlFile << "<table border=\"0\" bordercolor=\"white\" cellspacing=\"0\" style=\"float: left;\">" << endl;
      htmlFile << "<tr align=\"center\">" << endl;
      if (layer_==1) htmlFile << "<td colspan=\"40\"> ES- F <a href=\"../plotAll.php?run="<<run<<"&type="<<runtype_<<"\">(summary plots)</a></td>" << endl;
      else if (layer_==1) htmlFile << "<td colspan=\"40\"> ES- R <a href=\"../plotAll.php?run="<<run<<"&type="<<runtype_<<"\">(summary plots)</a></td>" << endl;

      //string color[6] = {"#C0C0C0", "#00FF00", "#FFFF00", "#F87217", "#FF0000", "#0000FF"};
      for (int i=0; i<40; ++i) {
         htmlFile << "<tr>" << endl;
         for (int j=0; j<40; ++j) {
            if ((iquad_m[layer_-1][i]-1) == 0) {
               if (j<=(19-iquad_M[layer_-1][i]) || j>(19+iquad_M[layer_-1][i])) 
                  htmlFile << "<td "<<border[layer_-1][iborder[layer_-1][i][j]]<<" > <img src=\"../0.png\" width=12 height=12 border=0> </img></td>" << endl;
               else {
                  htmlFile << "<td "<<border[layer_-1][iborder[layer_-1][i][j]]<<" ><a href=\"../plot.php?run="<<run<<"&type="<<runtype_<<"&iz="<<senZ_[0]<<"&ip="<<senP_[0]<<"&ix="<<j+1<<"&iy="<<39-i+1<<"&gain="<<gain_<<"&prec="<<precision_<<"\" STYLE=\"text-decoration:none\" target=_blank><img src=\"../"<< qt[j][39-i]<<".png\" width=12 height=12 border=0></img></a></td>" << endl;
               }
            } else {
               if (j>=(19-iquad_m[layer_-1][i]+2) && j<=(19+iquad_m[layer_-1][i]-1)) 
                  htmlFile << "<td "<<border[layer_-1][iborder[layer_-1][i][j]]<<" > <img src=\"../0.png\" width=12 height=12 border=0> </img></td>" << endl;
               else if (j<=(19-iquad_M[layer_-1][i]) || j>(19+iquad_M[layer_-1][i])) 
                  htmlFile << "<td "<<border[layer_-1][iborder[layer_-1][i][j]]<<" > <img src=\"../0.png\" width=12 height=12 border=0> </img></td>" << endl;
               else {
                  htmlFile << "<td "<<border[layer_-1][iborder[layer_-1][i][j]]<<" ><a href=\"../plot.php?run="<<run<<"&type="<<runtype_<<"&iz="<<senZ_[0]<<"&ip="<<senP_[0]<<"&ix="<<j+1<<"&iy="<<39-i+1<<"&gain="<<gain_<<"&prec="<<precision_<<"\" STYLE=\"text-decoration:none\" target=_blank><img src=\"../"<< qt[j][39-i]<<".png\" width=12 height=12 border=0></img></a></td>" << endl;
               }
            }
         }
         htmlFile << "</tr>" <<endl;
      }
      htmlFile << "</table>" <<endl;
      htmlFile << "<table border=\"1\">" <<endl;
      if (runtype_==3) {
         htmlFile << "<tr><td><img src=\"../2.png\" width=20 height=20 border=0> this sensor is not used for injection </img></td></tr>" << endl;
         htmlFile << "<tr><td><img src=\"../1.png\" width=20 height=20 border=0> the injection result for this sensor is OK </img></td></tr>" << endl;
         htmlFile << "<tr><td><img src=\"../4.png\" width=20 height=20 border=0> at least one strip has signal 10% higher than average </img></td></tr>" <<endl;
         htmlFile << "<tr><td><img src=\"../3.png\" width=20 height=20 border=0> at least one strip has signal 10% lower than average </img></td></tr>" <<endl;
         htmlFile << "<tr><td><img src=\"../7.png\" width=20 height=20 border=0> all strips have signal lower than "<< qtCriteria<<" ADC </img></td></tr>" <<endl;
         htmlFile << "<tr><td><img src=\"../6.png\" width=20 height=20 border=0> the order of time sample is wrong </img></td></tr>" <<endl;
         htmlFile << "<tr><td><img src=\"../5.png\" width=20 height=20 border=0> this sensor is used for data-taking, but does not deliver data  </img></td></tr>" <<endl;
      }
      htmlFile << "</table>" <<endl;
      htmlFile << "</body> " << endl;
      htmlFile << "</html> " << endl;

      htmlFile.close();
   }
}

Member Data Documentation

Definition at line 44 of file EcalPreshowerMonitorClient.h.

Definition at line 54 of file EcalPreshowerMonitorClient.h.

Definition at line 57 of file EcalPreshowerMonitorClient.h.

Definition at line 46 of file EcalPreshowerMonitorClient.h.

Definition at line 42 of file EcalPreshowerMonitorClient.h.

std::vector<std::string> EcalPreshowerMonitorClient::enabledClients_ [private]

Definition at line 53 of file EcalPreshowerMonitorClient.h.

Definition at line 45 of file EcalPreshowerMonitorClient.h.

Definition at line 58 of file EcalPreshowerMonitorClient.h.

Definition at line 57 of file EcalPreshowerMonitorClient.h.

Definition at line 50 of file EcalPreshowerMonitorClient.h.

Definition at line 39 of file EcalPreshowerMonitorClient.h.

Definition at line 58 of file EcalPreshowerMonitorClient.h.

Definition at line 51 of file EcalPreshowerMonitorClient.h.

Definition at line 58 of file EcalPreshowerMonitorClient.h.

Definition at line 58 of file EcalPreshowerMonitorClient.h.

Definition at line 56 of file EcalPreshowerMonitorClient.h.

Definition at line 38 of file EcalPreshowerMonitorClient.h.

Definition at line 57 of file EcalPreshowerMonitorClient.h.

Definition at line 40 of file EcalPreshowerMonitorClient.h.

Definition at line 49 of file EcalPreshowerMonitorClient.h.

int EcalPreshowerMonitorClient::qt[40][40] [private]

Definition at line 61 of file EcalPreshowerMonitorClient.h.

Definition at line 61 of file EcalPreshowerMonitorClient.h.

Definition at line 56 of file EcalPreshowerMonitorClient.h.

Definition at line 57 of file EcalPreshowerMonitorClient.h.

int EcalPreshowerMonitorClient::senP_[4288] [private]

Definition at line 60 of file EcalPreshowerMonitorClient.h.

int EcalPreshowerMonitorClient::senX_[4288] [private]

Definition at line 60 of file EcalPreshowerMonitorClient.h.

int EcalPreshowerMonitorClient::senY_[4288] [private]

Definition at line 60 of file EcalPreshowerMonitorClient.h.

int EcalPreshowerMonitorClient::senZ_[4288] [private]

Definition at line 60 of file EcalPreshowerMonitorClient.h.

Definition at line 57 of file EcalPreshowerMonitorClient.h.

Definition at line 58 of file EcalPreshowerMonitorClient.h.

Definition at line 47 of file EcalPreshowerMonitorClient.h.