CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Private Attributes

HLXMonitor Class Reference

#include <DQM/HLXMonitor/src/HLXMonitor.cc>

Inheritance diagram for HLXMonitor:
edm::EDAnalyzer

List of all members.

Public Types

typedef HCAL_HLX::LUMI_SECTION LUMI_SECTION
typedef HCAL_HLX::TCPReceiver TCPReceiver

Public Member Functions

 HLXMonitor (const edm::ParameterSet &)
 ~HLXMonitor ()

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void beginJob ()
virtual void endJob ()
void EndRun (bool saveFile=true)
void FillEventInfo (const LUMI_SECTION &, const edm::Event &e)
void FillHistograms (const LUMI_SECTION &)
void FillHistoHFCompare (const LUMI_SECTION &)
void FillReportSummary ()
double getUTCtime (timeval *a, timeval *b=NULL)
void ResetAll ()
void SaveDQMFile ()
void SetupEventInfo ()
void SetupHists ()

Private Attributes

bool Accumulate
unsigned int AquireMode
MonitorElementAvgEtSum
MonitorElementAvgOccAboveSet1
MonitorElementAvgOccAboveSet2
MonitorElementAvgOccBelowSet1
MonitorElementAvgOccBelowSet2
MonitorElementAvgOccBetweenSet1
MonitorElementAvgOccBetweenSet2
MonitorElementBXvsTimeAvgEtSumHFM
MonitorElementBXvsTimeAvgEtSumHFP
MonitorElementcmsswVer_
 Current working directory of the job.
unsigned int counter
bool currentRunEnded_
timeval currentTime_
DQMStoredbe_
std::string DistribIP1
std::string DistribIP2
MonitorElementdqmPatch_
 CMSSW version run for this job.
MonitorElementerrSummary_
 DQM patch version for this job.
MonitorElementerrSummaryEtaPhi_
 Subdetector-specific error summary (float)
MonitorElementerrSummarySegment_ [10]
 Subdetector-specific etaPhi summary (float)
MonitorElementETSum [36]
std::string EtXAxisTitle
std::string EtYAxisTitle
MonitorElementeventId_
 UTC time of the run start.
std::string eventInfoFolder_
std::string eventInfoFolderHLX_
MonitorElementeventTimeStamp_
int evtRateCount_
float evtRateWindow_
unsigned int expectedNibbles_
MonitorElementHFCompareEtSum
MonitorElementHFCompareOccAboveSet1
MonitorElementHFCompareOccAboveSet2
MonitorElementHFCompareOccBelowSet1
MonitorElementHFCompareOccBelowSet2
MonitorElementHFCompareOccBetweenSet1
MonitorElementHFCompareOccBetweenSet2
MonitorElementHistAvgEtSumHFM
MonitorElementHistAvgEtSumHFP
MonitorElementHistAvgLumiEtSum
MonitorElementHistAvgLumiOccSet1
MonitorElementHistAvgLumiOccSet2
MonitorElementHistAvgOccAboveSet1HFM
MonitorElementHistAvgOccAboveSet1HFP
MonitorElementHistAvgOccAboveSet2HFM
MonitorElementHistAvgOccAboveSet2HFP
MonitorElementHistAvgOccBelowSet1HFM
MonitorElementHistAvgOccBelowSet1HFP
MonitorElementHistAvgOccBelowSet2HFM
MonitorElementHistAvgOccBelowSet2HFP
MonitorElementHistAvgOccBetweenSet1HFM
MonitorElementHistAvgOccBetweenSet1HFP
MonitorElementHistAvgOccBetweenSet2HFM
MonitorElementHistAvgOccBetweenSet2HFP
MonitorElementHistInstantLumiEtSum
MonitorElementHistInstantLumiEtSumError
MonitorElementHistInstantLumiOccSet1
MonitorElementHistInstantLumiOccSet1Error
MonitorElementHistInstantLumiOccSet2
MonitorElementHistInstantLumiOccSet2Error
MonitorElementHistIntegratedLumiEtSum
MonitorElementHistIntegratedLumiOccSet1
MonitorElementHistIntegratedLumiOccSet2
unsigned int HLXHFMap [36]
TCPReceiver HLXTCP
MonitorElementhostName_
 # of event processed so far
timeval lastAvgTime_
timeval lastUpdateTime_
int listenPort
int lsBinOld
MonitorElementLumiAvgEtSum
MonitorElementLumiAvgOccSet1
MonitorElementLumiAvgOccSet2
MonitorElementLumiInstantEtSum
MonitorElementLumiInstantOccSet1
MonitorElementLumiInstantOccSet2
MonitorElementLumiIntegratedEtSum
MonitorElementLumiIntegratedOccSet1
MonitorElementLumiIntegratedOccSet2
MonitorElementlumisecId_
HCAL_HLX::LUMI_SECTION lumiSection
unsigned int lumiSectionCount
unsigned int MAX_LS
MonitorElementMaxInstLumiBX1
MonitorElementMaxInstLumiBX2
MonitorElementMaxInstLumiBX3
MonitorElementMaxInstLumiBX4
MonitorElementMaxInstLumiBXNum1
MonitorElementMaxInstLumiBXNum2
MonitorElementMaxInstLumiBXNum3
MonitorElementMaxInstLumiBXNum4
unsigned int MinLSBeforeSave
MonitorElementMissingDQMDataCheck
std::string monitorName_
unsigned int NBINS
double num4NibblePerLS_
unsigned int NUM_BUNCHES
unsigned int NUM_HLX
unsigned int numActiveTowersSet1
unsigned int numActiveTowersSet2
MonitorElementnUpdates_
std::string OccXAxisTitle
std::string OccYAxisTitle
std::string OutputDir
std::string OutputFilePrefix
int pEvent_
int prescaleEvt_
unsigned int previousSection
MonitorElementprocessEventRate_
 Time elapsed since the last event.
MonitorElementprocessEvents_
 Avg # of events in programmable window (default: 5 min)
MonitorElementprocessId_
 Number of collector updates (TBD)
MonitorElementprocessLatency_
 The UTC time of the last event.
MonitorElementprocessName_
 Hostname of the local machine.
MonitorElementprocessStartTimeStamp_
 The PID associated with this job.
MonitorElementprocessTimeStamp_
 The UTC time of the first event processed.
unsigned char * rData
MonitorElementRecentInstantLumiEtSum
MonitorElementRecentInstantLumiOccSet1
MonitorElementRecentInstantLumiOccSet2
MonitorElementRecentIntegratedLumiEtSum
MonitorElementRecentIntegratedLumiOccSet1
MonitorElementRecentIntegratedLumiOccSet2
unsigned int reconnTime
MonitorElementreportSummary_
MonitorElementreportSummaryMap_
bool ResetAtNewRun
MonitorElementrunId_
unsigned int runNumber_
unsigned int runNumLength
timeval runStartTime_
MonitorElementrunStartTimeStamp_
bool SaveAtEndJob
int SavePeriod
unsigned int secNumLength
short int SectionComplete
double sectionInstantErrSumEt
double sectionInstantErrSumOcc1
double sectionInstantErrSumOcc2
double sectionInstantNorm
double sectionInstantSumEt
double sectionInstantSumOcc1
double sectionInstantSumOcc2
MonitorElementSet1Above [36]
unsigned int set1AboveIndex
MonitorElementSet1Below [36]
unsigned int set1BelowIndex
MonitorElementSet1Between [36]
unsigned int set1BetweenIndex
MonitorElementSet2Above [36]
unsigned int set2AboveIndex
MonitorElementSet2Below [36]
unsigned int set2BelowIndex
MonitorElementSet2Between [36]
unsigned int set2BetweenIndex
std::string Style
std::string subSystemName_
MonitorElementSumAllOccSet1
MonitorElementSumAllOccSet2
unsigned int totalNibbles_ [36]
unsigned int TriggerBX
MonitorElementworkingDir_
 DQM "name" of the job (eg, Hcal or DT)
double XMAX
double XMIN

Detailed Description

Description: DQM Source for HLX histograms

Implementation: <Notes on="" implementation>="">

Definition at line 54 of file HLXMonitor.h.


Member Typedef Documentation

Definition at line 58 of file HLXMonitor.h.

Definition at line 59 of file HLXMonitor.h.


Constructor & Destructor Documentation

HLXMonitor::HLXMonitor ( const edm::ParameterSet iConfig) [explicit]

Definition at line 17 of file HLXMonitor.cc.

References Accumulate, AquireMode, currentRunEnded_, dbe_, DistribIP1, DistribIP2, eventInfoFolder_, eventInfoFolderHLX_, expectedNibbles_, edm::ParameterSet::getUntrackedParameter(), HLXHFMap, listenPort, lsBinOld, lumiSectionCount, MAX_LS, MinLSBeforeSave, monitorName_, NBINS, num4NibblePerLS_, NUM_BUNCHES, NUM_HLX, cmsCodeRules::cppFunctionSkipper::operator, OutputDir, OutputFilePrefix, prescaleEvt_, previousSection, reconnTime, ResetAtNewRun, runNumber_, runNumLength, SaveAtEndJob, SavePeriod, secNumLength, sectionInstantErrSumEt, sectionInstantErrSumOcc1, sectionInstantErrSumOcc2, sectionInstantNorm, sectionInstantSumEt, sectionInstantSumOcc1, sectionInstantSumOcc2, set1AboveIndex, set1BelowIndex, set1BetweenIndex, set2AboveIndex, set2BelowIndex, set2BetweenIndex, SetupEventInfo(), SetupHists(), DQMStore::setVerbose(), subSystemName_, totalNibbles_, TriggerBX, XMAX, and XMIN.

{

   NUM_HLX          = iConfig.getUntrackedParameter< unsigned int >("numHlx",     36);
   NUM_BUNCHES      = iConfig.getUntrackedParameter< unsigned int >("numBunches", 3564);
   MAX_LS           = iConfig.getUntrackedParameter< unsigned int >("maximumNumLS", 480);
   listenPort       = iConfig.getUntrackedParameter< unsigned int >("SourcePort", 51001);
   OutputFilePrefix = iConfig.getUntrackedParameter< std::string  >("outputFile", "lumi");
   OutputDir        = iConfig.getUntrackedParameter< std::string  >("outputDir","  data");
   SavePeriod       = iConfig.getUntrackedParameter< unsigned int >("SavePeriod",  10);
   NBINS            = iConfig.getUntrackedParameter< unsigned int >("NBINS",       297);  // 12 BX per bin
   XMIN             = iConfig.getUntrackedParameter< double       >("XMIN",        0);
   XMAX             = iConfig.getUntrackedParameter< double       >("XMAX",        3564);
   Style            = iConfig.getUntrackedParameter< std::string  >("Style",       "BX");
   AquireMode       = iConfig.getUntrackedParameter< unsigned int >("AquireMode",  0);
   Accumulate       = iConfig.getUntrackedParameter< bool         >("Accumulate",  true); // all
   TriggerBX        = iConfig.getUntrackedParameter< unsigned int >("TriggerBX",   50);
   MinLSBeforeSave  = iConfig.getUntrackedParameter< unsigned int >("MinLSBeforeSave", 1);
   reconnTime       = iConfig.getUntrackedParameter< unsigned int >("ReconnectionTime",5);
   DistribIP1       = iConfig.getUntrackedParameter< std::string  >("PrimaryHLXDAQIP", "vmepcs2f17-18");
   DistribIP2       = iConfig.getUntrackedParameter< std::string  >("SecondaryHLXDAQIP", "vmepcs2f17-19");
   ResetAtNewRun    = iConfig.getUntrackedParameter< bool         >("NewRun_Reset","true");
   SaveAtEndJob     = iConfig.getUntrackedParameter< bool         >("SaveAtEndJob","true");

   eventInfoFolderHLX_ = iConfig.getUntrackedParameter<std::string>("eventInfoFolderHLX", "EventInfoHLX") ;
   eventInfoFolder_ = iConfig.getUntrackedParameter<std::string   >("eventInfoFolder", "EventInfo") ;
   subSystemName_   = iConfig.getUntrackedParameter<std::string   >("subSystemName", "HLX") ;

   // Set the lumi section counter
   lsBinOld = 0;
   previousSection = 0;
   lumiSectionCount = 0;
   sectionInstantSumEt = 0;
   sectionInstantErrSumEt = 0;
   sectionInstantSumOcc1 = 0;
   sectionInstantErrSumOcc1 = 0;
   sectionInstantSumOcc2 = 0;
   sectionInstantErrSumOcc2 = 0;
   sectionInstantNorm = 0;


   // HLX Config info
   set1BelowIndex   = 0;
   set1BetweenIndex = 1;
   set1AboveIndex   = 2;
   set2BelowIndex   = 3;
   set2BetweenIndex = 4;
   set2AboveIndex   = 5;

   runNumLength     = 9;
   secNumLength     = 8;

   if(NUM_HLX > 36)       
     NUM_HLX = 36;

   if(NUM_BUNCHES > 3564) 
     NUM_BUNCHES = 3564;

   if(XMAX <= XMIN){
     XMIN = 0;
     if(XMAX <= 0) XMAX = 3564;
   }
   
   if((Style.compare("History")==0) || (NBINS == 0)){
     NBINS = (unsigned int)(XMAX-XMIN);
   }

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

   if ( dbe_ ) {
     dbe_->setVerbose(1);
   }

   monitorName_ = iConfig.getUntrackedParameter<std::string>("monitorName","HLX");
   //cout << "Monitor name = " << monitorName_ << endl;
   prescaleEvt_ = iConfig.getUntrackedParameter<int>("prescaleEvt", -1);
   //cout << "===>DQM event prescale = " << prescaleEvt_ << " events "<< endl;

   unsigned int HLXHFMapTemp[] = {31,32,33,34,35,18,  // s2f07 hf-
                                  13,14,15,16,17,0,   // s2f07 hf+
                                  25,26,27,28,29,30,  // s2f05 hf-
                                  7, 8, 9, 10,11,12,     // s2f05 hf+
                                  19,20,21,22,23,24,  // s2f02 hf-
                                  1, 2, 3, 4, 5, 6};       // s2f02 hf+

   currentRunEnded_ = true;
   runNumber_       = 0;
   expectedNibbles_ = 0;

   for( int iHLX = 0; iHLX < 36; ++iHLX ){
     HLXHFMap[iHLX] = HLXHFMapTemp[iHLX];
     //std::cout << "At " << iHLX << " Wedge " << HLXHFMap[iHLX] << std::endl;
     totalNibbles_[iHLX] = 0;
   }

   num4NibblePerLS_ = 16.0;

   SetupHists();
   SetupEventInfo();
}
HLXMonitor::~HLXMonitor ( )

Definition at line 118 of file HLXMonitor.cc.

References HCAL_HLX::TCPReceiver::Disconnect(), and HLXTCP.


Member Function Documentation

void HLXMonitor::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDAnalyzer.

Definition at line 726 of file HLXMonitor.cc.

References HCAL_HLX::TCPReceiver::Connect(), gather_cfg::cout, currentRunEnded_, HCAL_HLX::TCPReceiver::Disconnect(), DistribIP1, DistribIP2, EndRun(), funct::false, MonitorElement::Fill(), FillEventInfo(), FillHistograms(), FillHistoHFCompare(), FillReportSummary(), getUTCtime(), HCAL_HLX::LUMI_SECTION::hdr, HLXTCP, HCAL_HLX::TCPReceiver::IsConnected(), lumiSection, HCAL_HLX::LUMI_SECTION::lumiSummary, NULL, HCAL_HLX::TCPReceiver::ReceiveLumiSection(), reconnTime, runNumber_, runStartTimeStamp_, HCAL_HLX::TCPReceiver::SetIP(), stor::utils::sleep(), and funct::true.

{
   using namespace edm;

   while( HLXTCP.IsConnected() == false )
   {
      HLXTCP.SetIP(DistribIP1);
      if( HLXTCP.Connect() != 1 )
      {
         std::cout << "Failed to connect to " << DistribIP1 << "." << std::endl;
         sleep( 1 );
         std::cout << "Trying " << DistribIP2 << std::endl;
         HLXTCP.SetIP( DistribIP2 );
         if( HLXTCP.Connect() == 1) break;
         std::cout << "Failed to connect to " << DistribIP2 << "." << std::endl;
         std::cout << " Reconnect in " << reconnTime << " seconds." <<  std::endl;
         sleep(reconnTime);
      }
   }
   if( HLXTCP.IsConnected() == true )
   {
      std::cout << "Successfully connected." << std::endl; 
   }

   if( HLXTCP.ReceiveLumiSection( lumiSection ) == 1 )
   {
      // If this is the first time through, set the runNumber ...
      if( runNumber_ != lumiSection.hdr.runNumber ){
         if( !currentRunEnded_ && runNumber_ != 0 ) EndRun();
         runNumber_ = lumiSection.hdr.runNumber;
         currentRunEnded_ = false;
         //std::cout << "Run number is: " << runNumber_ << std::endl;
         timeval startruntime;
         gettimeofday(&startruntime,NULL);
         runStartTimeStamp_->Fill(getUTCtime(&startruntime));
      }
      
      // Fill the monitoring histograms 
      FillHistograms(lumiSection);
      FillHistoHFCompare(lumiSection);
      FillEventInfo(lumiSection,iEvent);
      FillReportSummary();
      
      cout << "Run: " << lumiSection.hdr.runNumber 
           << " Section: " << lumiSection.hdr.sectionNumber 
           << " Orbit: " << lumiSection.hdr.startOrbit << endl;
      cout << "Et Lumi: " << lumiSection.lumiSummary.InstantETLumi << endl;
      cout << "Occ Lumi 1: " << lumiSection.lumiSummary.InstantOccLumi[0] << endl;
      cout << "Occ Lumi 2: " << lumiSection.lumiSummary.InstantOccLumi[1] << endl;
   }
   else
   {
      HLXTCP.Disconnect();
      EndRun();
   }

//    do
//    {
//       errorCode = HLXTCP.ReceiveLumiSection(lumiSection);

//       while(errorCode !=1)
//       {
//       HLXTCP.Disconnect();
//       //cout << "Connecting to TCPDistributor" << endl;
//       errorCode = HLXTCP.Connect();
//       if(errorCode != 1) 
//       {
//         if( (attemptCounter%10)==0 ){  
//           cout << "*** Connection Failed: " << errorCode 
//                << " Will attempt to reconnect in " << reconnTime << " seconds." << endl;
//           cout << "This message will be printed once every 10 attempts." << endl;
//         }
//         ++attemptCounter;
//         sleep(reconnTime);
//       }
//       }    
//    } while( errorCode != 1 );

}
void HLXMonitor::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 828 of file HLXMonitor.cc.

References AquireMode, HCAL_HLX::TCPReceiver::Connect(), gather_cfg::cout, DistribIP1, DistribIP2, funct::false, HLXTCP, HCAL_HLX::TCPReceiver::IsConnected(), listenPort, reconnTime, HCAL_HLX::TCPReceiver::SetIP(), HCAL_HLX::TCPReceiver::SetMode(), HCAL_HLX::TCPReceiver::SetPort(), stor::utils::sleep(), and funct::true.

{ 
   HLXTCP.SetIP(DistribIP1);
   int errorCode = HLXTCP.SetPort(listenPort);
   cout << "SetPort: " << listenPort << " Success: " << errorCode << endl;
   errorCode = HLXTCP.SetMode(AquireMode);
   cout << "AquireMode: " << AquireMode << " Success: " << errorCode << endl;

   while( HLXTCP.IsConnected() == false )
   {
      HLXTCP.SetIP(DistribIP1);
      if( HLXTCP.Connect() != 1 )
      {
         std::cout << "Failed to connect to " << DistribIP1 << "." << std::endl;
         sleep( 1 );
         std::cout << "Trying " << DistribIP2 << std::endl;
         HLXTCP.SetIP( DistribIP2 );
         if( HLXTCP.Connect() == 1) break;
         std::cout << "Failed to connect to " << DistribIP2 << "." << std::endl;
         std::cout << " Reconnect in " << reconnTime << " seconds." <<  std::endl;
         sleep(reconnTime);
      }
   }
   if( HLXTCP.IsConnected() == true )
   {
      std::cout << "Successfully connected." << std::endl; 
   }

}
void HLXMonitor::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 859 of file HLXMonitor.cc.

References HCAL_HLX::TCPReceiver::Disconnect(), EndRun(), HLXTCP, and SaveAtEndJob.

{
   // Fill the report summaries at end job
   // Loop over the HLX's and fill the map, 
   // also calculate the overall quality.
   HLXTCP.Disconnect();
   EndRun( SaveAtEndJob );
}
void HLXMonitor::EndRun ( bool  saveFile = true) [private]

Definition at line 868 of file HLXMonitor.cc.

References gather_cfg::cout, currentRunEnded_, expectedNibbles_, FillReportSummary(), lsBinOld, lumiSectionCount, MinLSBeforeSave, num4NibblePerLS_, NUM_HLX, previousSection, ResetAll(), ResetAtNewRun, runNumber_, SaveDQMFile(), sectionInstantErrSumEt, sectionInstantErrSumOcc1, sectionInstantErrSumOcc2, sectionInstantNorm, sectionInstantSumEt, sectionInstantSumOcc1, sectionInstantSumOcc2, and totalNibbles_.

Referenced by analyze(), and endJob().

{
   FillReportSummary();
   
   // Do some things that should be done at the end of the run ...
   if( saveFile && runNumber_ != 0 ){
      if( int(lumiSectionCount/num4NibblePerLS_) >= (int)MinLSBeforeSave ) SaveDQMFile();
      else std::cout << "Num LS's (" << int(lumiSectionCount/num4NibblePerLS_) << ") "
                     << "is less than required minumum (" << MinLSBeforeSave
                     << "). File will not be saved!" << std::endl;
   }  
   expectedNibbles_ = 0;
   for( unsigned int iHLX = 0; iHLX < NUM_HLX; ++iHLX ) totalNibbles_[iHLX] = 0;
   
   std::cout << "** Here in end run **" << std::endl;
   if(ResetAtNewRun) ResetAll();
   runNumber_ = 0;
   currentRunEnded_ = true;
   sectionInstantSumEt = 0;
   sectionInstantErrSumEt = 0;
   sectionInstantSumOcc1 = 0;
   sectionInstantErrSumOcc1 = 0;
   sectionInstantSumOcc2 = 0;
   sectionInstantErrSumOcc2 = 0;
   sectionInstantNorm = 0;
   lsBinOld = 0;
   lumiSectionCount = 0;
   previousSection = 0;
}
void HLXMonitor::FillEventInfo ( const LUMI_SECTION section,
const edm::Event e 
) [private]

Definition at line 1388 of file HLXMonitor.cc.

References currentTime_, edm::EventID::event(), eventId_, eventTimeStamp_, evtRateCount_, evtRateWindow_, expectedNibbles_, MonitorElement::Fill(), getUTCtime(), HCAL_HLX::LUMI_SECTION::hdr, HLXHFMap, edm::EventBase::id(), lastAvgTime_, lastUpdateTime_, lumisecId_, NULL, num4NibblePerLS_, NUM_HLX, HCAL_HLX::LUMI_SECTION::occupancy, pEvent_, processEventRate_, processEvents_, processLatency_, processTimeStamp_, runId_, edm::EventBase::time(), cond::rpcobgas::time, totalNibbles_, and edm::Timestamp::value().

Referenced by analyze().

{
   // New run .. set the run number and fill run summaries ...
   //std::cout << "Run number " << runNumber_ << " Section hdr run number " 
//           << section.hdr.runNumber << std::endl;

   runId_->Fill( section.hdr.runNumber );
   lumisecId_->Fill( (int)(section.hdr.sectionNumber/num4NibblePerLS_) + 1 );

   // Update the total nibbles & the expected number
   expectedNibbles_ += section.hdr.numOrbits/4096;
   for( unsigned int iHLX = 0; iHLX < NUM_HLX; ++iHLX ){
      unsigned int iWedge = HLXHFMap[iHLX] + 1;
      totalNibbles_[iWedge-1] += section.occupancy[iHLX].hdr.numNibbles; 
   }   

   eventId_->Fill(e.id().event());
   eventTimeStamp_->Fill(e.time().value()/(double)0xffffffff);
 
   pEvent_++;
   evtRateCount_++;
   processEvents_->Fill(pEvent_);
 
   lastUpdateTime_=currentTime_;
   gettimeofday(&currentTime_,NULL);  
   processTimeStamp_->Fill(getUTCtime(&currentTime_));
   processLatency_->Fill(getUTCtime(&lastUpdateTime_,&currentTime_));
 
   float time = getUTCtime(&lastAvgTime_,&currentTime_);
   if(time>=(evtRateWindow_*60.0)){
      processEventRate_->Fill((float)evtRateCount_/time);
      evtRateCount_ = 0;
      lastAvgTime_ = currentTime_;    
   }

}
void HLXMonitor::FillHistograms ( const LUMI_SECTION section) [private]

Definition at line 899 of file HLXMonitor.cc.

References AvgEtSum, AvgOccAboveSet1, AvgOccAboveSet2, AvgOccBelowSet1, AvgOccBelowSet2, AvgOccBetweenSet1, AvgOccBetweenSet2, BXvsTimeAvgEtSumHFM, BXvsTimeAvgEtSumHFP, dbe_, HCAL_HLX::LUMI_SECTION::etSum, ETSum, MonitorElement::Fill(), HcalObjRepresent::Fill(), MonitorElement::getBinContent(), MonitorElement::getBinError(), MonitorElement::getMean(), MonitorElement::getRMS(), MonitorElement::getTH1F(), HCAL_HLX::LUMI_SECTION::hdr, HistAvgEtSumHFM, HistAvgEtSumHFP, HistAvgLumiEtSum, HistAvgLumiOccSet1, HistAvgLumiOccSet2, HistAvgOccAboveSet1HFM, HistAvgOccAboveSet1HFP, HistAvgOccAboveSet2HFM, HistAvgOccAboveSet2HFP, HistAvgOccBelowSet1HFM, HistAvgOccBelowSet1HFP, HistAvgOccBelowSet2HFM, HistAvgOccBelowSet2HFP, HistAvgOccBetweenSet1HFM, HistAvgOccBetweenSet1HFP, HistAvgOccBetweenSet2HFM, HistAvgOccBetweenSet2HFP, HistInstantLumiEtSum, HistInstantLumiEtSumError, HistInstantLumiOccSet1, HistInstantLumiOccSet1Error, HistInstantLumiOccSet2, HistInstantLumiOccSet2Error, HistIntegratedLumiEtSum, HistIntegratedLumiOccSet1, HistIntegratedLumiOccSet2, HLXHFMap, lsBinOld, LumiAvgEtSum, LumiAvgOccSet1, LumiAvgOccSet2, HCAL_HLX::LUMI_SECTION::lumiDetail, LumiInstantEtSum, LumiInstantOccSet1, LumiInstantOccSet2, LumiIntegratedEtSum, LumiIntegratedOccSet1, LumiIntegratedOccSet2, lumiSectionCount, HCAL_HLX::LUMI_SECTION::lumiSummary, max(), MaxInstLumiBX1, MaxInstLumiBX2, MaxInstLumiBX3, MaxInstLumiBX4, MaxInstLumiBXNum1, MaxInstLumiBXNum2, MaxInstLumiBXNum3, MaxInstLumiBXNum4, displayMF_cfg::maxX, displayMF_cfg::minX, MissingDQMDataCheck, lumiNorm::norm, num4NibblePerLS_, NUM_BUNCHES, NUM_HLX, HCAL_HLX::LUMI_SECTION::occupancy, previousSection, RecentInstantLumiEtSum, RecentInstantLumiOccSet1, RecentInstantLumiOccSet2, RecentIntegratedLumiEtSum, RecentIntegratedLumiOccSet1, RecentIntegratedLumiOccSet2, sectionInstantErrSumEt, sectionInstantErrSumOcc1, sectionInstantErrSumOcc2, sectionInstantNorm, sectionInstantSumEt, sectionInstantSumOcc1, sectionInstantSumOcc2, Set1Above, set1AboveIndex, Set1Below, set1BelowIndex, Set1Between, set1BetweenIndex, Set2Above, set2AboveIndex, Set2Below, set2BelowIndex, Set2Between, set2BetweenIndex, MonitorElement::setAxisRange(), MonitorElement::setBinContent(), MonitorElement::setBinError(), DQMStore::softReset(), mathSSE::sqrt(), SumAllOccSet1, SumAllOccSet2, tmp, CommonMethods::weight(), XMAX, and XMIN.

Referenced by analyze().

{
   // Check for missing data
   if( previousSection != (section.hdr.sectionNumber-1) ){
      double weight = (double)(section.hdr.sectionNumber-previousSection-1);
      //std::cout << "Filling missing data! " << weight << std::endl;
      MissingDQMDataCheck->Fill(0.5,weight);
   }
   previousSection = section.hdr.sectionNumber;

   int lsBin = int(lumiSectionCount/num4NibblePerLS_);
   int lsBinBX = int(lumiSectionCount/num4NibblePerLS_);
   HistAvgLumiEtSum->Fill(lsBin, section.lumiSummary.InstantETLumi);
   HistAvgLumiOccSet1->Fill(lsBin, section.lumiSummary.InstantOccLumi[0]);
   HistAvgLumiOccSet2->Fill(lsBin, section.lumiSummary.InstantOccLumi[1]);
   //std::cout << "Lumi section count " << lumiSectionCount << " lsBin " << lsBin 
    //   << " lsBinOld " << lsBinOld << " True section: " << section.hdr.sectionNumber << std::endl;

   //std::cout << "Instant Et sum: " << section.lumiSummary.InstantETLumi
   //     << " +/- " << section.lumiSummary.InstantETLumiErr << std::endl;
   //std::cout << "Section sum so far: " << sectionInstantSumEt << " +/- " 
   //     << sqrt(sectionInstantErrSumEt) << std::endl;

   int fillBin = lumiSectionCount+1;
   if( fillBin > 128 )
   {
      // If we are already more than 2 LS's in, move everything back by one bin
      // and fill the last bin with the new value.
      for( int iBin = 1; iBin<128; ++iBin )
      {
         RecentInstantLumiEtSum->setBinContent(iBin,RecentInstantLumiEtSum->getBinContent(iBin+1));
         RecentInstantLumiOccSet1->setBinContent(iBin,RecentInstantLumiOccSet1->getBinContent(iBin+1));
         RecentInstantLumiOccSet2->setBinContent(iBin,RecentInstantLumiOccSet2->getBinContent(iBin+1));
         RecentIntegratedLumiEtSum->setBinContent(iBin,RecentIntegratedLumiEtSum->getBinContent(iBin+1));
         RecentIntegratedLumiOccSet1->setBinContent(iBin,RecentIntegratedLumiOccSet1->getBinContent(iBin+1));
         RecentIntegratedLumiOccSet2->setBinContent(iBin,RecentIntegratedLumiOccSet2->getBinContent(iBin+1));
      }
      fillBin = 128;
   }

   RecentInstantLumiEtSum->setBinContent(fillBin,section.lumiSummary.InstantETLumi);
   RecentInstantLumiEtSum->setBinError(fillBin,section.lumiSummary.InstantETLumiErr);
   RecentInstantLumiOccSet1->setBinContent(fillBin,section.lumiSummary.InstantOccLumi[0]);
   RecentInstantLumiOccSet1->setBinError(fillBin,section.lumiSummary.InstantOccLumiErr[0]);
   RecentInstantLumiOccSet2->setBinContent(fillBin,section.lumiSummary.InstantOccLumi[1]);
   RecentInstantLumiOccSet2->setBinError(fillBin,section.lumiSummary.InstantOccLumiErr[1]);
      
   double recentOldBinContent = RecentIntegratedLumiEtSum->getBinContent(fillBin-1);
   if( fillBin == 1 ) recentOldBinContent = 0;
   double recentNewBinContent = recentOldBinContent + section.lumiSummary.InstantETLumi; 
   RecentIntegratedLumiEtSum->setBinContent(fillBin,recentNewBinContent);
   recentOldBinContent = RecentIntegratedLumiOccSet1->getBinContent(fillBin-1);
   if( fillBin == 1 ) recentOldBinContent = 0;
   recentNewBinContent = recentOldBinContent + section.lumiSummary.InstantOccLumi[0]; 
   RecentIntegratedLumiOccSet1->setBinContent(fillBin,recentNewBinContent);
   recentOldBinContent = RecentIntegratedLumiOccSet2->getBinContent(fillBin-1);
   if( fillBin == 1 ) recentOldBinContent = 0;
   recentNewBinContent = recentOldBinContent + section.lumiSummary.InstantOccLumi[0]; 
   RecentIntegratedLumiOccSet2->setBinContent(fillBin,recentNewBinContent);

   double recentOldBinError = RecentIntegratedLumiEtSum->getBinError(fillBin-1);
   if( fillBin == 1 ) recentOldBinError = 0;
   double recentNewBinError = sqrt(recentOldBinError*recentOldBinError + section.lumiSummary.InstantETLumiErr*section.lumiSummary.InstantETLumiErr); 
   RecentIntegratedLumiEtSum->setBinError(fillBin,recentNewBinError);
   recentOldBinError = RecentIntegratedLumiOccSet1->getBinError(fillBin-1);
   if( fillBin == 1 ) recentOldBinError = 0;
   recentNewBinError = sqrt(recentOldBinError*recentOldBinError + section.lumiSummary.InstantOccLumiErr[0]*section.lumiSummary.InstantOccLumiErr[0]); 
   RecentIntegratedLumiOccSet1->setBinError(fillBin,recentNewBinError);
   recentOldBinError = RecentIntegratedLumiOccSet2->getBinError(fillBin-1);
   if( fillBin == 1 ) recentOldBinError = 0;
   recentNewBinError = sqrt(recentOldBinError*recentOldBinError + section.lumiSummary.InstantOccLumiErr[1]*section.lumiSummary.InstantOccLumiErr[1]); 
   RecentIntegratedLumiOccSet2->setBinError(fillBin,recentNewBinError);

//    std::cout << "New total " << RecentIntegratedLumiEtSum->getBinContent(fillBin) 
//           << " +/- " << RecentIntegratedLumiEtSum->getBinError(fillBin) << std::endl;

   if( lsBinOld != lsBin )
   {
      HistInstantLumiEtSum->setBinContent(lsBin,sectionInstantSumEt);
      HistInstantLumiEtSum->setBinError(lsBin,sqrt(sectionInstantErrSumEt));
      HistInstantLumiOccSet1->setBinContent(lsBin,sectionInstantSumOcc1);
      HistInstantLumiOccSet1->setBinError(lsBin,sqrt(sectionInstantErrSumOcc1));
      HistInstantLumiOccSet2->setBinContent(lsBin,sectionInstantSumOcc2);
      HistInstantLumiOccSet2->setBinError(lsBin,sqrt(sectionInstantErrSumOcc2));
    
      double etDenom   = fabs(sectionInstantSumEt);
      if( etDenom < 1e-10 ) etDenom = 1e-10;
      double occ1Denom   = fabs(sectionInstantSumOcc1);
      if( occ1Denom < 1e-10 ) occ1Denom = 1e-10;
      double occ2Denom   = fabs(sectionInstantSumOcc2);
      if( occ2Denom < 1e-10 ) occ2Denom = 1e-10;
      double etError   = 100.0*sqrt(sectionInstantErrSumEt)/etDenom;
      double occ1Error = 100.0*sqrt(sectionInstantErrSumOcc1)/occ1Denom;
      double occ2Error = 100.0*sqrt(sectionInstantErrSumOcc2)/occ2Denom;
      HistInstantLumiEtSumError->setBinContent(lsBinOld,etError);
      HistInstantLumiOccSet1Error->setBinContent(lsBinOld,occ1Error);
      HistInstantLumiOccSet2Error->setBinContent(lsBinOld,occ2Error);
      
      double histOldBinContent = HistIntegratedLumiEtSum->getBinContent(lsBinOld);
      if( lsBinOld == 0 ) histOldBinContent = 0;
      double histNewBinContent = histOldBinContent + sectionInstantSumEt; 
      HistIntegratedLumiEtSum->setBinContent(lsBin,histNewBinContent);
      histOldBinContent = HistIntegratedLumiOccSet1->getBinContent(lsBinOld);
      if( lsBinOld == 0 ) histOldBinContent = 0;
      histNewBinContent = histOldBinContent + sectionInstantSumOcc1; 
      HistIntegratedLumiOccSet1->setBinContent(lsBin,histNewBinContent);
      histOldBinContent = HistIntegratedLumiOccSet2->getBinContent(lsBinOld);
      if( lsBinOld == 0 ) histOldBinContent = 0;
      histNewBinContent = histOldBinContent + sectionInstantSumOcc2; 
      HistIntegratedLumiOccSet2->setBinContent(lsBin,histNewBinContent);

      double histOldBinError = HistIntegratedLumiEtSum->getBinError(lsBinOld);
      if( lsBinOld == 0 ) histOldBinError = 0;
      double histNewBinError = sqrt(histOldBinError*histOldBinError + sectionInstantErrSumEt); 
      HistIntegratedLumiEtSum->setBinError(lsBin,histNewBinError);
      histOldBinError = HistIntegratedLumiOccSet1->getBinError(lsBinOld);
      if( lsBinOld == 0 ) histOldBinError = 0;
      histNewBinError = sqrt(histOldBinError*histOldBinError + sectionInstantErrSumOcc1); 
      HistIntegratedLumiOccSet1->setBinError(lsBin,histNewBinError);
      histOldBinError = HistIntegratedLumiOccSet2->getBinError(lsBinOld);
      if( lsBinOld == 0 ) histOldBinError = 0;
      histNewBinError = sqrt(histOldBinError*histOldBinError + sectionInstantErrSumOcc2); 
      HistIntegratedLumiOccSet2->setBinError(lsBin,histNewBinError);

      sectionInstantSumEt = 0;
      sectionInstantErrSumEt = 0;
      sectionInstantSumOcc1 = 0;
      sectionInstantErrSumOcc1 = 0;
      sectionInstantSumOcc2 = 0;
      sectionInstantErrSumOcc2 = 0;
      sectionInstantNorm = 0;
      lsBinOld = lsBin;
   }

   sectionInstantSumEt += section.lumiSummary.InstantETLumi;
   sectionInstantErrSumEt += section.lumiSummary.InstantETLumiErr*section.lumiSummary.InstantETLumiErr;
   sectionInstantSumOcc1 += section.lumiSummary.InstantOccLumi[0];
   sectionInstantErrSumOcc1 += section.lumiSummary.InstantOccLumiErr[0]*section.lumiSummary.InstantOccLumiErr[0];
   sectionInstantSumOcc2 += section.lumiSummary.InstantOccLumi[1];
   sectionInstantErrSumOcc2 += section.lumiSummary.InstantOccLumiErr[1]*section.lumiSummary.InstantOccLumiErr[1];
   ++sectionInstantNorm;
   
   dbe_->softReset(LumiInstantEtSum);
   dbe_->softReset(LumiInstantOccSet1);
   dbe_->softReset(LumiInstantOccSet2);

   for( int iHLX = 0; iHLX < (int)NUM_HLX; ++iHLX ){
      unsigned int utotal1= 0;
      unsigned int utotal2 = 0;
      unsigned int iWedge = HLXHFMap[iHLX];
      if(section.occupancy[iHLX].hdr.numNibbles != 0){

         // Don't include the last one hundred BX in the average.
         for( unsigned int iBX = 0; iBX < NUM_BUNCHES; ++iBX ){

            // Normalize to number of towers
            unsigned int norm[2] = {0,0};
            norm[0] += section.occupancy[iHLX].data[set1BelowIndex   ][iBX];
            norm[0] += section.occupancy[iHLX].data[set1BetweenIndex ][iBX];
            norm[0] += section.occupancy[iHLX].data[set1AboveIndex   ][iBX];
            if( norm[0] == 0 ) norm[0]=1;
            norm[1] += section.occupancy[iHLX].data[set2BelowIndex   ][iBX];
            norm[1] += section.occupancy[iHLX].data[set2BetweenIndex ][iBX];
            norm[1] += section.occupancy[iHLX].data[set2AboveIndex   ][iBX];
            if( norm[1] == 0 ) norm[1]=1;

            double normEt = section.etSum[iHLX].data[iBX]/(double)(norm[0]+norm[1]);
            double normOccSet1Below   = (double)section.occupancy[iHLX].data[set1BelowIndex][iBX]/(double)norm[0];
            double normOccSet1Between = (double)section.occupancy[iHLX].data[set1BetweenIndex][iBX]/(double)norm[0];
            double normOccSet1Above   = (double)section.occupancy[iHLX].data[set1AboveIndex][iBX]/(double)norm[0];
            double normOccSet2Below   = (double)section.occupancy[iHLX].data[set2BelowIndex][iBX]/(double)norm[1];
            double normOccSet2Between = (double)section.occupancy[iHLX].data[set2BetweenIndex][iBX]/(double)norm[1];
            double normOccSet2Above   = (double)section.occupancy[iHLX].data[set2AboveIndex][iBX]/(double)norm[1];

            // Averages & check sum
            if( iBX < NUM_BUNCHES-100 )
            {
               AvgEtSum->Fill( iWedge,normEt);
        
               AvgOccBelowSet1->  Fill( iWedge, normOccSet1Below   );
               AvgOccBetweenSet1->Fill( iWedge, normOccSet1Between );
               AvgOccAboveSet1->  Fill( iWedge, normOccSet1Above   );
           
               AvgOccBelowSet2->  Fill( iWedge, normOccSet2Below   );
               AvgOccBetweenSet2->Fill( iWedge, normOccSet2Between );
               AvgOccAboveSet2->  Fill( iWedge, normOccSet2Above   );

               if( iWedge < 18 )
               {
                  HistAvgEtSumHFP->Fill( lsBin,normEt);
                  HistAvgOccBelowSet1HFP->Fill( lsBin,   normOccSet1Below    );
                  HistAvgOccBetweenSet1HFP->Fill( lsBin, normOccSet1Between  );
                  HistAvgOccAboveSet1HFP->Fill( lsBin,   normOccSet1Above    );
                  HistAvgOccBelowSet2HFP->Fill( lsBin,   normOccSet2Below    );
                  HistAvgOccBetweenSet2HFP->Fill( lsBin, normOccSet2Between  );
                  HistAvgOccAboveSet2HFP->Fill( lsBin,   normOccSet2Above    );

                  if( iBX >= (XMIN-1) && iBX <= (XMAX-1) ) BXvsTimeAvgEtSumHFP->Fill(lsBinBX,iBX,normEt/(num4NibblePerLS_*18.0*12.0));
               }
               else
               {
                  HistAvgEtSumHFM->Fill( lsBin,normEt);
                  HistAvgOccBelowSet1HFM->Fill( lsBin,   normOccSet1Below    );
                  HistAvgOccBetweenSet1HFM->Fill( lsBin, normOccSet1Between  );
                  HistAvgOccAboveSet1HFM->Fill( lsBin,   normOccSet1Above    );
                  HistAvgOccBelowSet2HFM->Fill( lsBin,   normOccSet2Below    );
                  HistAvgOccBetweenSet2HFM->Fill( lsBin, normOccSet2Between  );
                  HistAvgOccAboveSet2HFM->Fill( lsBin,   normOccSet2Above    );

                  if( iBX >= (XMIN-1) && iBX <= (XMAX-1) ) BXvsTimeAvgEtSumHFM->Fill(lsBinBX,iBX,normEt/(num4NibblePerLS_*18.0*12.0));
               }

               utotal1 += section.occupancy[iHLX].data[set1BelowIndex  ][iBX];
               utotal1 += section.occupancy[iHLX].data[set1BetweenIndex][iBX];
               utotal1 += section.occupancy[iHLX].data[set1AboveIndex  ][iBX];

               utotal2 += section.occupancy[iHLX].data[set2BelowIndex  ][iBX];
               utotal2 += section.occupancy[iHLX].data[set2BetweenIndex][iBX];
               utotal2 += section.occupancy[iHLX].data[set2AboveIndex  ][iBX];

            }

            if(Style.compare("BX") == 0)
            {
               // Get the correct bin ...
               TH1F *Set1BelowHist = Set1Below[iWedge]->getTH1F();
               int iBin = Set1BelowHist->FindBin((float)iBX);

               // Adjust the old bin content to make the new, unnormalize and renormalize
               if( lumiSectionCount > 0 ){
                  double oldNormOccSet1Below = (Set1Below[iWedge]->getBinContent(iBin))*(double)(lumiSectionCount);
                  normOccSet1Below += oldNormOccSet1Below;
                  normOccSet1Below /= (double)(lumiSectionCount+1);
                  double oldNormOccSet2Below = (Set2Below[iWedge]->getBinContent(iBin))*(double)(lumiSectionCount);
                  normOccSet2Below += oldNormOccSet2Below;
                  normOccSet2Below /= (double)(lumiSectionCount+1);

                  double oldNormOccSet1Between = (Set1Between[iWedge]->getBinContent(iBin))*(double)(lumiSectionCount);
                  normOccSet1Between += oldNormOccSet1Between;
                  normOccSet1Between /= (double)(lumiSectionCount+1);
                  double oldNormOccSet2Between = (Set2Between[iWedge]->getBinContent(iBin))*(double)(lumiSectionCount);
                  normOccSet2Between += oldNormOccSet2Between;
                  normOccSet2Between /= (double)(lumiSectionCount+1);

                  double oldNormOccSet1Above = (Set1Above[iWedge]->getBinContent(iBin))*(double)(lumiSectionCount);
                  normOccSet1Above += oldNormOccSet1Above;
                  normOccSet1Above /= (double)(lumiSectionCount+1);
                  double oldNormOccSet2Above = (Set2Above[iWedge]->getBinContent(iBin))*(double)(lumiSectionCount);
                  normOccSet2Above += oldNormOccSet2Above;
                  normOccSet2Above /= (double)(lumiSectionCount+1);
                  
                  double oldNormEt = ETSum[iWedge]->getBinContent(iBin)*(double)(lumiSectionCount);
                  normEt += oldNormEt;
                  normEt /= (double)(lumiSectionCount+1);
               }

               Set1Below[iWedge]->  setBinContent(iBin, normOccSet1Below   );
               Set1Between[iWedge]->setBinContent(iBin, normOccSet1Between );
               Set1Above[iWedge]->  setBinContent(iBin, normOccSet1Above   );
               Set2Below[iWedge]->  setBinContent(iBin, normOccSet2Below   );
               Set2Between[iWedge]->setBinContent(iBin, normOccSet2Between );
               Set2Above[iWedge]->  setBinContent(iBin, normOccSet2Above   );
               ETSum[iWedge]->      setBinContent(iBin, normEt);

//             Set1Below[iWedge]->  Fill(iBX, normOccSet1Below   );
//             Set1Between[iWedge]->Fill(iBX, normOccSet1Between );
//             Set1Above[iWedge]->  Fill(iBX, normOccSet1Above   );
//             Set2Below[iWedge]->  Fill(iBX, normOccSet2Below   );
//             Set2Between[iWedge]->Fill(iBX, normOccSet2Between );
//             Set2Above[iWedge]->  Fill(iBX, normOccSet2Above   );
//             ETSum[iWedge]->      Fill(iBX, normEt);
            }
            else if(Style.compare("Dist")==0)
            {
               Set1Below[iWedge]->  Fill( normOccSet1Below    );
               Set1Between[iWedge]->Fill( normOccSet1Between  );
               Set1Above[iWedge]->  Fill( normOccSet1Above    );
               Set2Below[iWedge]->  Fill( normOccSet2Below    );
               Set2Between[iWedge]->Fill( normOccSet2Between  );
               Set2Above[iWedge]->  Fill( normOccSet2Above    );
               ETSum[iWedge]->      Fill( normEt );
            }
         }

         // Get the number of towers per wedge per BX (assuming non-zero numbers)
         double total1 = 0;
         double total2 = 0;
         if( (NUM_BUNCHES-100)>0 )
         {
            total1 = (double)utotal1/(double)(NUM_BUNCHES-100);
            total2 = (double)utotal2/(double)(NUM_BUNCHES-100);
         }
         if( section.hdr.numOrbits > 0 ) 
         {
            total1 = total1/(double)section.hdr.numOrbits;
            total2 = total2/(double)section.hdr.numOrbits;
         }

         SumAllOccSet1->  Fill( iWedge, total1 );
         SumAllOccSet2->  Fill( iWedge, total2 );
      }
   }

   double max[4] = {-1000.0,-1000.0,-1000.0,-1000.0};
   int bxmax[4] = {-1,-1,-1,-1};
   for( unsigned int iBX = 0; iBX < NUM_BUNCHES; ++iBX ){
      
      LumiAvgEtSum->Fill(iBX, section.lumiDetail.ETLumi[iBX]);
      LumiAvgOccSet1->Fill(iBX, section.lumiDetail.OccLumi[0][iBX]);
      LumiAvgOccSet2->Fill(iBX, section.lumiDetail.OccLumi[1][iBX]);
      
      if( section.lumiDetail.OccLumi[0][iBX] > max[0] ){
         max[3] = max[2];
         bxmax[3] = bxmax[2];
         max[2] = max[1];
         bxmax[2] = bxmax[1];
         max[1] = max[0];
         bxmax[1] = bxmax[0];
         max[0] = section.lumiDetail.OccLumi[0][iBX];
         bxmax[0] = iBX;
      } else if( section.lumiDetail.OccLumi[0][iBX] > max[1] ){
         max[3] = max[2];
         bxmax[3] = bxmax[2];
         max[2] = max[1];
         bxmax[2] = bxmax[1];
         max[1] = section.lumiDetail.OccLumi[0][iBX];
         bxmax[1] = iBX;
      } else if( section.lumiDetail.OccLumi[0][iBX] > max[2] ){
         max[3] = max[2];
         bxmax[3] = bxmax[2];
         max[2] = section.lumiDetail.OccLumi[0][iBX];
         bxmax[2] = iBX;
      } else if( section.lumiDetail.OccLumi[0][iBX] > max[3] ){
         max[3] = section.lumiDetail.OccLumi[0][iBX];
         bxmax[3] = iBX;
      }

      int iBin = iBX - (int)XMIN + 1;
      if( iBin <= int(XMAX-XMIN) && iBin >= 1 ){

         //cout << "Et sum " << section.lumiDetail.ETLumi[iBX] << " +/- " 
         //   << section.lumiDetail.ETLumiErr[iBX] << std::endl;
         //cout << "Occ1 " << section.lumiDetail.OccLumi[0][iBX] << " +/- " 
         //   << section.lumiDetail.OccLumiErr[0][iBX] << std::endl;
         //cout << "Occ2 " << section.lumiDetail.OccLumi[1][iBX] << " +/- " 
         //   << section.lumiDetail.OccLumiErr[1][iBX] << std::endl;
         LumiInstantEtSum->setBinContent(iBin, section.lumiDetail.ETLumi[iBX]);
         LumiInstantOccSet1->setBinContent(iBin, section.lumiDetail.OccLumi[0][iBX]);
         LumiInstantOccSet2->setBinContent(iBin, section.lumiDetail.OccLumi[1][iBX]);
         LumiInstantEtSum->setBinError(iBin, section.lumiDetail.ETLumiErr[iBX]);
         LumiInstantOccSet1->setBinError(iBin, section.lumiDetail.OccLumiErr[0][iBX]);
         LumiInstantOccSet2->setBinError(iBin, section.lumiDetail.OccLumiErr[1][iBX]);
         
         double oldBinContent = LumiIntegratedEtSum->getBinContent(iBin);
         if( lumiSectionCount == 0 ) oldBinContent = 0;
         double newBinContent = oldBinContent + section.lumiDetail.ETLumi[iBX];
         LumiIntegratedEtSum->setBinContent(iBin, newBinContent);
         oldBinContent = LumiIntegratedOccSet1->getBinContent(iBin);
         if( lumiSectionCount == 0 ) oldBinContent = 0;
         newBinContent = oldBinContent + section.lumiDetail.OccLumi[0][iBX];
         LumiIntegratedOccSet1->setBinContent(iBin, newBinContent);
         oldBinContent = LumiIntegratedOccSet2->getBinContent(iBin);
         if( lumiSectionCount == 0 ) oldBinContent = 0;
         newBinContent = oldBinContent + section.lumiDetail.OccLumi[1][iBX];
         LumiIntegratedOccSet2->setBinContent(iBin, newBinContent);

         double oldBinError = LumiIntegratedEtSum->getBinError(iBin);
         if( lumiSectionCount == 0 ) oldBinError = 0;
         double newBinError = sqrt(oldBinError*oldBinError + section.lumiDetail.ETLumiErr[iBX]*section.lumiDetail.ETLumiErr[iBX]);
         LumiIntegratedEtSum->setBinError(iBin, newBinError);
         oldBinError = LumiIntegratedOccSet1->getBinError(iBin);
         if( lumiSectionCount == 0 ) oldBinError = 0;
         newBinError = sqrt(oldBinError*oldBinError + section.lumiDetail.OccLumiErr[0][iBX]*section.lumiDetail.OccLumiErr[0][iBX]);
         LumiIntegratedOccSet1->setBinError(iBin, newBinError);
         oldBinError = LumiIntegratedOccSet1->getBinError(iBin);
         if( lumiSectionCount == 0 ) oldBinError = 0;
         newBinError = sqrt(oldBinError*oldBinError + section.lumiDetail.OccLumiErr[1][iBX]*section.lumiDetail.OccLumiErr[1][iBX]);
         LumiIntegratedOccSet2->setBinError(iBin, newBinError);
      }
   }

   // Now fill the maximum hists, but ordered by BX, so that
   // collision BX's or satellite BX's will always appear in the 
   // same histogram.
   int flag=1;
   for( int iM = 0; (iM<4)&&flag; ++iM ){
      flag = 0;
      for( int iN = 0; iN < 3; ++iN ){
         if( bxmax[iN+1] < bxmax[iN] ){
            int tmp = bxmax[iN];
            bxmax[iN]   = bxmax[iN+1];  
            bxmax[iN+1] = tmp;

            double tmp2 = max[iN];
            max[iN]     = max[iN+1];  
            max[iN+1]   = tmp2;
            flag=1;
         }
      }
   }

   // 0.9e1 = Conversion constant for occ1 at 900GeV COM.
   MaxInstLumiBX1->Fill(max[0]*0.9e1);
   MaxInstLumiBXNum1->Fill(bxmax[0]);
   MaxInstLumiBX2->Fill(max[1]*0.9e1);
   MaxInstLumiBXNum2->Fill(bxmax[1]);
   MaxInstLumiBX3->Fill(max[2]*0.9e1);
   MaxInstLumiBXNum3->Fill(bxmax[2]);
   MaxInstLumiBX4->Fill(max[3]*0.9e1);
   MaxInstLumiBXNum4->Fill(bxmax[3]);

   TH1F* tmpHist = MaxInstLumiBX1->getTH1F();
   double minX = tmpHist->GetBinLowEdge(1);
   double maxX = tmpHist->GetBinLowEdge(tmpHist->GetNbinsX()+1);

   int inum4NibblePerLS = (int)num4NibblePerLS_;
   if( lumiSectionCount%inum4NibblePerLS == 0 ){
      double mean1 = MaxInstLumiBX1->getMean();
      double rms1  = MaxInstLumiBX1->getRMS();
      if( rms1 > 0 && mean1-5*rms1 > minX && mean1+5*rms1<maxX ) MaxInstLumiBX1->setAxisRange(mean1-5*rms1,mean1+5*rms1);

      double mean2 = MaxInstLumiBX2->getMean();
      double rms2  = MaxInstLumiBX2->getRMS();
      if( rms2 > 0 && mean2-5*rms2 > minX && mean2+5*rms2<maxX ) MaxInstLumiBX2->setAxisRange(mean2-5*rms2,mean2+5*rms2);
 
      double mean3 = MaxInstLumiBX3->getMean();
      double rms3  = MaxInstLumiBX3->getRMS();
      if( rms3 > 0 && mean3-5*rms3 > minX && mean3+5*rms3<maxX ) MaxInstLumiBX3->setAxisRange(mean3-5*rms3,mean3+5*rms3);

      double mean4 = MaxInstLumiBX4->getMean();
      double rms4  = MaxInstLumiBX4->getRMS();
      if( rms4 > 0 && mean4-5*rms4 > minX && mean4+5*rms4<maxX ) MaxInstLumiBX4->setAxisRange(mean4-5*rms4,mean4+5*rms4);
   }
   

   // Add one to the section count (usually short sections)
   ++lumiSectionCount;
}
void HLXMonitor::FillHistoHFCompare ( const LUMI_SECTION section) [private]

Definition at line 1339 of file HLXMonitor.cc.

References HCAL_HLX::LUMI_SECTION::etSum, MonitorElement::Fill(), HFCompareEtSum, HFCompareOccAboveSet1, HFCompareOccAboveSet2, HFCompareOccBelowSet1, HFCompareOccBelowSet2, HFCompareOccBetweenSet1, HFCompareOccBetweenSet2, HLXHFMap, NUM_HLX, HCAL_HLX::LUMI_SECTION::occupancy, set1AboveIndex, set1BelowIndex, set1BetweenIndex, set2AboveIndex, set2BelowIndex, set2BetweenIndex, pileupDistInMC::total, and TriggerBX.

Referenced by analyze().

{

  for( unsigned int iHLX = 0; iHLX < NUM_HLX; ++iHLX ){

    unsigned int iWedge = HLXHFMap[iHLX];
      
    if(section.occupancy[iHLX].hdr.numNibbles != 0){
      float nActvTwrsSet1 = section.occupancy[iHLX].data[set1AboveIndex][TriggerBX]
        + section.occupancy[iHLX].data[set1BetweenIndex][TriggerBX]
        + section.occupancy[iHLX].data[set1BelowIndex][TriggerBX];
      
      float nActvTwrsSet2 = section.occupancy[iHLX].data[set2AboveIndex][TriggerBX]
        + section.occupancy[iHLX].data[set2BetweenIndex][TriggerBX]
        + section.occupancy[iHLX].data[set2BelowIndex][TriggerBX];
      
      float total = nActvTwrsSet1 + nActvTwrsSet2;
      
      if( total > 0){  
        float tempData = section.etSum[iHLX].data[TriggerBX]/total;
        //cout << "Filling HFCompare Et sum " << tempData << endl;
        HFCompareEtSum->Fill( iWedge, tempData );
      }
      
      if(nActvTwrsSet1 > 0){
        float tempData = (float)section.occupancy[iHLX].data[set1BelowIndex][TriggerBX]/nActvTwrsSet1;
        HFCompareOccBelowSet1->Fill( iWedge, tempData);
        
        tempData = (float)section.occupancy[iHLX].data[set1BetweenIndex][TriggerBX]/nActvTwrsSet1;
        HFCompareOccBetweenSet1->Fill( iWedge, tempData); 
        
        tempData = (float)section.occupancy[iHLX].data[set1AboveIndex][TriggerBX]/nActvTwrsSet1;
        HFCompareOccAboveSet1->Fill( iWedge, tempData); 
      }
      
      if( nActvTwrsSet2 > 0){
        float tempData = (float)section.occupancy[iHLX].data[set2BelowIndex][TriggerBX]/nActvTwrsSet2;
        HFCompareOccBelowSet2->Fill( iWedge, tempData);
        
        tempData = (float)section.occupancy[iHLX].data[set2BetweenIndex][TriggerBX]/nActvTwrsSet2;
        HFCompareOccBetweenSet2->Fill( iWedge, tempData); 
        
        tempData = (float)section.occupancy[iHLX].data[set2AboveIndex][TriggerBX]/nActvTwrsSet2;
        HFCompareOccAboveSet2->Fill( iWedge, tempData); 
      }
    }
  }
}
void HLXMonitor::FillReportSummary ( ) [private]

Definition at line 1425 of file HLXMonitor.cc.

References expectedNibbles_, MonitorElement::Fill(), cropTnPTrees::frac, HLXHFMap, NUM_HLX, reportSummary_, reportSummaryMap_, MonitorElement::setBinContent(), and totalNibbles_.

Referenced by analyze(), and EndRun().

                                  {
   // Run summary - Loop over the HLX's and fill the map, 
   // also calculate the overall quality.
   float overall = 0.0;
   for( unsigned int iHLX = 0; iHLX < NUM_HLX; ++iHLX ){
      unsigned int iWedge = HLXHFMap[iHLX] + 1;
      unsigned int iEta = 2;
      float frac = 0.0;
      if( expectedNibbles_ > 0 ) frac = (float)totalNibbles_[iWedge-1]/(float)expectedNibbles_; 
      if( iWedge >= 19 ){ iEta = 1; iWedge -= 18; }
      reportSummaryMap_->setBinContent(iWedge,iEta,frac);
      overall += frac;
   }   
      
   overall /= (float)NUM_HLX;
   if( overall > 1.0 ) overall = 0.0;
   //std::cout << "Filling report summary! Main. " << overall << std::endl;
   reportSummary_->Fill(overall);
}
double HLXMonitor::getUTCtime ( timeval *  a,
timeval *  b = NULL 
) [private]

Definition at line 1547 of file HLXMonitor.cc.

References NULL.

Referenced by analyze(), FillEventInfo(), and SetupEventInfo().

                                                   {
  double deltaT=(*a).tv_sec*1000.0+(*a).tv_usec/1000.0;
  if(b!=NULL) deltaT=(*b).tv_sec*1000.0+(*b).tv_usec/1000.0 - deltaT;
  return deltaT/1000.0;
}
void HLXMonitor::ResetAll ( ) [private]

Definition at line 1445 of file HLXMonitor.cc.

References AvgEtSum, AvgOccAboveSet1, AvgOccAboveSet2, AvgOccBelowSet1, AvgOccBelowSet2, AvgOccBetweenSet1, AvgOccBetweenSet2, BXvsTimeAvgEtSumHFM, BXvsTimeAvgEtSumHFP, dbe_, ETSum, HFCompareEtSum, HFCompareOccAboveSet1, HFCompareOccAboveSet2, HFCompareOccBelowSet1, HFCompareOccBelowSet2, HFCompareOccBetweenSet1, HFCompareOccBetweenSet2, HistAvgEtSumHFM, HistAvgEtSumHFP, HistAvgLumiEtSum, HistAvgLumiOccSet1, HistAvgLumiOccSet2, HistAvgOccAboveSet1HFM, HistAvgOccAboveSet1HFP, HistAvgOccAboveSet2HFM, HistAvgOccAboveSet2HFP, HistAvgOccBelowSet1HFM, HistAvgOccBelowSet1HFP, HistAvgOccBelowSet2HFM, HistAvgOccBelowSet2HFP, HistAvgOccBetweenSet1HFM, HistAvgOccBetweenSet1HFP, HistAvgOccBetweenSet2HFM, HistAvgOccBetweenSet2HFP, HistInstantLumiEtSum, HistInstantLumiEtSumError, HistInstantLumiOccSet1, HistInstantLumiOccSet1Error, HistInstantLumiOccSet2, HistInstantLumiOccSet2Error, HistIntegratedLumiEtSum, HistIntegratedLumiOccSet1, HistIntegratedLumiOccSet2, LumiAvgEtSum, LumiAvgOccSet1, LumiAvgOccSet2, LumiInstantEtSum, LumiInstantOccSet1, LumiInstantOccSet2, LumiIntegratedEtSum, LumiIntegratedOccSet1, LumiIntegratedOccSet2, lumiSectionCount, MaxInstLumiBX1, MaxInstLumiBX2, MaxInstLumiBX3, MaxInstLumiBX4, MaxInstLumiBXNum1, MaxInstLumiBXNum2, MaxInstLumiBXNum3, MaxInstLumiBXNum4, MissingDQMDataCheck, NUM_HLX, previousSection, RecentInstantLumiEtSum, RecentInstantLumiOccSet1, RecentInstantLumiOccSet2, RecentIntegratedLumiEtSum, RecentIntegratedLumiOccSet1, RecentIntegratedLumiOccSet2, Set1Above, Set1Below, Set1Between, Set2Above, Set2Below, Set2Between, DQMStore::softReset(), SumAllOccSet1, and SumAllOccSet2.

Referenced by EndRun().

{
   for( unsigned int iHLX = 0; iHLX < NUM_HLX; ++iHLX )
   {
      dbe_->softReset( Set1Below[iHLX] );
      dbe_->softReset( Set1Between[iHLX] );
      dbe_->softReset( Set1Above[iHLX] );
      dbe_->softReset( Set2Below[iHLX] );
      dbe_->softReset( Set2Between[iHLX] );
      dbe_->softReset( Set2Above[iHLX] );
           
      dbe_->softReset( ETSum[iHLX] );
           
   }
         
   dbe_->softReset(HFCompareEtSum);
   dbe_->softReset(HFCompareOccBelowSet1);
   dbe_->softReset(HFCompareOccBetweenSet1);
   dbe_->softReset(HFCompareOccAboveSet1);
   dbe_->softReset(HFCompareOccBelowSet2);
   dbe_->softReset(HFCompareOccBetweenSet2);
   dbe_->softReset(HFCompareOccAboveSet2);

   dbe_->softReset(AvgEtSum);
   dbe_->softReset(AvgOccBelowSet1);
   dbe_->softReset(AvgOccBetweenSet1);
   dbe_->softReset(AvgOccAboveSet1);
   dbe_->softReset(AvgOccBelowSet2);
   dbe_->softReset(AvgOccBetweenSet2);
   dbe_->softReset(AvgOccAboveSet2);

   // Luminosity Monitoring
   dbe_->softReset(LumiAvgEtSum);
   dbe_->softReset(LumiAvgOccSet1);
   dbe_->softReset(LumiAvgOccSet2);
   dbe_->softReset(LumiInstantEtSum);
   dbe_->softReset(LumiInstantOccSet1);
   dbe_->softReset(LumiInstantOccSet2);
   dbe_->softReset(LumiIntegratedEtSum);
   dbe_->softReset(LumiIntegratedOccSet1);
   dbe_->softReset(LumiIntegratedOccSet2);

   // Sanity Check for Occupancy
   dbe_->softReset(SumAllOccSet1);
   dbe_->softReset(SumAllOccSet2);
   dbe_->softReset(MissingDQMDataCheck);

   dbe_->softReset(MaxInstLumiBX1);
   dbe_->softReset(MaxInstLumiBX2);
   dbe_->softReset(MaxInstLumiBX3);
   dbe_->softReset(MaxInstLumiBX4);

   dbe_->softReset(MaxInstLumiBXNum1);
   dbe_->softReset(MaxInstLumiBXNum2);
   dbe_->softReset(MaxInstLumiBXNum3);
   dbe_->softReset(MaxInstLumiBXNum4);


   // History 
   lumiSectionCount = 0;
   previousSection = 0;
   dbe_->softReset(HistAvgEtSumHFP);
   dbe_->softReset(HistAvgEtSumHFM);

   dbe_->softReset(HistAvgOccBelowSet1HFP);
   dbe_->softReset(HistAvgOccBelowSet1HFM);
   dbe_->softReset(HistAvgOccBetweenSet1HFP);
   dbe_->softReset(HistAvgOccBetweenSet1HFM);
   dbe_->softReset(HistAvgOccAboveSet1HFP);
   dbe_->softReset(HistAvgOccAboveSet1HFM);

   dbe_->softReset(HistAvgOccBelowSet2HFP);
   dbe_->softReset(HistAvgOccBelowSet2HFM);
   dbe_->softReset(HistAvgOccBetweenSet2HFP);
   dbe_->softReset(HistAvgOccBetweenSet2HFM);
   dbe_->softReset(HistAvgOccAboveSet2HFP);
   dbe_->softReset(HistAvgOccAboveSet2HFM);

   dbe_->softReset(HistAvgLumiEtSum);
   dbe_->softReset(HistAvgLumiOccSet1);
   dbe_->softReset(HistAvgLumiOccSet2);
   dbe_->softReset(HistInstantLumiEtSum);
   dbe_->softReset(HistInstantLumiOccSet1);
   dbe_->softReset(HistInstantLumiOccSet2);
   dbe_->softReset(HistInstantLumiEtSumError);
   dbe_->softReset(HistInstantLumiOccSet1Error);
   dbe_->softReset(HistInstantLumiOccSet2Error);
   dbe_->softReset(HistIntegratedLumiEtSum);
   dbe_->softReset(HistIntegratedLumiOccSet1);
   dbe_->softReset(HistIntegratedLumiOccSet2);

   dbe_->softReset(RecentInstantLumiEtSum);
   dbe_->softReset(RecentInstantLumiOccSet1);
   dbe_->softReset(RecentInstantLumiOccSet2);
   dbe_->softReset(RecentIntegratedLumiEtSum);
   dbe_->softReset(RecentIntegratedLumiOccSet1);
   dbe_->softReset(RecentIntegratedLumiOccSet2);

   dbe_->softReset(BXvsTimeAvgEtSumHFP);
   dbe_->softReset(BXvsTimeAvgEtSumHFM);
}
void HLXMonitor::SaveDQMFile ( ) [private]

Definition at line 807 of file HLXMonitor.cc.

References DQMStore::cd(), dbe_, DQMStore::getSubdirs(), i, OutputDir, OutputFilePrefix, runNumber_, runNumLength, DQMStore::save(), DQMStore::SaveWithoutReference, dqm::qstatus::STATUS_OK, and subSystemName_.

Referenced by EndRun().

                            {

  std::ostringstream tempStreamer;
  tempStreamer << OutputDir << "/" << OutputFilePrefix << "_" << subSystemName_
               << "_R" << std::setfill('0') << std::setw(runNumLength) 
               << runNumber_ << "_T00000001.root";

  std::vector<std::string> systems = (dbe_->cd(), dbe_->getSubdirs());
  char rewrite[64]; sprintf(rewrite, "\\1Run %d/\\2/Run summary", runNumber_);
  int saveReference_ = DQMStore::SaveWithoutReference;
  int saveReferenceQMin_ = dqm::qstatus::STATUS_OK;

  for( size_t i = 0, e = systems.size(); i != e; ++i )
     if (systems[i] != "Reference")
         dbe_->save( tempStreamer.str(), systems[i], "^(Reference/)?([^/]+)", rewrite,
                     (DQMStore::SaveReferenceTag)saveReference_, saveReferenceQMin_);

  //dbe_->save(tempStreamer.str());
}
void HLXMonitor::SetupEventInfo ( ) [private]

Definition at line 646 of file HLXMonitor.cc.

References DQMStore::book2D(), DQMStore::bookFloat(), DQMStore::bookInt(), DQMStore::bookString(), cmsswVer_, currentTime_, dbe_, eventId_, eventInfoFolder_, eventInfoFolderHLX_, eventTimeStamp_, evtRateCount_, evtRateWindow_, MonitorElement::Fill(), edm::getReleaseVersion(), MonitorElement::getTH2F(), getUTCtime(), HLXHFMap, hostName_, lastAvgTime_, lumisecId_, NULL, NUM_HLX, nUpdates_, pEvent_, processEventRate_, processEvents_, processId_, processLatency_, processName_, processStartTimeStamp_, processTimeStamp_, reportSummary_, reportSummaryMap_, runId_, runStartTimeStamp_, MonitorElement::setBinContent(), DQMStore::setCurrentFolder(), subSystemName_, and workingDir_.

Referenced by HLXMonitor().

{

   using std::string;

   string currentfolder = subSystemName_ + "/" +  eventInfoFolderHLX_;
   //cout << "currentfolder " << currentfolder << endl;

   dbe_->setCurrentFolder(currentfolder) ;

   pEvent_ = 0;
   evtRateCount_ = 0;
   gettimeofday(&currentTime_,NULL);
   lastAvgTime_ = currentTime_;
   evtRateWindow_ = 0.5;

   //Event specific contents
   runId_     = dbe_->bookInt("iRun");
   lumisecId_ = dbe_->bookInt("iLumiSection");

   eventId_   = dbe_->bookInt("iEvent");
   eventId_->Fill(-1);
   eventTimeStamp_ = dbe_->bookFloat("eventTimeStamp");
   
   dbe_->setCurrentFolder(currentfolder) ;
   //Process specific contents
   processTimeStamp_ = dbe_->bookFloat("processTimeStamp");
   processTimeStamp_->Fill(getUTCtime(&currentTime_));
   processLatency_ = dbe_->bookFloat("processLatency");
   processTimeStamp_->Fill(-1);
   processEvents_ = dbe_->bookInt("processedEvents");
   processEvents_->Fill(pEvent_);
   processEventRate_ = dbe_->bookFloat("processEventRate");
   processEventRate_->Fill(-1); 
   nUpdates_= dbe_->bookInt("processUpdates");
   nUpdates_->Fill(-1);
 
   //Static Contents
   processId_= dbe_->bookInt("processID"); 
   processId_->Fill(gSystem->GetPid());
   processStartTimeStamp_ = dbe_->bookFloat("processStartTimeStamp");
   processStartTimeStamp_->Fill(getUTCtime(&currentTime_));
   runStartTimeStamp_ = dbe_->bookFloat("runStartTimeStamp");
   hostName_= dbe_->bookString("hostName",gSystem->HostName());
   processName_= dbe_->bookString("processName",subSystemName_);
   workingDir_= dbe_->bookString("workingDir",gSystem->pwd());
   cmsswVer_= dbe_->bookString("CMSSW_Version",edm::getReleaseVersion());
   // dqmPatch_= dbe_->bookString("DQM_Patch",dbe_->getDQMPatchVersion());

   // Go to the standard EventInfo folder (in the case online case where this
   // is different).
   currentfolder = subSystemName_ + "/" +  eventInfoFolder_;
   dbe_->setCurrentFolder(currentfolder) ;

   reportSummary_ = dbe_->bookFloat("reportSummary");
   reportSummaryMap_ = dbe_->book2D("reportSummaryMap", "reportSummaryMap", 18, 0., 18., 2, -1.5, 1.5);

   currentfolder = subSystemName_ + "/" +  eventInfoFolderHLX_;
   dbe_->setCurrentFolder(currentfolder) ;

   TH2F *summaryHist = reportSummaryMap_->getTH2F();
   summaryHist->GetYaxis()->SetBinLabel(1,"HF-");
   summaryHist->GetYaxis()->SetBinLabel(2,"HF+");
   summaryHist->GetXaxis()->SetTitle("Wedge #");

   // Fill the report summary objects with default values, since these will only
   // be filled at the change of run.
   reportSummary_->Fill(1.0);

   for( unsigned int iHLX = 0; iHLX < NUM_HLX; ++iHLX ){
      unsigned int iWedge = HLXHFMap[iHLX] + 1;
      unsigned int iEta = 2;
      if( iWedge >= 19 ){ iEta = 1; iWedge -= 18; }
      reportSummaryMap_->setBinContent(iWedge,iEta,1.0);
   }   
}
void HLXMonitor::SetupHists ( ) [private]

Definition at line 125 of file HLXMonitor.cc.

References Accumulate, AvgEtSum, AvgOccAboveSet1, AvgOccAboveSet2, AvgOccBelowSet1, AvgOccBelowSet2, AvgOccBetweenSet1, AvgOccBetweenSet2, DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookProfile(), BXvsTimeAvgEtSumHFM, BXvsTimeAvgEtSumHFP, DQMStore::cd(), gather_cfg::cout, dbe_, ETSum, EtXAxisTitle, EtYAxisTitle, DQMStore::getSubdirs(), HFCompareEtSum, HFCompareOccAboveSet1, HFCompareOccAboveSet2, HFCompareOccBelowSet1, HFCompareOccBelowSet2, HFCompareOccBetweenSet1, HFCompareOccBetweenSet2, HistAvgEtSumHFM, HistAvgEtSumHFP, HistAvgLumiEtSum, HistAvgLumiOccSet1, HistAvgLumiOccSet2, HistAvgOccAboveSet1HFM, HistAvgOccAboveSet1HFP, HistAvgOccAboveSet2HFM, HistAvgOccAboveSet2HFP, HistAvgOccBelowSet1HFM, HistAvgOccBelowSet1HFP, HistAvgOccBelowSet2HFM, HistAvgOccBelowSet2HFP, HistAvgOccBetweenSet1HFM, HistAvgOccBetweenSet1HFP, HistAvgOccBetweenSet2HFM, HistAvgOccBetweenSet2HFP, HistInstantLumiEtSum, HistInstantLumiEtSumError, HistInstantLumiOccSet1, HistInstantLumiOccSet1Error, HistInstantLumiOccSet2, HistInstantLumiOccSet2Error, HistIntegratedLumiEtSum, HistIntegratedLumiOccSet1, HistIntegratedLumiOccSet2, i, LumiAvgEtSum, LumiAvgOccSet1, LumiAvgOccSet2, LumiInstantEtSum, LumiInstantOccSet1, LumiInstantOccSet2, LumiIntegratedEtSum, LumiIntegratedOccSet1, LumiIntegratedOccSet2, MAX_LS, MaxInstLumiBX1, MaxInstLumiBX2, MaxInstLumiBX3, MaxInstLumiBX4, MaxInstLumiBXNum1, MaxInstLumiBXNum2, MaxInstLumiBXNum3, MaxInstLumiBXNum4, MissingDQMDataCheck, monitorName_, NBINS, NUM_HLX, OccXAxisTitle, OccYAxisTitle, RecentInstantLumiEtSum, RecentInstantLumiOccSet1, RecentInstantLumiOccSet2, RecentIntegratedLumiEtSum, RecentIntegratedLumiOccSet1, RecentIntegratedLumiOccSet2, Set1Above, Set1Below, Set1Between, Set2Above, Set2Below, Set2Between, MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), MonitorElement::setResetMe(), DQMStore::showDirStructure(), SumAllOccSet1, SumAllOccSet2, DQMStore::tagContents(), XMAX, and XMIN.

Referenced by HLXMonitor().

{

  dbe_->setCurrentFolder(monitorName_+"/HFPlus");

  for( unsigned int iWedge = 0; iWedge < 18 && iWedge < NUM_HLX; ++iWedge )
    {  
      std::ostringstream tempStreamer;
      tempStreamer << std::dec << std::setw(2) << std::setfill('0') << (iWedge+1);

      std::ostringstream wedgeNum;      
      wedgeNum << std::dec << (iWedge % 18) + 1;

      dbe_->setCurrentFolder(monitorName_+"/HFPlus/Wedge"+tempStreamer.str());

      Set1Below[iWedge]   = dbe_->book1D("Set1_Below",   
                                    "HF+ Wedge "+wedgeNum.str()+": Below Threshold 1 - Set 1",  
                                    NBINS, XMIN, XMAX);
      Set1Between[iWedge] = dbe_->book1D("Set1_Between", 
                                    "HF+ Wedge "+wedgeNum.str()+": Between Threshold 1 & 2 - Set 1",
                                    NBINS, XMIN, XMAX);
      Set1Above[iWedge]   = dbe_->book1D("Set1_Above",   
                                    "HF+ Wedge "+wedgeNum.str()+": Above Threshold 2 - Set 1",  
                                    NBINS, XMIN, XMAX);
      Set2Below[iWedge]   = dbe_->book1D("Set2_Below",   
                                    "HF+ Wedge "+wedgeNum.str()+": Below Threshold 1 - Set 2",  
                                    NBINS, XMIN, XMAX);
      Set2Between[iWedge] = dbe_->book1D("Set2_Between", 
                                    "HF+ Wedge "+wedgeNum.str()+": Between Threshold 1 & 2 - Set 2",
                                    NBINS, XMIN, XMAX);
      Set2Above[iWedge]   = dbe_->book1D("Set2_Above",   
                                    "HF+ Wedge "+wedgeNum.str()+": Above Threshold 2 - Set 2",  
                                    NBINS, XMIN, XMAX);    
      ETSum[iWedge]       = dbe_->book1D("ETSum",        
                                    "HF+ Wedge "+wedgeNum.str()+": Transverse Energy",                
                                    NBINS, XMIN, XMAX);    

      dbe_->tagContents(monitorName_+"/HFPlus/Wedge"+tempStreamer.str(), iWedge+1);
   }

   if(NUM_HLX > 17)
   {
      dbe_->setCurrentFolder(monitorName_+"/HFMinus");
    
      for( unsigned int iWedge=18; iWedge < NUM_HLX; ++iWedge )
      {
         std::ostringstream tempStreamer;
         tempStreamer << std::dec << std::setw(2) << std::setfill('0') << (iWedge+1);

         std::ostringstream wedgeNum;      
         wedgeNum << std::dec << (iWedge % 18) + 1;

         dbe_->setCurrentFolder(monitorName_+"/HFMinus/Wedge"+tempStreamer.str());
         Set1Below[iWedge]   = dbe_->book1D("Set1_Below",
                                       "HF- Wedge "+wedgeNum.str()+": Below Threshold 1 - Set 1",  
                                       NBINS, XMIN, XMAX);
         Set1Between[iWedge] = dbe_->book1D("Set1_Between",
                                       "HF- Wedge "+wedgeNum.str()+": Between Threshold 1 & 2 - Set 1",
                                       NBINS, XMIN, XMAX);
         Set1Above[iWedge]   = dbe_->book1D("Set1_Above",   
                                       "HF- Wedge "+wedgeNum.str()+": Above Threshold 2 - Set 1",  
                                       NBINS, XMIN, XMAX); 
         Set2Below[iWedge]   = dbe_->book1D("Set2_Below",   
                                       "HF- Wedge "+wedgeNum.str()+": Below Threshold 1 - Set 2",  
                                       NBINS, XMIN, XMAX); 
         Set2Between[iWedge] = dbe_->book1D("Set2_Between", 
                                       "HF- Wedge "+wedgeNum.str()+": Between Threshold 1 & 2 - Set 2",
                                       NBINS, XMIN, XMAX); 
         Set2Above[iWedge]   = dbe_->book1D("Set2_Above",   
                                       "HF- Wedge "+wedgeNum.str()+": Above Threshold 2 - Set 2",  
                                       NBINS, XMIN, XMAX); 
         ETSum[iWedge]       = dbe_->book1D("ETSum",        
                                       "HF- Wedge "+wedgeNum.str()+": Transverse Energy",                
                                       NBINS, XMIN, XMAX); 

         dbe_->tagContents(monitorName_+"/HFMinus/Wedge"+tempStreamer.str(), iWedge+1);
      }
   }

   if(!Accumulate){
     for( unsigned int iWedge = 0; iWedge < NUM_HLX; ++iWedge ){   
       Set1Below[iWedge]->  setResetMe(true);
       Set1Between[iWedge]->setResetMe(true);
       Set1Above[iWedge]->  setResetMe(true);
       Set2Below[iWedge]->  setResetMe(true);
       Set2Between[iWedge]->setResetMe(true);
       Set2Above[iWedge]->  setResetMe(true);
       ETSum[iWedge]->      setResetMe(true);    
     }
   }
  
   if(Style.compare("BX") == 0){
     OccXAxisTitle = "Bunch Crossing";
     OccYAxisTitle = "Tower Occupancy";
     EtXAxisTitle  = "Bunch Crossing";
     EtYAxisTitle  = "E_{T} Sum";
   }else if(Style.compare("Distribution")==0){
      OccXAxisTitle = "Tower Occupancy";
      OccYAxisTitle = "Count";
      EtXAxisTitle  = "E_{T} Sum";
      EtYAxisTitle  = "Count";
   }
  
   for( unsigned int iWedge=0; iWedge < NUM_HLX; ++iWedge )
   {
      Set1Below[iWedge]->  setAxisTitle(OccXAxisTitle, 1);
      Set1Below[iWedge]->  setAxisTitle(OccYAxisTitle, 2);
      Set1Between[iWedge]->setAxisTitle(OccXAxisTitle, 1);
      Set1Between[iWedge]->setAxisTitle(OccYAxisTitle, 2);
      Set1Above[iWedge]->  setAxisTitle(OccXAxisTitle, 1);
      Set1Above[iWedge]->  setAxisTitle(OccYAxisTitle, 2);      
      Set2Below[iWedge]->  setAxisTitle(OccXAxisTitle, 1);
      Set2Below[iWedge]->  setAxisTitle(OccYAxisTitle, 2);
      Set2Between[iWedge]->setAxisTitle(OccXAxisTitle, 1);
      Set2Between[iWedge]->setAxisTitle(OccYAxisTitle, 2);
      Set2Above[iWedge]->  setAxisTitle(OccXAxisTitle, 1);
      Set2Above[iWedge]->  setAxisTitle(OccYAxisTitle, 2);      
      ETSum[iWedge]->      setAxisTitle(EtXAxisTitle,  1);
      ETSum[iWedge]->      setAxisTitle(EtYAxisTitle,  2);        
   }

   // Comparison Histograms
  
   dbe_->setCurrentFolder(monitorName_+"/HFCompare");

   std::string CompXTitle      = "HF Wedge";
   std::string CompEtSumYTitle = "E_{T} Sum per active tower";
   std::string CompOccYTitle   = "Occupancy per active tower";

   HFCompareEtSum = dbe_->book1D("HFCompareEtSum","E_{T} Sum",NUM_HLX, 0, NUM_HLX );
   HFCompareEtSum->setAxisTitle( CompXTitle, 1 );
   HFCompareEtSum->setAxisTitle( CompEtSumYTitle, 2 );
 
   HFCompareOccBelowSet1 = dbe_->book1D("HFCompareOccBelowSet1",
                                        "Occupancy Below Threshold 1 - Set 1", 
                                        NUM_HLX, 0, NUM_HLX );
   HFCompareOccBelowSet1->setAxisTitle( CompXTitle, 1 );
   HFCompareOccBelowSet1->setAxisTitle( CompOccYTitle, 2 );

   HFCompareOccBetweenSet1 = dbe_->book1D("HFCompareOccBetweenSet1",
                                          "Occupancy Between Threshold 1 & 2 - Set 1", 
                                          NUM_HLX, 0, NUM_HLX );
   HFCompareOccBetweenSet1->setAxisTitle( CompXTitle, 1 );
   HFCompareOccBetweenSet1->setAxisTitle( CompOccYTitle, 2 );

   HFCompareOccAboveSet1 = dbe_->book1D("HFCompareOccAboveSet1",
                                        "Occupancy Above Threshold 2 - Set 1", 
                                        NUM_HLX, 0, NUM_HLX );
   HFCompareOccAboveSet1->setAxisTitle( CompXTitle, 1 );
   HFCompareOccAboveSet1->setAxisTitle( CompOccYTitle, 2 );

   HFCompareOccBelowSet2 = dbe_->book1D("HFCompareOccBelowSet2",
                                        "Occupancy Below Threshold 1 - Set 2", 
                                        NUM_HLX, 0, NUM_HLX);
   HFCompareOccBelowSet2->setAxisTitle(CompXTitle,1);
   HFCompareOccBelowSet2->setAxisTitle(CompOccYTitle,2);

   HFCompareOccBetweenSet2 = dbe_->book1D("HFCompareOccBetweenSet2",
                                          "Occupancy Between Threshold 1 & 2 - Set 2", 
                                          NUM_HLX, 0, NUM_HLX);
   HFCompareOccBetweenSet2->setAxisTitle(CompXTitle,1);
   HFCompareOccBetweenSet2->setAxisTitle(CompOccYTitle,2);

   HFCompareOccAboveSet2 = dbe_->book1D( "HFCompareOccAboveSet2",
                                         "Occupancy Above Threshold 2 - Set 2", 
                                         NUM_HLX, 0, NUM_HLX);
   HFCompareOccAboveSet2->setAxisTitle(CompXTitle,1);
   HFCompareOccAboveSet2->setAxisTitle(CompOccYTitle,2);

   // Average Histograms

   dbe_->setCurrentFolder(monitorName_+"/Average");

   int    OccBins = 10000;  // This does absolutely nothing. 
   double OccMin  = 0; 
   double OccMax  = 0; // If min and max are zero, no bounds on the data are set.

   int    EtSumBins = 10000; // This does absolutely nothing.  The Variable is not used in the function.
   double EtSumMin  = 0;
   double EtSumMax  = 0;  // If min and max are zero, no bounds on the data are set.

   std::string errorOpt = "i"; 
   
   std::string AvgXTitle      = "HF Wedge";
   std::string AvgEtSumYTitle = "Average E_{T} Sum";
   std::string AvgOccYTitle   = "Average Tower Occupancy";

   AvgEtSum        = dbe_->bookProfile( "AvgEtSum", 
                                        "Average E_{T} Sum",          
                                        NUM_HLX, 0, NUM_HLX, EtSumBins, EtSumMin, EtSumMax);
   AvgEtSum->setAxisTitle( AvgXTitle, 1 );
   AvgEtSum->setAxisTitle( AvgEtSumYTitle, 2 );

   AvgOccBelowSet1 = dbe_->bookProfile( "AvgOccBelowSet1",     
                                        "Average Occupancy Below Threshold 1 - Set1",   
                                        NUM_HLX, 0, NUM_HLX, OccBins, OccMin, OccMax, errorOpt.c_str());
   AvgOccBelowSet1->setAxisTitle( AvgXTitle, 1 );
   AvgOccBelowSet1->setAxisTitle( AvgOccYTitle, 2 );

   AvgOccBetweenSet1 = dbe_->bookProfile( "AvgOccBetweenSet1", 
                                          "Average Occupancy Between Threhold 1 & 2 - Set1", 
                                          NUM_HLX, 0, NUM_HLX, OccBins, OccMin, OccMax, errorOpt.c_str());
   AvgOccBetweenSet1->setAxisTitle( AvgXTitle, 1 );
   AvgOccBetweenSet1->setAxisTitle( AvgOccYTitle, 2 );

   AvgOccAboveSet1 = dbe_->bookProfile( "AvgOccAboveSet1",
                                        "Average Occupancy Above Threshold 2 - Set1",
                                          NUM_HLX, 0, NUM_HLX, OccBins, OccMin, OccMax, errorOpt.c_str());
   AvgOccAboveSet1->setAxisTitle( AvgXTitle, 1 );
   AvgOccAboveSet1->setAxisTitle( AvgOccYTitle, 2 );

   AvgOccBelowSet2 = dbe_->bookProfile("AvgOccBelowSet2",
                                       "Average Occupancy Below Threshold 1 - Set2",
                                          NUM_HLX, 0, NUM_HLX, OccBins, OccMin, OccMax, errorOpt.c_str());
   AvgOccBelowSet2->setAxisTitle( AvgXTitle, 1 );
   AvgOccBelowSet2->setAxisTitle( AvgOccYTitle, 2 );

   AvgOccBetweenSet2 = dbe_->bookProfile("AvgOccBetweenSet2",
                                         "Average Occupancy Between Threshold 1 & 2 - Set2",
                                         NUM_HLX, 0, NUM_HLX, OccBins, OccMin, OccMax, errorOpt.c_str());
   AvgOccBetweenSet2->setAxisTitle( AvgXTitle, 1 );
   AvgOccBetweenSet2->setAxisTitle( AvgOccYTitle, 2 );

   AvgOccAboveSet2 = dbe_->bookProfile("AvgOccAboveSet2",
                                       "Average Occupancy Above Threshold 2 - Set2",
                                       NUM_HLX, 0, NUM_HLX, OccBins, OccMin, OccMax, errorOpt.c_str());
   AvgOccAboveSet2->setAxisTitle( AvgXTitle, 1 );
   AvgOccAboveSet2->setAxisTitle( AvgOccYTitle, 2 );

   // Luminosity Histograms
   dbe_->setCurrentFolder(monitorName_+"/Luminosity");

   std::string LumiXTitle      = "Bunch Crossing";
   std::string LumiEtSumYTitle = "Luminosity: E_{T} Sum";
   std::string LumiOccYTitle   = "Luminosity: Occupancy";

   LumiAvgEtSum = dbe_->bookProfile("LumiAvgEtSum","Average Luminosity ",int(XMAX-XMIN), XMIN, XMAX, EtSumBins, EtSumMin, EtSumMax );
   LumiAvgEtSum->setAxisTitle( LumiXTitle, 1 );
   LumiAvgEtSum->setAxisTitle( LumiEtSumYTitle, 2 );
 
   LumiAvgOccSet1 = dbe_->bookProfile("LumiAvgOccSet1","Average Luminosity - Set 1", int(XMAX-XMIN), XMIN, XMAX, OccBins, OccMax, OccMin );
   LumiAvgOccSet1->setAxisTitle( LumiXTitle, 1 );
   LumiAvgOccSet1->setAxisTitle( LumiOccYTitle, 2 );

   LumiAvgOccSet2 = dbe_->bookProfile("LumiAvgOccSet2","Average Luminosity - Set 2", int(XMAX-XMIN), XMIN, XMAX, OccBins, OccMax, OccMin );
   LumiAvgOccSet2->setAxisTitle( LumiXTitle, 1 );
   LumiAvgOccSet2->setAxisTitle( LumiOccYTitle, 2 );

   LumiInstantEtSum = dbe_->book1D("LumiInstantEtSum","Instantaneous Luminosity ",int(XMAX-XMIN), XMIN, XMAX );
   LumiInstantEtSum->setAxisTitle( LumiXTitle, 1 );
   LumiInstantEtSum->setAxisTitle( LumiEtSumYTitle, 2 );
 
   LumiInstantOccSet1 = dbe_->book1D("LumiInstantOccSet1","Instantaneous Luminosity - Set 1", int(XMAX-XMIN), XMIN, XMAX );
   LumiInstantOccSet1->setAxisTitle( LumiXTitle, 1 );
   LumiInstantOccSet1->setAxisTitle( LumiOccYTitle, 2 );

   LumiInstantOccSet2 = dbe_->book1D("LumiInstantOccSet2","Instantaneous Luminosity - Set 2", int(XMAX-XMIN), XMIN, XMAX );
   LumiInstantOccSet2->setAxisTitle( LumiXTitle, 1 );
   LumiInstantOccSet2->setAxisTitle( LumiOccYTitle, 2 );

   LumiIntegratedEtSum = dbe_->book1D("LumiIntegratedEtSum","Integrated Luminosity ",int(XMAX-XMIN), XMIN, XMAX );
   LumiIntegratedEtSum->setAxisTitle( LumiXTitle, 1 );
   LumiIntegratedEtSum->setAxisTitle( LumiEtSumYTitle, 2 );
 
   LumiIntegratedOccSet1 = dbe_->book1D("LumiIntegratedOccSet1","Integrated Luminosity - Set 1", int(XMAX-XMIN), XMIN, XMAX );
   LumiIntegratedOccSet1->setAxisTitle( LumiXTitle, 1 );
   LumiIntegratedOccSet1->setAxisTitle( LumiOccYTitle, 2 );

   LumiIntegratedOccSet2 = dbe_->book1D("LumiIntegratedOccSet2","Integrated Luminosity - Set 2", int(XMAX-XMIN), XMIN, XMAX );
   LumiIntegratedOccSet2->setAxisTitle( LumiXTitle, 1 );
   LumiIntegratedOccSet2->setAxisTitle( LumiOccYTitle, 2 );


   // Sanity check sum histograms
   dbe_->setCurrentFolder(monitorName_+"/CheckSums");

   std::string sumXTitle   = "HF Wedge";
   std::string sumYTitle   = "Occupancy Sum (Below+Above+Between)";

   SumAllOccSet1 = dbe_->bookProfile("SumAllOccSet1","Occupancy Check - Set 1",NUM_HLX, 0, NUM_HLX, OccBins, OccMax, OccMin );
   SumAllOccSet1->setAxisTitle( sumXTitle, 1 );
   SumAllOccSet1->setAxisTitle( sumYTitle, 2 );

   SumAllOccSet2 = dbe_->bookProfile("SumAllOccSet2","Occupancy Check - Set 2",NUM_HLX, 0, NUM_HLX, OccBins, OccMax, OccMin );
   SumAllOccSet2->setAxisTitle( sumXTitle, 1 );
   SumAllOccSet2->setAxisTitle( sumYTitle, 2 );

   MissingDQMDataCheck   = dbe_->book1D( "MissingDQMDataCheck", "Missing Data Count",1, 0, 1);
   MissingDQMDataCheck->setAxisTitle( "", 1 );
   MissingDQMDataCheck->setAxisTitle( "Number Missing Nibbles", 2 );

   // Signal & Background monitoring histograms
   dbe_->setCurrentFolder(monitorName_+"/SigBkgLevels");
   
   MaxInstLumiBX1 = dbe_->book1D("MaxInstLumiBX1","Max Instantaneous Luminosity BX: 1st",10000,-1e-5,0.01);
   MaxInstLumiBX1->setAxisTitle("Max Inst. L (10^{30}cm^{-2}s^{-1})",1);
   MaxInstLumiBX1->setAxisTitle("Entries",2);
   MaxInstLumiBX2 = dbe_->book1D("MaxInstLumiBX2","Max Instantaneous Luminosity BX: 2nd",10000,-1e-5,0.01);
   MaxInstLumiBX2->setAxisTitle("Max Inst. L (10^{30}cm^{-2}s^{-1})",1);
   MaxInstLumiBX2->setAxisTitle("Entries",2);
   MaxInstLumiBX3 = dbe_->book1D("MaxInstLumiBX3","Max Instantaneous Luminosity BX: 3rd",10000,-1e-5,0.01);
   MaxInstLumiBX3->setAxisTitle("Max Inst. L (10^{30}cm^{-2}s^{-1})",1);
   MaxInstLumiBX3->setAxisTitle("Entries",2);
   MaxInstLumiBX4 = dbe_->book1D("MaxInstLumiBX4","Max Instantaneous Luminosity BX: 4th",10000,-1e-5,0.01);
   MaxInstLumiBX4->setAxisTitle("Max Inst. L (10^{30}cm^{-2}s^{-1})",1);
   MaxInstLumiBX4->setAxisTitle("Entries",2);
   
   MaxInstLumiBXNum1 = dbe_->book1D("MaxInstLumiBXNum1","BX Number of Max: 1st",3564,0,3564);
   MaxInstLumiBXNum1->setAxisTitle("BX",1);
   MaxInstLumiBXNum1->setAxisTitle("Num Time Max",2);
   MaxInstLumiBXNum2 = dbe_->book1D("MaxInstLumiBXNum2","BX Number of Max: 2nd",3564,0,3564);
   MaxInstLumiBXNum2->setAxisTitle("BX",1);
   MaxInstLumiBXNum2->setAxisTitle("Num Time Max",2);
   MaxInstLumiBXNum3 = dbe_->book1D("MaxInstLumiBXNum3","BX Number of Max: 3rd",3564,0,3564);
   MaxInstLumiBXNum3->setAxisTitle("BX",1);
   MaxInstLumiBXNum3->setAxisTitle("Num Time Max",2);
   MaxInstLumiBXNum4 = dbe_->book1D("MaxInstLumiBXNum4","BX Number of Max: 4th",3564,0,3564);
   MaxInstLumiBXNum4->setAxisTitle("BX",1);
   MaxInstLumiBXNum4->setAxisTitle("Num Time Max",2);

   // History histograms
   dbe_->setCurrentFolder(monitorName_+"/HistoryRaw");

   std::string HistXTitle = "Time (LS)";
   std::string RecentHistXTitle = "Time (LS/16)";
   std::string HistEtSumYTitle = "Average E_{T} Sum";
   std::string HistOccYTitle = "Average Occupancy";
   std::string HistLumiYTitle = "Luminosity";
   std::string HistLumiErrorYTitle = "Luminosity Error (%)";
   std::string BXvsTimeXTitle = "Time (LS)";
   std::string BXvsTimeYTitle = "BX";

   // Et Sum histories
   HistAvgEtSumHFP        = dbe_->bookProfile( "HistAvgEtSumHFP", "Average Et Sum: HF+",          
   MAX_LS, 0.5, (double)MAX_LS+0.5, EtSumBins, EtSumMin, EtSumMax);
   HistAvgEtSumHFP->setAxisTitle( HistXTitle, 1 );
   HistAvgEtSumHFP->setAxisTitle( HistEtSumYTitle, 2 );

   HistAvgEtSumHFM        = dbe_->bookProfile( "HistAvgEtSumHFM", "Average Et Sum: HF-",          
   MAX_LS, 0.5, (double)MAX_LS+0.5, EtSumBins, EtSumMin, EtSumMax);
   HistAvgEtSumHFM->setAxisTitle( HistXTitle, 1 );
   HistAvgEtSumHFM->setAxisTitle( HistEtSumYTitle, 2 );

   // Tower Occupancy Histories
   HistAvgOccBelowSet1HFP = dbe_->bookProfile( "HistAvgOccBelowSet1HFP", "Average Occ Set1Below: HF+",
   MAX_LS, 0.5, (double)MAX_LS+0.5, OccBins, OccMin, OccMax );
   HistAvgOccBelowSet1HFP->setAxisTitle( HistXTitle, 1 );
   HistAvgOccBelowSet1HFP->setAxisTitle( HistOccYTitle, 2 );

   HistAvgOccBelowSet1HFM = dbe_->bookProfile( "HistAvgOccBelowSet1HFM", "Average Occ Set1Below: HF-",
   MAX_LS, 0.5, (double)MAX_LS+0.5, OccBins, OccMin, OccMax );
   HistAvgOccBelowSet1HFM->setAxisTitle( HistXTitle, 1 );
   HistAvgOccBelowSet1HFM->setAxisTitle( HistOccYTitle, 2 );

   HistAvgOccBetweenSet1HFP = dbe_->bookProfile( "HistAvgOccBetweenSet1HFP", "Average Occ Set1Between: HF+",
   MAX_LS, 0.5, (double)MAX_LS+0.5, OccBins, OccMin, OccMax );
   HistAvgOccBetweenSet1HFP->setAxisTitle( HistXTitle, 1 );
   HistAvgOccBetweenSet1HFP->setAxisTitle( HistOccYTitle, 2 );

   HistAvgOccBetweenSet1HFM = dbe_->bookProfile( "HistAvgOccBetweenSet1HFM", "Average Occ Set1Between: HF-",
   MAX_LS, 0.5, (double)MAX_LS+0.5, OccBins, OccMin, OccMax );
   HistAvgOccBetweenSet1HFM->setAxisTitle( HistXTitle, 1 );
   HistAvgOccBetweenSet1HFM->setAxisTitle( HistOccYTitle, 2 );

   HistAvgOccAboveSet1HFP = dbe_->bookProfile( "HistAvgOccAboveSet1HFP", "Average Occ Set1Above: HF+",
   MAX_LS, 0.5, (double)MAX_LS+0.5, OccBins, OccMin, OccMax );
   HistAvgOccAboveSet1HFP->setAxisTitle( HistXTitle, 1 );
   HistAvgOccAboveSet1HFP->setAxisTitle( HistOccYTitle, 2 );

   HistAvgOccAboveSet1HFM = dbe_->bookProfile( "HistAvgOccAboveSet1HFM", "Average Occ Set1Above: HF-",
   MAX_LS, 0.5, (double)MAX_LS+0.5, OccBins, OccMin, OccMax );
   HistAvgOccAboveSet1HFM->setAxisTitle( HistXTitle, 1 );
   HistAvgOccAboveSet1HFM->setAxisTitle( HistOccYTitle, 2 );

   HistAvgOccBelowSet2HFP = dbe_->bookProfile( "HistAvgOccBelowSet2HFP", "Average Occ Set2Below: HF+",
   MAX_LS, 0.5, (double)MAX_LS+0.5, OccBins, OccMin, OccMax );
   HistAvgOccBelowSet2HFP->setAxisTitle( HistXTitle, 1 );
   HistAvgOccBelowSet2HFP->setAxisTitle( HistOccYTitle, 2 );

   HistAvgOccBelowSet2HFM = dbe_->bookProfile( "HistAvgOccBelowSet2HFM", "Average Occ Set2Below: HF-",
   MAX_LS, 0.5, (double)MAX_LS+0.5, OccBins, OccMin, OccMax );
   HistAvgOccBelowSet2HFM->setAxisTitle( HistXTitle, 1 );
   HistAvgOccBelowSet2HFM->setAxisTitle( HistOccYTitle, 2 );

   HistAvgOccBetweenSet2HFP = dbe_->bookProfile( "HistAvgOccBetweenSet2HFP", "Average Occ Set2Between: HF+",
   MAX_LS, 0.5, (double)MAX_LS+0.5, OccBins, OccMin, OccMax );
   HistAvgOccBetweenSet2HFP->setAxisTitle( HistXTitle, 1 );
   HistAvgOccBetweenSet2HFP->setAxisTitle( HistOccYTitle, 2 );

   HistAvgOccBetweenSet2HFM = dbe_->bookProfile( "HistAvgOccBetweenSet2HFM", "Average Occ Set2Between: HF-",
   MAX_LS, 0.5, (double)MAX_LS+0.5, OccBins, OccMin, OccMax );
   HistAvgOccBetweenSet2HFM->setAxisTitle( HistXTitle, 1 );
   HistAvgOccBetweenSet2HFM->setAxisTitle( HistOccYTitle, 2 );

   HistAvgOccAboveSet2HFP = dbe_->bookProfile( "HistAvgOccAboveSet2HFP", "Average Occ Set2Above: HF+",
   MAX_LS, 0.5, (double)MAX_LS+0.5, OccBins, OccMin, OccMax );
   HistAvgOccAboveSet2HFP->setAxisTitle( HistXTitle, 1 );
   HistAvgOccAboveSet2HFP->setAxisTitle( HistOccYTitle, 2 );

   HistAvgOccAboveSet2HFM = dbe_->bookProfile( "HistAvgOccAboveSet2HFM", "Average Occ Set2Above: HF-",
   MAX_LS, 0.5, (double)MAX_LS+0.5, OccBins, OccMin, OccMax );
   HistAvgOccAboveSet2HFM->setAxisTitle( HistXTitle, 1 );
   HistAvgOccAboveSet2HFM->setAxisTitle( HistOccYTitle, 2 );

   // Et Sum histories
   BXvsTimeAvgEtSumHFP  = dbe_->book2D( "BXvsTimeAvgEtSumHFP", "Average Et Sum: HF+",          
   MAX_LS, 0.5, (double)MAX_LS+0.5, NBINS, (double)XMIN, (double)XMAX);
   BXvsTimeAvgEtSumHFP->setAxisTitle( BXvsTimeXTitle, 1 );
   BXvsTimeAvgEtSumHFP->setAxisTitle( BXvsTimeYTitle, 2 );

   BXvsTimeAvgEtSumHFM  = dbe_->book2D( "BXvsTimeAvgEtSumHFM", "Average Et Sum: HF-",          
   MAX_LS, 0.5, (double)MAX_LS+0.5, NBINS, (double)XMIN, (double)XMAX);
   BXvsTimeAvgEtSumHFM->setAxisTitle( BXvsTimeXTitle, 1 );
   BXvsTimeAvgEtSumHFM->setAxisTitle( BXvsTimeYTitle, 2 );

   dbe_->setCurrentFolder(monitorName_+"/HistoryLumi");

   // Lumi Histories
   HistAvgLumiEtSum   = dbe_->bookProfile( "HistAvgLumiEtSum", "Average Instant Luminosity: Et Sum",
   MAX_LS, 0.5, (double)MAX_LS+0.5, EtSumBins, EtSumMin, EtSumMax);
   HistAvgLumiEtSum->setAxisTitle( HistXTitle, 1 );
   HistAvgLumiEtSum->setAxisTitle( HistLumiYTitle, 2 );

   HistAvgLumiOccSet1 = dbe_->bookProfile( "HistAvgLumiOccSet1", "Average Instant Luminosity: Occ Set1",
   MAX_LS, 0.5, (double)MAX_LS+0.5, OccBins, OccMin, OccMax);
   HistAvgLumiOccSet1->setAxisTitle( HistXTitle, 1 );
   HistAvgLumiOccSet1->setAxisTitle( HistLumiYTitle, 2 );

   HistAvgLumiOccSet2 = dbe_->bookProfile( "HistAvgLumiOccSet2", "Average Instant Luminosity: Occ Set2",
   MAX_LS, 0.5, (double)MAX_LS+0.5, OccBins, OccMin, OccMax);
   HistAvgLumiOccSet2->setAxisTitle( HistXTitle, 1 );
   HistAvgLumiOccSet2->setAxisTitle( HistLumiYTitle, 2 );

   HistInstantLumiEtSum   = dbe_->book1D( "HistInstantLumiEtSum", "Instant Luminosity: Et Sum",
   MAX_LS, 0.5, (double)MAX_LS+0.5);
   HistInstantLumiEtSum->setAxisTitle( HistXTitle, 1 );
   HistInstantLumiEtSum->setAxisTitle( HistLumiYTitle, 2 );

   HistInstantLumiOccSet1 = dbe_->book1D( "HistInstantLumiOccSet1", "Instant Luminosity: Occ Set1",
   MAX_LS, 0.5, (double)MAX_LS+0.5);
   HistInstantLumiOccSet1->setAxisTitle( HistXTitle, 1 );
   HistInstantLumiOccSet1->setAxisTitle( HistLumiYTitle, 2 );

   HistInstantLumiOccSet2 = dbe_->book1D( "HistInstantLumiOccSet2", "Instant Luminosity: Occ Set2",
   MAX_LS, 0.5, (double)MAX_LS+0.5);
   HistInstantLumiOccSet2->setAxisTitle( HistXTitle, 1 );
   HistInstantLumiOccSet2->setAxisTitle( HistLumiYTitle, 2 );

   HistInstantLumiEtSumError   = dbe_->book1D( "HistInstantLumiEtSumError", "Luminosity Error: Et Sum",
   MAX_LS, 0.5, (double)MAX_LS+0.5);
   HistInstantLumiEtSumError->setAxisTitle( HistXTitle, 1 );
   HistInstantLumiEtSumError->setAxisTitle( HistLumiErrorYTitle, 2 );
   
   HistInstantLumiOccSet1Error = dbe_->book1D( "HistInstantLumiOccSet1Error", "Luminosity Error: Occ Set1",
   MAX_LS, 0.5, (double)MAX_LS+0.5);
   HistInstantLumiOccSet1Error->setAxisTitle( HistXTitle, 1 );
   HistInstantLumiOccSet1Error->setAxisTitle( HistLumiErrorYTitle, 2 ); 
   
   HistInstantLumiOccSet2Error = dbe_->book1D( "HistInstantLumiOccSet2Error", "Luminosity Error: Occ Set2",
   MAX_LS, 0.5, (double)MAX_LS+0.5);
   HistInstantLumiOccSet2Error->setAxisTitle( HistXTitle, 1 );
   HistInstantLumiOccSet2Error->setAxisTitle( HistLumiErrorYTitle, 2 );


   HistIntegratedLumiEtSum   = dbe_->book1D( "HistIntegratedLumiEtSum", "Integrated Luminosity: Et Sum",
   MAX_LS, 0.5, (double)MAX_LS+0.5);
   HistIntegratedLumiEtSum->setAxisTitle( HistXTitle, 1 );
   HistIntegratedLumiEtSum->setAxisTitle( HistLumiYTitle, 2 );

   HistIntegratedLumiOccSet1 = dbe_->book1D( "HistIntegratedLumiOccSet1", "Integrated Luminosity: Occ Set1",
   MAX_LS, 0.5, (double)MAX_LS+0.5);
   HistIntegratedLumiOccSet1->setAxisTitle( HistXTitle, 1 );
   HistIntegratedLumiOccSet1->setAxisTitle( HistLumiYTitle, 2 );

   HistIntegratedLumiOccSet2 = dbe_->book1D( "HistIntegratedLumiOccSet2", "Integrated Luminosity: Occ Set2",
   MAX_LS, 0.5, (double)MAX_LS+0.5);
   HistIntegratedLumiOccSet2->setAxisTitle( HistXTitle, 1 );
   HistIntegratedLumiOccSet2->setAxisTitle( HistLumiYTitle, 2 );

   dbe_->setCurrentFolder(monitorName_+"/RecentHistoryLumi");

   // Lumi Recent Histories (past 128 short sections)
   RecentInstantLumiEtSum   = dbe_->book1D( "RecentInstantLumiEtSum", "Instant Luminosity: Et Sum",
   128, 0.5, (double)128+0.5);
   RecentInstantLumiEtSum->setAxisTitle( RecentHistXTitle, 1 );
   RecentInstantLumiEtSum->setAxisTitle( HistLumiYTitle, 2 );

   RecentInstantLumiOccSet1 = dbe_->book1D( "RecentInstantLumiOccSet1", "Instant Luminosity: Occ Set1",
   128, 0.5, (double)128+0.5);
   RecentInstantLumiOccSet1->setAxisTitle( RecentHistXTitle, 1 );
   RecentInstantLumiOccSet1->setAxisTitle( HistLumiYTitle, 2 );

   RecentInstantLumiOccSet2 = dbe_->book1D( "RecentInstantLumiOccSet2", "Instant Luminosity: Occ Set2",
   128, 0.5, (double)128+0.5);
   RecentInstantLumiOccSet2->setAxisTitle( RecentHistXTitle, 1 );
   RecentInstantLumiOccSet2->setAxisTitle( HistLumiYTitle, 2 );

   RecentIntegratedLumiEtSum   = dbe_->book1D( "RecentIntegratedLumiEtSum", "Integrated Luminosity: Et Sum",
   128, 0.5, (double)128+0.5);
   RecentIntegratedLumiEtSum->setAxisTitle( RecentHistXTitle, 1 );
   RecentIntegratedLumiEtSum->setAxisTitle( HistLumiYTitle, 2 );

   RecentIntegratedLumiOccSet1 = dbe_->book1D( "RecentIntegratedLumiOccSet1", "Integrated Luminosity: Occ Set1",
   128, 0.5, (double)128+0.5);
   RecentIntegratedLumiOccSet1->setAxisTitle( RecentHistXTitle, 1 );
   RecentIntegratedLumiOccSet1->setAxisTitle( HistLumiYTitle, 2 );

   RecentIntegratedLumiOccSet2 = dbe_->book1D( "RecentIntegratedLumiOccSet2", "Integrated Luminosity: Occ Set2",
   128, 0.5, (double)128+0.5);
   RecentIntegratedLumiOccSet2->setAxisTitle( RecentHistXTitle, 1 );
   RecentIntegratedLumiOccSet2->setAxisTitle( HistLumiYTitle, 2 );

   std::vector<std::string> systems = (dbe_->cd(), dbe_->getSubdirs());
   for( size_t i=0, e = systems.size(); i<e; ++i ){
      std::cout << "Systems " << systems[i] << std::endl;
   }
 
   dbe_->showDirStructure();
}

Member Data Documentation

bool HLXMonitor::Accumulate [private]

Definition at line 228 of file HLXMonitor.h.

Referenced by HLXMonitor(), and SetupHists().

unsigned int HLXMonitor::AquireMode [private]

Definition at line 236 of file HLXMonitor.h.

Referenced by beginJob(), and HLXMonitor().

Definition at line 106 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 109 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 112 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 107 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 110 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 108 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 111 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 157 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 156 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Current working directory of the job.

Definition at line 204 of file HLXMonitor.h.

Referenced by SetupEventInfo().

unsigned int HLXMonitor::counter [private]

Definition at line 220 of file HLXMonitor.h.

Definition at line 271 of file HLXMonitor.h.

Referenced by analyze(), EndRun(), and HLXMonitor().

timeval HLXMonitor::currentTime_ [private]

Definition at line 290 of file HLXMonitor.h.

Referenced by FillEventInfo(), and SetupEventInfo().

std::string HLXMonitor::DistribIP1 [private]

Definition at line 244 of file HLXMonitor.h.

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

std::string HLXMonitor::DistribIP2 [private]

Definition at line 245 of file HLXMonitor.h.

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

CMSSW version run for this job.

Definition at line 205 of file HLXMonitor.h.

DQM patch version for this job.

Definition at line 206 of file HLXMonitor.h.

Subdetector-specific error summary (float)

Definition at line 207 of file HLXMonitor.h.

Subdetector-specific etaPhi summary (float)

Definition at line 208 of file HLXMonitor.h.

Definition at line 96 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

std::string HLXMonitor::EtXAxisTitle [private]

Definition at line 266 of file HLXMonitor.h.

Referenced by SetupHists().

std::string HLXMonitor::EtYAxisTitle [private]

Definition at line 267 of file HLXMonitor.h.

Referenced by SetupHists().

UTC time of the run start.

Definition at line 187 of file HLXMonitor.h.

Referenced by FillEventInfo(), and SetupEventInfo().

std::string HLXMonitor::eventInfoFolder_ [private]

Definition at line 258 of file HLXMonitor.h.

Referenced by HLXMonitor(), and SetupEventInfo().

std::string HLXMonitor::eventInfoFolderHLX_ [private]

Definition at line 257 of file HLXMonitor.h.

Referenced by HLXMonitor(), and SetupEventInfo().

Definition at line 189 of file HLXMonitor.h.

Referenced by FillEventInfo(), and SetupEventInfo().

Definition at line 293 of file HLXMonitor.h.

Referenced by FillEventInfo(), and SetupEventInfo().

float HLXMonitor::evtRateWindow_ [private]

Definition at line 292 of file HLXMonitor.h.

Referenced by FillEventInfo(), and SetupEventInfo().

unsigned int HLXMonitor::expectedNibbles_ [private]

Definition at line 273 of file HLXMonitor.h.

Referenced by EndRun(), FillEventInfo(), FillReportSummary(), and HLXMonitor().

Definition at line 98 of file HLXMonitor.h.

Referenced by FillHistoHFCompare(), ResetAll(), and SetupHists().

Definition at line 101 of file HLXMonitor.h.

Referenced by FillHistoHFCompare(), ResetAll(), and SetupHists().

Definition at line 104 of file HLXMonitor.h.

Referenced by FillHistoHFCompare(), ResetAll(), and SetupHists().

Definition at line 99 of file HLXMonitor.h.

Referenced by FillHistoHFCompare(), ResetAll(), and SetupHists().

Definition at line 102 of file HLXMonitor.h.

Referenced by FillHistoHFCompare(), ResetAll(), and SetupHists().

Definition at line 100 of file HLXMonitor.h.

Referenced by FillHistoHFCompare(), ResetAll(), and SetupHists().

Definition at line 103 of file HLXMonitor.h.

Referenced by FillHistoHFCompare(), ResetAll(), and SetupHists().

Definition at line 143 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 142 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 159 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 160 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 161 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 149 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 148 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 155 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 154 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 145 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 144 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 151 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 150 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 147 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 146 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 153 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 152 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 162 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 165 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 163 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 166 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 164 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 167 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 168 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 169 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 170 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

unsigned int HLXMonitor::HLXHFMap[36] [private]

Definition at line 88 of file HLXMonitor.h.

Referenced by analyze(), beginJob(), endJob(), and ~HLXMonitor().

# of event processed so far

Definition at line 201 of file HLXMonitor.h.

Referenced by SetupEventInfo().

timeval HLXMonitor::lastAvgTime_ [private]

Definition at line 290 of file HLXMonitor.h.

Referenced by FillEventInfo(), and SetupEventInfo().

timeval HLXMonitor::lastUpdateTime_ [private]

Definition at line 290 of file HLXMonitor.h.

Referenced by FillEventInfo().

int HLXMonitor::listenPort [private]

Definition at line 225 of file HLXMonitor.h.

Referenced by beginJob(), and HLXMonitor().

int HLXMonitor::lsBinOld [private]

Definition at line 280 of file HLXMonitor.h.

Referenced by EndRun(), FillHistograms(), and HLXMonitor().

Definition at line 115 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 116 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 117 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 118 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 119 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 120 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 121 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 122 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 123 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 188 of file HLXMonitor.h.

Referenced by FillEventInfo(), and SetupEventInfo().

Definition at line 269 of file HLXMonitor.h.

Referenced by analyze().

unsigned int HLXMonitor::lumiSectionCount [private]

Definition at line 279 of file HLXMonitor.h.

Referenced by EndRun(), FillHistograms(), HLXMonitor(), and ResetAll().

unsigned int HLXMonitor::MAX_LS [private]

Definition at line 235 of file HLXMonitor.h.

Referenced by HLXMonitor(), and SetupHists().

Definition at line 131 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 132 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 133 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 134 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 136 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 137 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 138 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 139 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

unsigned int HLXMonitor::MinLSBeforeSave [private]

Definition at line 238 of file HLXMonitor.h.

Referenced by EndRun(), and HLXMonitor().

Definition at line 128 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

std::string HLXMonitor::monitorName_ [private]

Definition at line 240 of file HLXMonitor.h.

Referenced by HLXMonitor(), and SetupHists().

unsigned int HLXMonitor::NBINS [private]

Definition at line 227 of file HLXMonitor.h.

Referenced by HLXMonitor(), and SetupHists().

double HLXMonitor::num4NibblePerLS_ [private]

Definition at line 297 of file HLXMonitor.h.

Referenced by EndRun(), FillEventInfo(), FillHistograms(), and HLXMonitor().

unsigned int HLXMonitor::NUM_BUNCHES [private]

Definition at line 234 of file HLXMonitor.h.

Referenced by FillHistograms(), and HLXMonitor().

unsigned int HLXMonitor::NUM_HLX [private]
unsigned int HLXMonitor::numActiveTowersSet1 [private]

Definition at line 217 of file HLXMonitor.h.

unsigned int HLXMonitor::numActiveTowersSet2 [private]

Definition at line 218 of file HLXMonitor.h.

These MEs are either static or updated upon each analyze() call

Definition at line 194 of file HLXMonitor.h.

Referenced by SetupEventInfo().

std::string HLXMonitor::OccXAxisTitle [private]

Definition at line 264 of file HLXMonitor.h.

Referenced by SetupHists().

std::string HLXMonitor::OccYAxisTitle [private]

Definition at line 265 of file HLXMonitor.h.

Referenced by SetupHists().

std::string HLXMonitor::OutputDir [private]

Definition at line 230 of file HLXMonitor.h.

Referenced by HLXMonitor(), and SaveDQMFile().

std::string HLXMonitor::OutputFilePrefix [private]

Definition at line 229 of file HLXMonitor.h.

Referenced by HLXMonitor(), and SaveDQMFile().

int HLXMonitor::pEvent_ [private]

Definition at line 294 of file HLXMonitor.h.

Referenced by FillEventInfo(), and SetupEventInfo().

int HLXMonitor::prescaleEvt_ [private]

Definition at line 241 of file HLXMonitor.h.

Referenced by HLXMonitor().

unsigned int HLXMonitor::previousSection [private]

Definition at line 278 of file HLXMonitor.h.

Referenced by EndRun(), FillHistograms(), HLXMonitor(), and ResetAll().

Time elapsed since the last event.

Definition at line 199 of file HLXMonitor.h.

Referenced by FillEventInfo(), and SetupEventInfo().

Avg # of events in programmable window (default: 5 min)

Definition at line 200 of file HLXMonitor.h.

Referenced by FillEventInfo(), and SetupEventInfo().

Number of collector updates (TBD)

Definition at line 195 of file HLXMonitor.h.

Referenced by SetupEventInfo().

The UTC time of the last event.

Definition at line 198 of file HLXMonitor.h.

Referenced by FillEventInfo(), and SetupEventInfo().

Hostname of the local machine.

Definition at line 202 of file HLXMonitor.h.

Referenced by SetupEventInfo().

The PID associated with this job.

Definition at line 196 of file HLXMonitor.h.

Referenced by SetupEventInfo().

The UTC time of the first event processed.

Definition at line 197 of file HLXMonitor.h.

Referenced by FillEventInfo(), and SetupEventInfo().

unsigned char* HLXMonitor::rData [private]

Definition at line 221 of file HLXMonitor.h.

Definition at line 172 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 173 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 174 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 175 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 176 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 177 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

unsigned int HLXMonitor::reconnTime [private]

Definition at line 243 of file HLXMonitor.h.

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

Definition at line 211 of file HLXMonitor.h.

Referenced by FillReportSummary(), and SetupEventInfo().

Definition at line 212 of file HLXMonitor.h.

Referenced by FillReportSummary(), and SetupEventInfo().

bool HLXMonitor::ResetAtNewRun [private]

Definition at line 254 of file HLXMonitor.h.

Referenced by EndRun(), and HLXMonitor().

These MEs are filled with the info from the most recent event by the module

Definition at line 185 of file HLXMonitor.h.

Referenced by FillEventInfo(), and SetupEventInfo().

unsigned int HLXMonitor::runNumber_ [private]

Definition at line 272 of file HLXMonitor.h.

Referenced by analyze(), EndRun(), HLXMonitor(), and SaveDQMFile().

unsigned int HLXMonitor::runNumLength [private]

Definition at line 261 of file HLXMonitor.h.

Referenced by HLXMonitor(), and SaveDQMFile().

timeval HLXMonitor::runStartTime_ [private]

Definition at line 291 of file HLXMonitor.h.

Definition at line 186 of file HLXMonitor.h.

Referenced by analyze(), and SetupEventInfo().

bool HLXMonitor::SaveAtEndJob [private]

Definition at line 255 of file HLXMonitor.h.

Referenced by endJob(), and HLXMonitor().

int HLXMonitor::SavePeriod [private]

Definition at line 232 of file HLXMonitor.h.

Referenced by HLXMonitor().

unsigned int HLXMonitor::secNumLength [private]

Definition at line 262 of file HLXMonitor.h.

Referenced by HLXMonitor().

short int HLXMonitor::SectionComplete [private]

Definition at line 222 of file HLXMonitor.h.

Definition at line 282 of file HLXMonitor.h.

Referenced by EndRun(), FillHistograms(), and HLXMonitor().

Definition at line 284 of file HLXMonitor.h.

Referenced by EndRun(), FillHistograms(), and HLXMonitor().

Definition at line 286 of file HLXMonitor.h.

Referenced by EndRun(), FillHistograms(), and HLXMonitor().

Definition at line 287 of file HLXMonitor.h.

Referenced by EndRun(), FillHistograms(), and HLXMonitor().

Definition at line 281 of file HLXMonitor.h.

Referenced by EndRun(), FillHistograms(), and HLXMonitor().

Definition at line 283 of file HLXMonitor.h.

Referenced by EndRun(), FillHistograms(), and HLXMonitor().

Definition at line 285 of file HLXMonitor.h.

Referenced by EndRun(), FillHistograms(), and HLXMonitor().

Definition at line 92 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

unsigned int HLXMonitor::set1AboveIndex [private]

Definition at line 249 of file HLXMonitor.h.

Referenced by FillHistograms(), FillHistoHFCompare(), and HLXMonitor().

Definition at line 90 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

unsigned int HLXMonitor::set1BelowIndex [private]

Definition at line 247 of file HLXMonitor.h.

Referenced by FillHistograms(), FillHistoHFCompare(), and HLXMonitor().

Definition at line 91 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

unsigned int HLXMonitor::set1BetweenIndex [private]

Definition at line 248 of file HLXMonitor.h.

Referenced by FillHistograms(), FillHistoHFCompare(), and HLXMonitor().

Definition at line 95 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

unsigned int HLXMonitor::set2AboveIndex [private]

Definition at line 252 of file HLXMonitor.h.

Referenced by FillHistograms(), FillHistoHFCompare(), and HLXMonitor().

Definition at line 93 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

unsigned int HLXMonitor::set2BelowIndex [private]

Definition at line 250 of file HLXMonitor.h.

Referenced by FillHistograms(), FillHistoHFCompare(), and HLXMonitor().

Definition at line 94 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

unsigned int HLXMonitor::set2BetweenIndex [private]

Definition at line 251 of file HLXMonitor.h.

Referenced by FillHistograms(), FillHistoHFCompare(), and HLXMonitor().

std::string HLXMonitor::Style [private]

Definition at line 231 of file HLXMonitor.h.

std::string HLXMonitor::subSystemName_ [private]

Definition at line 259 of file HLXMonitor.h.

Referenced by HLXMonitor(), SaveDQMFile(), and SetupEventInfo().

Definition at line 126 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

Definition at line 127 of file HLXMonitor.h.

Referenced by FillHistograms(), ResetAll(), and SetupHists().

unsigned int HLXMonitor::totalNibbles_[36] [private]

Definition at line 274 of file HLXMonitor.h.

Referenced by EndRun(), FillEventInfo(), FillReportSummary(), and HLXMonitor().

unsigned int HLXMonitor::TriggerBX [private]

Definition at line 237 of file HLXMonitor.h.

Referenced by FillHistoHFCompare(), and HLXMonitor().

DQM "name" of the job (eg, Hcal or DT)

Definition at line 203 of file HLXMonitor.h.

Referenced by SetupEventInfo().

double HLXMonitor::XMAX [private]

Definition at line 226 of file HLXMonitor.h.

Referenced by FillHistograms(), HLXMonitor(), and SetupHists().

double HLXMonitor::XMIN [private]

Definition at line 226 of file HLXMonitor.h.

Referenced by FillHistograms(), HLXMonitor(), and SetupHists().