CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

HLTOfflineReproducibility Class Reference

#include <HLTOfflineReproducibility/src/HLTOfflineReproducibility.cc>

Inheritance diagram for HLTOfflineReproducibility:
edm::EDAnalyzer

List of all members.

Public Member Functions

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

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void beginJob ()
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
bool check (std::string process, std::string pCheck)
virtual void endJob ()
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
virtual void endRun (edm::Run const &, edm::EventSetup const &)

Private Attributes

vector< vector< string > > datasetContent_
vector< string > datasetNames_
HLTConfigProvider hltConfig_
bool isRealData_
int LumiSecNumber_
vector< vector< string > > moduleLabel_
vector< vector< string > > moduleLabelOFF_
vector< vector< string > > moduleLabelON_
unsigned int nDatasets_
int Nfiles_
vector< unsigned int > nModules_
double Normalization_
unsigned int nPaths_
vector< unsigned int > nPaths_PD_
unsigned int nPathsOFF_
unsigned int nPathsON_
TH1D * path_OFFnotON_hist
vector< TH1D * > path_OFFnotON_hist_PD
TH1D * path_ON_hist
vector< TH1D * > path_ON_hist_PD
TH1D * path_ONnotOFF_hist
vector< TH1D * > path_ONnotOFF_hist_PD
TH2D * pathmodule_OFFnotON_hist
vector< TH2D * > pathmodule_OFFnotON_hist_PD
TH2D * pathmodule_ONnotOFF_hist
vector< TH2D * > pathmodule_ONnotOFF_hist_PD
string processNameOFF_
string processNameON_
vector< int > trigger_offline_
vector< int > trigger_online_
edm::InputTag triggerLabelOFF_
edm::InputTag triggerLabelON_
vector< string > triggerNames_
vector< vector< vector< bool > > > triggerNames_matched_

Detailed Description

Description: compares online and offline HLT trigger results

Implementation: [Notes on implementation]

Definition at line 60 of file HLTOfflineReproducibility.cc.


Constructor & Destructor Documentation

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

Definition at line 129 of file HLTOfflineReproducibility.cc.

HLTOfflineReproducibility::~HLTOfflineReproducibility ( )

Definition at line 161 of file HLTOfflineReproducibility.cc.

{
 
   // do anything here that needs to be done at desctruction time
   // (e.g. close files, deallocate resources etc.)

}

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 176 of file HLTOfflineReproducibility.cc.

References a, accept(), b, gather_cfg::cout, error, edm::EventID::event(), edm::Event::getByLabel(), hltConfig_, i, edm::EventBase::id(), getHLTprescales::index, j, edm::EventBase::luminosityBlock(), HLTConfigProvider::moduleIndex(), moduleLabel_, moduleLabelOFF_, moduleLabelON_, HLTConfigProvider::moduleType(), nDatasets_, nModules_, nPaths_, nPaths_PD_, nPathsOFF_, nPathsON_, path_OFFnotON_hist, path_OFFnotON_hist_PD, path_ON_hist, path_ON_hist_PD, path_ONnotOFF_hist, path_ONnotOFF_hist_PD, pathmodule_OFFnotON_hist, pathmodule_OFFnotON_hist_PD, pathmodule_ONnotOFF_hist, pathmodule_ONnotOFF_hist_PD, edm::EventID::run(), trigger_offline_, trigger_online_, triggerLabelOFF_, triggerLabelON_, triggerNames_, triggerNames_matched_, and x.

{
  using namespace edm;
  
  //cout <<"Run/Event/Lumi block "<< iEvent.id().run()<<" "<<iEvent.id().event()<<" "<<iEvent.luminosityBlock() <<endl;
  
  //Initialize Trigger
  TriggerResults trON_;
  Handle<TriggerResults> h_trigResON_;
  iEvent.getByLabel(triggerLabelON_, h_trigResON_);
  trON_ = *h_trigResON_;  
  
  TriggerResults trOFF_;
  Handle<TriggerResults> h_trigResOFF_;
  iEvent.getByLabel(triggerLabelOFF_, h_trigResOFF_);  
  trOFF_ = *h_trigResOFF_;

  vector<string> triggerListON_;
  Service<service::TriggerNamesService> tnsON_;
  bool foundNamesON_ = tnsON_->getTrigPaths(trON_,triggerListON_);
  if (!foundNamesON_) cout << "Could not get trigger names!\n";
  if (trON_.size()!=triggerListON_.size()) cout << "ERROR: length of names and paths not the same: " << triggerListON_.size() << "," << trON_.size() << endl;  
  
  vector<string> triggerListOFF_;
  Service<service::TriggerNamesService> tnsOFF_;
  bool foundNamesOFF_ = tnsOFF_->getTrigPaths(trOFF_,triggerListOFF_);
  if (!foundNamesOFF_) cout << "Could not get trigger names!\n";
  if (trOFF_.size()!=triggerListOFF_.size()) cout << "ERROR: length of names and paths not the same: " << triggerListOFF_.size() << "," << trOFF_.size() << endl;  
  

  vector<bool> online_accept_, offline_accept_, fails_prescaler_; 
  vector<int> module_indexON_, module_indexOFF_;
  vector<string> module_index_labelON_, module_index_labelOFF_;
  
  for (unsigned int x=0; x<nPaths_; x++) {
    online_accept_.push_back(false);
    offline_accept_.push_back(false);
    module_indexON_.push_back(-1);
    module_indexOFF_.push_back(-1);
    module_index_labelON_.push_back(" ");
    module_index_labelOFF_.push_back(" ");
    fails_prescaler_.push_back(false);
  }
  
  //loop over online trigger paths
  for (unsigned int i=0; i<nPathsON_; i++) {
    for (unsigned int x=0; x<nPaths_; x++) {
      if (triggerListON_[i]==triggerNames_[x]) {

        //if online accepted
        if (trON_[i].wasrun()==1 && trON_[i].accept()==1 && trON_[i].error()==0) {
          online_accept_.at(x) = true;
          trigger_online_[x]++;
          path_ON_hist->Fill(x);
          for (unsigned int a=0; a<nDatasets_; a++) {
            for (unsigned int b=0; b<nPaths_PD_[a]; b++) {
              if (triggerNames_matched_[i][a][b]) path_ON_hist_PD[a]->Fill(b);
            }
          }
        }
        
        //if online failed
        if (trON_[i].accept() == 0){
          module_index_labelON_.at(x) = moduleLabelON_[i][trON_[i].index()];
          module_indexON_.at(x) = hltConfig_.moduleIndex(triggerNames_[x],module_index_labelON_[x]);
        }
        
        //for each path, loop over modules and find if a path fails on a prescaler
        for (unsigned int j=0; j<nModules_[x]; ++j) {
          //const string& moduleLabel_(moduleLabel[j]);
          const string& moduleType = hltConfig_.moduleType(moduleLabel_[x][j]);
          if ( (trON_[i].accept()==0 && j==trON_[i].index()) && (moduleType=="HLTPrescaler" || moduleType=="TriggerResultsFilter") ) fails_prescaler_[x] = true;
        }

      }
    }
  }


  //loop over offline trigger paths
  for (unsigned int i=0; i<nPathsOFF_; i++) {
    for (unsigned int x=0; x<nPaths_; x++) {
      if (triggerListOFF_[i]==triggerNames_[x]) {

        //if offline accepted
        if (trOFF_[i].wasrun()==1 && trOFF_[i].accept()==1 && trOFF_[i].error()==0) {
          offline_accept_[x] = true;
          trigger_offline_[x]++;
        }

        //if offline failed
        if (trOFF_[i].accept() == 0) {
          module_index_labelOFF_.at(x) = moduleLabelOFF_[i][trOFF_[i].index()];
          module_indexOFF_.at(x) = hltConfig_.moduleIndex(triggerNames_[x],module_index_labelOFF_[x]);
        }
        
        //for each path, loop over modules and find if a path fails on a prescaler
        for (unsigned int j=0; j<nModules_[x]; ++j) {
          //const string& moduleLabel_(moduleLabel[j]);
          const string& moduleType = hltConfig_.moduleType(moduleLabel_[x][j]);
          if ( (trOFF_[i].accept()==0 && j==trOFF_[i].index()) && (moduleType=="HLTPrescaler" || moduleType=="TriggerResultsFilter") ) fails_prescaler_[x] = true;
        }

      }
    }
  }



  //check agreement between online and offline
  //loop over trigger paths (online and offline)
  for (unsigned int x=0; x<nPaths_; x++) {
    if (!fails_prescaler_[x]){ //ignore paths that fail on a prescale
      if(online_accept_[x] && !offline_accept_[x]){ //online fires but offline doesn't
        path_ONnotOFF_hist->Fill(x);
        pathmodule_ONnotOFF_hist->Fill(x,module_indexOFF_[x]); //module and path for where it fails offline
        cout<<"  Event "<<iEvent.id().event()<<" in run "<<iEvent.id().run()<<" and luminosity block "<<iEvent.luminosityBlock()<<endl;
        cout<<"  fires online but not offline!!"<<endl;
        cout<<"  Path is: "<<triggerNames_[x]<<", last run module is: "<<module_index_labelOFF_[x]<<endl;
        for (unsigned int a=0; a<nDatasets_; a++) {
          for (unsigned int b=0; b<nPaths_PD_[a]; b++) {
            if (triggerNames_matched_[x][a][b]){
              path_ONnotOFF_hist_PD[a]->Fill(b);
              pathmodule_ONnotOFF_hist_PD[a]->Fill(b,module_indexOFF_[x]); //module and path for where it fails offline
            }
          }
        }
      }
      if(!online_accept_[x] && offline_accept_[x]){//offline fires but online doesn't
        path_OFFnotON_hist->Fill(x);
        pathmodule_OFFnotON_hist->Fill(x,module_indexON_[x]); //module and path for where it fails online
        cout<<"  Event "<<iEvent.id().event()<<" in run "<<iEvent.id().run()<<" and luminosity block "<<iEvent.luminosityBlock()<<endl;
        cout<<"  fires offline but not online!!"<<endl;
        cout<<"  Path is: "<<triggerNames_[x]<<", last run module is: "<<module_index_labelON_[x]<<endl;
        for (unsigned int a=0; a<nDatasets_; a++) {
          for (unsigned int b=0; b<nPaths_PD_[a]; b++) {
            if (triggerNames_matched_[x][a][b]){
              path_OFFnotON_hist_PD[a]->Fill(b);
              pathmodule_OFFnotON_hist_PD[a]->Fill(b,module_indexON_[x]); //module and path for where it fails online
            }
          }
        }
      }
    }

  }//end of loop over trigger paths



  //const vector<string> & moduleLabels(hltConfig_.moduleLabels(i));
  //cout<<"triggerListON_["<<i<<"] is: "<<triggerListON_[i]<<endl;
  

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

Reimplemented from edm::EDAnalyzer.

Definition at line 334 of file HLTOfflineReproducibility.cc.

{
}
void HLTOfflineReproducibility::beginLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 612 of file HLTOfflineReproducibility.cc.

{
}
void HLTOfflineReproducibility::beginRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 346 of file HLTOfflineReproducibility.cc.

References a, b, gather_cfg::cout, HLTConfigProvider::datasetContent(), datasetContent_, HLTConfigProvider::datasetNames(), datasetNames_, hltConfig_, i, init, HLTConfigProvider::init(), j, HLTConfigProvider::moduleLabel(), moduleLabel_, moduleLabelOFF_, moduleLabelON_, HLTConfigProvider::moduleLabels(), HLTConfigProvider::moduleType(), nDatasets_, nModules_, nPaths_, nPaths_PD_, nPathsOFF_, nPathsON_, path_OFFnotON_hist, path_OFFnotON_hist_PD, path_ON_hist, path_ON_hist_PD, path_ONnotOFF_hist, path_ONnotOFF_hist_PD, pathmodule_OFFnotON_hist, pathmodule_OFFnotON_hist_PD, pathmodule_ONnotOFF_hist, pathmodule_ONnotOFF_hist_PD, processNameOFF_, processNameON_, findQualityFiles::size, HLTConfigProvider::size(), trigger_offline_, trigger_online_, HLTConfigProvider::triggerNames(), triggerNames_, triggerNames_matched_, and x.

{
  edm::Service<TFileService> fs;  
  void init(const edm::TriggerResults &, const edm::TriggerNames & HLTNames);

  bool changed(true);
  nPathsON_=0, nPathsOFF_=0;
  vector<string> triggerNamesON_, triggerNamesOFF_;
  vector<string> temp_;
  unsigned int max_nModules_=0;
  vector<unsigned int> max_nModules_PD_, nModules_diff_;
  bool TriggerModuleNamesOK_ = true;

  //---------------------------------------hltConfig for online-------------------------------
  if (hltConfig_.init(iRun,iSetup,processNameON_,changed)) {
    // if init returns TRUE, initialisation has succeeded!
    if (changed) {
      cout<<"hlt_Config_.init returns true for online"<<endl;
      // The HLT config has actually changed wrt the previous Run, hence rebook your
      // histograms or do anything else dependent on the revised HLT config
      // check if trigger name in (new) config
      triggerNamesON_ = hltConfig_.triggerNames();

      //loop over trigger paths
      nPathsON_ = hltConfig_.size();
      for (unsigned int i=0; i<nPathsON_; i++) {
        temp_.clear();
        //const vector<string> & moduleLabelsON(hltConfig_.moduleLabels(i));
        for (unsigned int j=0; j<hltConfig_.moduleLabels(i).size(); j++) {
          temp_.push_back(hltConfig_.moduleLabel(i,j));
        }
        moduleLabelON_.push_back(temp_);
      }

    }
  } 
  else {
    // if init returns FALSE, initialisation has NOT succeeded, which indicates a problem
    // with the file and/or code and needs to be investigated!
    cout<<" HLT config extraction failure with process name " << processNameON_;
    // In this case, all access methods will return empty values!
  }

  //-------------------hltConfig for offline----------------------------------------
  if (hltConfig_.init(iRun,iSetup,processNameOFF_,changed)) {
    // if init returns TRUE, initialisation has succeeded!
    if (changed) {
      cout<<"hlt_Config_.init returns true for offline"<<endl;
      // The HLT config has actually changed wrt the previous Run, hence rebook your
      // histograms or do anything else dependent on the revised HLT config
      // check if trigger name in (new) config
      triggerNamesOFF_ = hltConfig_.triggerNames();

      //loop over trigger paths
      nPathsOFF_ = hltConfig_.size();
      for (unsigned int i=0; i<nPathsOFF_; i++) {
        temp_.clear();
        for (unsigned int j=0; j<hltConfig_.moduleLabels(i).size(); j++){
          temp_.push_back(hltConfig_.moduleLabel(i,j));
        }
        moduleLabelOFF_.push_back(temp_);
      }

    }
  } 
  else {
    // if init returns FALSE, initialisation has NOT succeeded, which indicates a problem
    // with the file and/or code and needs to be investigated!
    cout<<" HLT config extraction failure with process name " << processNameOFF_;
    // In this case, all access methods will return empty values!
  }

  //------------------compare online and offline hltConfig------------------------
  if (nPathsON_==0 || nPathsOFF_==0){
    cout<<"There are 0 paths online or offline!! There are "<<nPathsON_<<" paths online and "<<nPathsOFF_<<" paths offline!!!"<<endl;
    TriggerModuleNamesOK_ = false;
  }
  else{
    //define nPaths_ as number of paths shared between online and offline
    if (nPathsON_<=nPathsOFF_) nPaths_=nPathsON_;
    else nPaths_=nPathsOFF_;

    for (unsigned int i=0; i<nPathsON_; i++) {
      for (unsigned int j=0; j<nPathsOFF_; j++) {
        if (triggerNamesON_[i]==triggerNamesOFF_[j]){
          triggerNames_.push_back(triggerNamesON_[i]);
          if (i!=j) cout<<"Path "<<triggerNamesON_[i]<<" corresponds to path number "<<i<<" for online and path number "<<j<<" for offline"<<endl;

          //define nModules_ as number of modules shared between online and offline
          if (moduleLabelON_[i].size()<=moduleLabelOFF_[j].size()) nModules_.push_back(moduleLabelON_[i].size());
          else nModules_.push_back(moduleLabelOFF_[j].size());

          if (nModules_[i]>max_nModules_) max_nModules_=nModules_[i];
          
          if (moduleLabelON_[i].size()>moduleLabelOFF_[j].size()) nModules_diff_.push_back(moduleLabelON_[i].size()-moduleLabelOFF_[j].size());
          else nModules_diff_.push_back(moduleLabelOFF_[j].size()-moduleLabelON_[i].size());

          temp_.clear();
          for (unsigned int a=0; a<moduleLabelON_[i].size(); a++) {
            for (unsigned int b=0; b<moduleLabelOFF_[j].size(); b++) {
              //match online and offline module labels
              //since a module can be run twice per path, but not usually right after one another,
              //require that a and b be fairly close to each other, +/- the difference in the number of modules run offline vs online,
              //to avoid double-counting modules that are repeated later in the path
              //also, since we need to work with unsigned ints, a or b could also be 0, ignoring the requirement described above
              if ( (moduleLabelON_[i][a]==moduleLabelOFF_[j][b]) && ( (b<=a+nModules_diff_[i] && b>=a-nModules_diff_[i]) || (a==0 || b==0) ) ){
                temp_.push_back(moduleLabelON_[i][a]);
                if (a!=b){
                  cout<<"For path "<<triggerNamesON_[i]<<" online and "<<triggerNamesOFF_[j]<<" offline:"<<endl;
                  cout<<"  module "<<moduleLabelON_[i][a]<<" corresponds to module number "<<a<<" for online and module number "<<b<<" for offline"<<endl;
                }
              }
            }
          }
          moduleLabel_.push_back(temp_);
        }
      }
    }
  }


  //----------------------------------------------------------------------------------------------------------

  //if everything is good:
  //save path and module names to be used in event loop, print out the module names and types for each path
  //get paths in each dataset
  if (TriggerModuleNamesOK_){

    //------------all paths--------------
    cout<<endl<<"There are "<<nPaths_<<" paths in total"<<endl;
    cout<<"Maximum number of modules over all paths is: "<<max_nModules_<<endl;  

    for (unsigned int x=0; x<nPaths_; x++) {
      trigger_online_.push_back(0);
      trigger_offline_.push_back(0);
      cout<<endl<<"For "<<triggerNames_[x]<<" (trigger number "<<x<<"), there are "<<nModules_[x]<<" modules:"<<endl;
      for (unsigned int j=0; j<nModules_[x]; j++) {
        const string& moduleType_ = hltConfig_.moduleType(moduleLabel_[x][j]);
        cout<<"  module "<<j<<" is "<<moduleLabel_[x][j]<<" and is of type "<<moduleType_<<endl;
      }
    }


    //---------paths per dataset-------------------------------------------
    //get datasets, initialize max_nModules_PD_
    datasetNames_ = hltConfig_.datasetNames();
    nDatasets_ = datasetNames_.size();    
    for (unsigned int a=0; a<nDatasets_; a++) {
      max_nModules_PD_.push_back(0);
    }

    //loop over datasets, paths in each dataset
    for (unsigned int a=0; a<nDatasets_; a++) {
      temp_.clear();
      vector<string> datasetcontent_ = hltConfig_.datasetContent(a);
      nPaths_PD_.push_back(datasetcontent_.size());
      cout<<endl<<"For dataset "<<datasetNames_[a]<<" (dataset number "<<a<<"), there are "<<nPaths_PD_[a]<<" paths:"<<endl;
      for (unsigned int b=0; b<nPaths_PD_[a]; b++) {
        cout<<"  path "<<b<<" is "<<datasetcontent_[b]<<endl;
        temp_.push_back(datasetcontent_[b]);
      }
      datasetContent_.push_back(temp_);
    }

    //match trigger names in full list to trigger names per dataset; find max number of modules over all triggers in each dataset
    //find matches
    vector <vector<bool> > temp1_;
    vector<bool> temp2_;
    for (unsigned int x=0; x<nPaths_; x++) {
      temp1_.clear();
      for (unsigned int a=0; a<nDatasets_; a++) {
        temp2_.clear();
        for (unsigned int b=0; b<nPaths_PD_[a]; b++) {
          if (triggerNames_[x]==datasetContent_[a][b]){
            temp2_.push_back(true);         
            //cout<<"Matched trigger name is: "<<datasetContent_[a][b]<<" for dataset "<<a<<" and dataset path "<<b<<endl;
          }
          else temp2_.push_back(false);
        }
        temp1_.push_back(temp2_);
      }
      triggerNames_matched_.push_back(temp1_);
    }

    //if matched and # of modules is bigger than all previous ones, take that number as new maximum
    for (unsigned int x=0; x<nPaths_; x++) {
      for (unsigned int a=0; a<nDatasets_; a++) {
        for (unsigned int b=0; b<nPaths_PD_[a]; b++) {
          if (triggerNames_matched_[x][a][b] && nModules_[x]>max_nModules_PD_[a]) max_nModules_PD_[a]=nModules_[x];
        }
      }
    }

    //for (unsigned int a=0; a<nDatasets_; a++) {
    //cout<<"For dataset "<<datasetNames_[a]<<", the max number of modules is: "<<max_nModules_PD_[a]<<endl;
    //}

  }//end if all triggers and modules match from online to offline
  

  //----------------------------------------------------------------------------------------------------------


  //define histograms

  //all paths
  path_ON_hist = fs->make<TH1D>("path_ON_hist", "Total Times Online Path Fires", nPaths_, 0, nPaths_);
  path_ONnotOFF_hist = fs->make<TH1D>("path_ONnotOFF_hist", "Online Path fires but Offline does not", nPaths_, 0, nPaths_);
  path_OFFnotON_hist = fs->make<TH1D>("path_OFFnotON_hist", "Offline Path fires but Online does not", nPaths_, 0, nPaths_);
  pathmodule_ONnotOFF_hist = fs->make<TH2D>("pathmodule_ONnotOFF_hist", "Last run module index vs Path for Offline, when Online fired but Offline didn't", nPaths_, 0, nPaths_, max_nModules_, 0, max_nModules_);
  pathmodule_OFFnotON_hist = fs->make<TH2D>("pathmodule_OFFnotON_hist", "Last run module index vs Path for Online, when Offline fired but Online didn't", nPaths_, 0, nPaths_, max_nModules_, 0, max_nModules_);
  
  //paths per dataset
  char path_ON_name[100], path_ONnotOFF_name[100], path_OFFnotON_name[100], pathmodule_ONnotOFF_name[100], pathmodule_OFFnotON_name[100];
  for (unsigned int a = 0; a < nDatasets_; ++a) {
    snprintf(path_ON_name,             100, "path_ON_hist_PD[%i]",              a);
    snprintf(path_ONnotOFF_name,       100, "path_ONnotOFF_hist_PD[%i]",        a);
    snprintf(path_OFFnotON_name,       100, "path_OFFnotON_hist_PD[%i]",        a);
    snprintf(pathmodule_ONnotOFF_name, 100, "pathmodule_ONnotOFF_hist_PD[%i]",  a);
    snprintf(pathmodule_OFFnotON_name, 100, "pathmodule_OFFnotON_hist_PD[%i]",  a);

    TString path_ON_title             = "Total Times Online Path Fires (" + datasetNames_[a] + " dataset)";
    TString path_ONnotOFF_title       = "Online Path fires but Offline does not (" + datasetNames_[a] + " dataset)";
    TString path_OFFnotON_title       = "Offline Path fires but Online does not (" + datasetNames_[a] + " dataset)";
    TString pathmodule_ONnotOFF_title = "Last run module index vs Path for Offline, when Online fired but Offline didn't (" + datasetNames_[a] + " dataset)";
    TString pathmodule_OFFnotON_title = "Last run module index vs Path for Online, when Offline fired but Online didn't (" + datasetNames_[a] + " dataset)";

    path_ON_hist_PD.push_back(fs->make<TH1D>(path_ON_name, path_ON_title, nPaths_PD_[a], 0, nPaths_PD_[a]));
    path_ONnotOFF_hist_PD.push_back(fs->make<TH1D>(path_ONnotOFF_name, path_ONnotOFF_title, nPaths_PD_[a], 0, nPaths_PD_[a]));
    path_OFFnotON_hist_PD.push_back(fs->make<TH1D>(path_OFFnotON_name, path_OFFnotON_title, nPaths_PD_[a], 0, nPaths_PD_[a]));
    pathmodule_ONnotOFF_hist_PD.push_back(fs->make<TH2D>(pathmodule_ONnotOFF_name, pathmodule_ONnotOFF_title, nPaths_PD_[a], 0, nPaths_PD_[a], max_nModules_PD_[a], 0, max_nModules_PD_[a]));
    pathmodule_OFFnotON_hist_PD.push_back(fs->make<TH2D>(pathmodule_OFFnotON_name, pathmodule_OFFnotON_title, nPaths_PD_[a], 0, nPaths_PD_[a], max_nModules_PD_[a], 0, max_nModules_PD_[a]));
  }
  
}
bool HLTOfflineReproducibility::check ( std::string  process,
std::string  pCheck 
) [private]
void HLTOfflineReproducibility::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 340 of file HLTOfflineReproducibility.cc.

{
}
void HLTOfflineReproducibility::endLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 618 of file HLTOfflineReproducibility.cc.

{
}
void HLTOfflineReproducibility::endRun ( edm::Run const &  ,
edm::EventSetup const &   
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 584 of file HLTOfflineReproducibility.cc.

References a, b, gather_cfg::cout, datasetContent_, nDatasets_, nPaths_, nPaths_PD_, path_OFFnotON_hist, path_OFFnotON_hist_PD, path_ON_hist, path_ON_hist_PD, path_ONnotOFF_hist, path_ONnotOFF_hist_PD, pathmodule_OFFnotON_hist, pathmodule_OFFnotON_hist_PD, pathmodule_ONnotOFF_hist, pathmodule_ONnotOFF_hist_PD, trigger_offline_, trigger_online_, triggerNames_, and x.

{
  //all paths
  cout<<endl;
  for (unsigned int x=0; x<nPaths_; x++) {
    cout<<triggerNames_[x]<<" online accepts: "<<trigger_online_[x]<<", offline accepts: "<<trigger_offline_[x]<<endl;
    path_ON_hist->GetXaxis()->SetBinLabel(x+1,triggerNames_[x].c_str());
    path_ONnotOFF_hist->GetXaxis()->SetBinLabel(x+1,triggerNames_[x].c_str());
    path_OFFnotON_hist->GetXaxis()->SetBinLabel(x+1,triggerNames_[x].c_str());
    pathmodule_ONnotOFF_hist->GetXaxis()->SetBinLabel(x+1,triggerNames_[x].c_str());
    pathmodule_OFFnotON_hist->GetXaxis()->SetBinLabel(x+1,triggerNames_[x].c_str());
  }

  //paths per dataset
  for (unsigned int a=0; a<nDatasets_; a++) {
    for (unsigned int b=0; b<nPaths_PD_[a]; b++) {
      path_ON_hist_PD[a]->GetXaxis()->SetBinLabel(b+1,datasetContent_[a][b].c_str());
      path_ONnotOFF_hist_PD[a]->GetXaxis()->SetBinLabel(b+1,datasetContent_[a][b].c_str());
      path_OFFnotON_hist_PD[a]->GetXaxis()->SetBinLabel(b+1,datasetContent_[a][b].c_str());
      pathmodule_ONnotOFF_hist_PD[a]->GetXaxis()->SetBinLabel(b+1,datasetContent_[a][b].c_str());
      pathmodule_OFFnotON_hist_PD[a]->GetXaxis()->SetBinLabel(b+1,datasetContent_[a][b].c_str());
    }
  }

}
void HLTOfflineReproducibility::fillDescriptions ( edm::ConfigurationDescriptions descriptions) [static]

Reimplemented from edm::EDAnalyzer.

Definition at line 624 of file HLTOfflineReproducibility.cc.

References edm::ConfigurationDescriptions::addDefault(), and edm::ParameterSetDescription::setUnknown().

                                                                                      {
  //The following says we do not know what parameters are allowed so do no validation
  // Please change this to state exactly what you do use, even if it is no parameters
  edm::ParameterSetDescription desc;
  desc.setUnknown();
  descriptions.addDefault(desc);
}

Member Data Documentation

vector<vector<string> > HLTOfflineReproducibility::datasetContent_ [private]

Definition at line 90 of file HLTOfflineReproducibility.cc.

Referenced by beginRun(), and endRun().

vector<string> HLTOfflineReproducibility::datasetNames_ [private]

Definition at line 89 of file HLTOfflineReproducibility.cc.

Referenced by beginRun().

Definition at line 95 of file HLTOfflineReproducibility.cc.

Referenced by analyze(), and beginRun().

Definition at line 99 of file HLTOfflineReproducibility.cc.

Definition at line 100 of file HLTOfflineReproducibility.cc.

vector< vector<string> > HLTOfflineReproducibility::moduleLabel_ [private]

Definition at line 87 of file HLTOfflineReproducibility.cc.

Referenced by analyze(), and beginRun().

vector< vector<string> > HLTOfflineReproducibility::moduleLabelOFF_ [private]

Definition at line 87 of file HLTOfflineReproducibility.cc.

Referenced by analyze(), and beginRun().

vector< vector<string> > HLTOfflineReproducibility::moduleLabelON_ [private]

Definition at line 87 of file HLTOfflineReproducibility.cc.

Referenced by analyze(), and beginRun().

unsigned int HLTOfflineReproducibility::nDatasets_ [private]

Definition at line 85 of file HLTOfflineReproducibility.cc.

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

Definition at line 97 of file HLTOfflineReproducibility.cc.

vector<unsigned int> HLTOfflineReproducibility::nModules_ [private]

Definition at line 88 of file HLTOfflineReproducibility.cc.

Referenced by analyze(), and beginRun().

Definition at line 98 of file HLTOfflineReproducibility.cc.

unsigned int HLTOfflineReproducibility::nPaths_ [private]

Definition at line 85 of file HLTOfflineReproducibility.cc.

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

vector<unsigned int> HLTOfflineReproducibility::nPaths_PD_ [private]

Definition at line 88 of file HLTOfflineReproducibility.cc.

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

unsigned int HLTOfflineReproducibility::nPathsOFF_ [private]

Definition at line 85 of file HLTOfflineReproducibility.cc.

Referenced by analyze(), and beginRun().

unsigned int HLTOfflineReproducibility::nPathsON_ [private]

Definition at line 85 of file HLTOfflineReproducibility.cc.

Referenced by analyze(), and beginRun().

Definition at line 106 of file HLTOfflineReproducibility.cc.

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

Definition at line 112 of file HLTOfflineReproducibility.cc.

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

Definition at line 104 of file HLTOfflineReproducibility.cc.

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

Definition at line 110 of file HLTOfflineReproducibility.cc.

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

Definition at line 105 of file HLTOfflineReproducibility.cc.

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

Definition at line 111 of file HLTOfflineReproducibility.cc.

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

Definition at line 108 of file HLTOfflineReproducibility.cc.

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

Definition at line 114 of file HLTOfflineReproducibility.cc.

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

Definition at line 107 of file HLTOfflineReproducibility.cc.

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

Definition at line 113 of file HLTOfflineReproducibility.cc.

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

Definition at line 94 of file HLTOfflineReproducibility.cc.

Referenced by beginRun().

Definition at line 93 of file HLTOfflineReproducibility.cc.

Referenced by beginRun().

Definition at line 102 of file HLTOfflineReproducibility.cc.

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

Definition at line 101 of file HLTOfflineReproducibility.cc.

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

Definition at line 82 of file HLTOfflineReproducibility.cc.

Referenced by analyze().

Definition at line 81 of file HLTOfflineReproducibility.cc.

Referenced by analyze().

vector<string> HLTOfflineReproducibility::triggerNames_ [private]

Definition at line 86 of file HLTOfflineReproducibility.cc.

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

vector< vector< vector<bool> > > HLTOfflineReproducibility::triggerNames_matched_ [private]

Definition at line 91 of file HLTOfflineReproducibility.cc.

Referenced by analyze(), and beginRun().