CMS 3D CMS Logo

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

evf::ShmOutputModuleRegistry Class Reference

#include <ShmOutputModuleRegistry.h>

List of all members.

Public Member Functions

void dumpRegistry ()
OutputModuleget (std::string &name)
std::string getDatasetCSV ()
std::vector
< edm::FUShmOutputModule * > 
getShmOutputModules ()
std::vector
< edm::FUShmOutputModule * > & 
getShmOutputModulesWithDatasets ()
void insertStreamAndDatasetInfo (edm::ParameterSet &streams, edm::ParameterSet &datasets)
void registerModule (std::string &name, OutputModule *op)
 ShmOutputModuleRegistry (const edm::ParameterSet &)
void updateDatasetInfo ()

Private Types

typedef std::map< std::string,
OutputModule * > 
dct
typedef dct::iterator idct

Private Member Functions

void clear ()

Private Attributes

dct clm_
std::vector< std::string > listOfDatasets_
std::vector
< edm::FUShmOutputModule * > 
shmOutputsWithDatasets_

Friends

class FWEPWrapper

Detailed Description

Definition at line 24 of file ShmOutputModuleRegistry.h.


Member Typedef Documentation

typedef std::map<std::string, OutputModule*> evf::ShmOutputModuleRegistry::dct [private]

Definition at line 39 of file ShmOutputModuleRegistry.h.

typedef dct::iterator evf::ShmOutputModuleRegistry::idct [private]

Definition at line 40 of file ShmOutputModuleRegistry.h.


Constructor & Destructor Documentation

evf::ShmOutputModuleRegistry::ShmOutputModuleRegistry ( const edm::ParameterSet ps)

Definition at line 8 of file ShmOutputModuleRegistry.cc.

                                                                           {
  }

Member Function Documentation

void evf::ShmOutputModuleRegistry::clear ( void  ) [private]

Definition at line 46 of file ShmOutputModuleRegistry.cc.

References clm_, listOfDatasets_, and shmOutputsWithDatasets_.

Referenced by evf::FWEPWrapper::init().

  {
     clm_.clear();
     shmOutputsWithDatasets_.clear();
     listOfDatasets_.clear();
  }
void evf::ShmOutputModuleRegistry::dumpRegistry ( )

Definition at line 25 of file ShmOutputModuleRegistry.cc.

References clm_, and gather_cfg::cout.

                                            {
    idct it= clm_.begin();
    while(it!=clm_.end()){
      std::cout << "name " << it->first << "add " 
                << (unsigned long)(it->second) << std::endl;
      it++;
    }
  }
OutputModule * evf::ShmOutputModuleRegistry::get ( std::string &  name)

Definition at line 17 of file ShmOutputModuleRegistry.cc.

References clm_.

Referenced by evf::fuep::TriggerReportHelpers::packTriggerReport(), and evf::FWEPWrapper::taskWebPage().

  {
    OutputModule* retval = 0;
    idct it= clm_.find(name);
    if(it!=clm_.end())
      retval = (it->second);
    return retval;
  }
std::string evf::ShmOutputModuleRegistry::getDatasetCSV ( )

Definition at line 68 of file ShmOutputModuleRegistry.cc.

References i, listOfDatasets_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by evf::FUEventProcessor::configuring(), and evf::FUEventProcessor::enabling().

  {
    std::string datasetNameString;
    for (unsigned int i=0;i<listOfDatasets_.size();i++) {
      if (i)
        datasetNameString+=",";
      datasetNameString+=listOfDatasets_[i];
    }
    return datasetNameString;
  }
std::vector< edm::FUShmOutputModule * > evf::ShmOutputModuleRegistry::getShmOutputModules ( )

Definition at line 33 of file ShmOutputModuleRegistry.cc.

References clm_, and NULL.

Referenced by evf::FUEventProcessor::enabling(), evf::FUEventProcessor::forkProcessesFromEDM(), and updateDatasetInfo().

  {
    std::vector<edm::FUShmOutputModule *> outputs;
    idct it= clm_.begin();
    while(it!=clm_.end()){
      edm::FUShmOutputModule * sho = dynamic_cast<edm::FUShmOutputModule *> ((*it).second);
      if (sho!=NULL) {
        outputs.push_back(sho);
      }
      it++;
    }
    return outputs;
  }
std::vector<edm::FUShmOutputModule *>& evf::ShmOutputModuleRegistry::getShmOutputModulesWithDatasets ( ) [inline]
void evf::ShmOutputModuleRegistry::insertStreamAndDatasetInfo ( edm::ParameterSet streams,
edm::ParameterSet datasets 
)

Definition at line 79 of file ShmOutputModuleRegistry.cc.

References clm_, edm::FUShmOutputModule::insertStreamAndDatasetInfo(), and NULL.

Referenced by evf::FWEPWrapper::init().

  {
    idct it= clm_.begin();
    while(it!=clm_.end()){
      edm::FUShmOutputModule * sho = dynamic_cast<edm::FUShmOutputModule *> ((*it).second);
      if (sho!=NULL) {
        sho->insertStreamAndDatasetInfo(streams,datasets);
      }
      it++;
    }
  }
void evf::ShmOutputModuleRegistry::registerModule ( std::string &  name,
OutputModule op 
)

Definition at line 11 of file ShmOutputModuleRegistry.cc.

References clm_.

  {
    clm_.insert(std::pair<std::string, OutputModule*>(name,op));
  }
void evf::ShmOutputModuleRegistry::updateDatasetInfo ( )

Definition at line 53 of file ShmOutputModuleRegistry.cc.

References RecoTau_DiTaus_pt_20-420_cfg::datasets, edm::FUShmOutputModule::getDatasetNames(), getShmOutputModules(), edm::FUShmOutputModule::getStreamId(), i, listOfDatasets_, convertSQLitetoXML_cfg::output, and shmOutputsWithDatasets_.

Referenced by evf::FWEPWrapper::init().

  {
    shmOutputsWithDatasets_.clear();
    listOfDatasets_.clear();
    std::vector<edm::FUShmOutputModule *> outputs = getShmOutputModules();
    for (unsigned int i=0;i<outputs.size();i++) {
      edm::FUShmOutputModule * output = outputs[i];
      if (output->getStreamId().size()) {
        std::vector<std::string> datasets  = output->getDatasetNames();
        listOfDatasets_.insert(listOfDatasets_.end(),datasets.begin(),datasets.end());
        if (datasets.size())
          shmOutputsWithDatasets_.push_back(output);
      }
    }
  }

Friends And Related Function Documentation

friend class FWEPWrapper [friend]

Definition at line 45 of file ShmOutputModuleRegistry.h.


Member Data Documentation

std::vector<std::string> evf::ShmOutputModuleRegistry::listOfDatasets_ [private]

Definition at line 44 of file ShmOutputModuleRegistry.h.

Referenced by clear(), getDatasetCSV(), and updateDatasetInfo().