CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
evf::ShmOutputModuleRegistry Class Reference

#include <ShmOutputModuleRegistry.h>

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.

8  {
9  }

Member Function Documentation

void evf::ShmOutputModuleRegistry::clear ( void  )
private
void evf::ShmOutputModuleRegistry::dumpRegistry ( )

Definition at line 25 of file ShmOutputModuleRegistry.cc.

References clm_, and gather_cfg::cout.

25  {
26  idct it= clm_.begin();
27  while(it!=clm_.end()){
28  std::cout << "name " << it->first << "add "
29  << (unsigned long)(it->second) << std::endl;
30  it++;
31  }
32  }
tuple cout
Definition: gather_cfg.py:121
OutputModule * evf::ShmOutputModuleRegistry::get ( std::string &  name)
std::string evf::ShmOutputModuleRegistry::getDatasetCSV ( )

Definition at line 68 of file ShmOutputModuleRegistry.cc.

References i, and listOfDatasets_.

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

69  {
70  std::string datasetNameString;
71  for (unsigned int i=0;i<listOfDatasets_.size();i++) {
72  if (i)
73  datasetNameString+=",";
74  datasetNameString+=listOfDatasets_[i];
75  }
76  return datasetNameString;
77  }
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > listOfDatasets_
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().

34  {
35  std::vector<edm::FUShmOutputModule *> outputs;
36  idct it= clm_.begin();
37  while(it!=clm_.end()){
38  edm::FUShmOutputModule * sho = dynamic_cast<edm::FUShmOutputModule *> ((*it).second);
39  if (sho!=NULL) {
40  outputs.push_back(sho);
41  }
42  it++;
43  }
44  return outputs;
45  }
#define NULL
Definition: scimark2.h:8
std::vector<edm::FUShmOutputModule *>& evf::ShmOutputModuleRegistry::getShmOutputModulesWithDatasets ( )
inline

Definition at line 35 of file ShmOutputModuleRegistry.h.

References shmOutputsWithDatasets_.

Referenced by evf::fuep::TriggerReportHelpers::packTriggerReport().

std::vector< edm::FUShmOutputModule * > shmOutputsWithDatasets_
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().

80  {
81  idct it= clm_.begin();
82  while(it!=clm_.end()){
83  edm::FUShmOutputModule * sho = dynamic_cast<edm::FUShmOutputModule *> ((*it).second);
84  if (sho!=NULL) {
85  sho->insertStreamAndDatasetInfo(streams,datasets);
86  }
87  it++;
88  }
89  }
#define NULL
Definition: scimark2.h:8
void insertStreamAndDatasetInfo(edm::ParameterSet &streams, edm::ParameterSet datasets)
void evf::ShmOutputModuleRegistry::registerModule ( std::string &  name,
OutputModule op 
)

Definition at line 11 of file ShmOutputModuleRegistry.cc.

References clm_.

12  {
13  clm_.insert(std::pair<std::string, OutputModule*>(name,op));
14  }
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().

54  {
56  listOfDatasets_.clear();
57  std::vector<edm::FUShmOutputModule *> outputs = getShmOutputModules();
58  for (unsigned int i=0;i<outputs.size();i++) {
59  edm::FUShmOutputModule * output = outputs[i];
60  if (output->getStreamId().size()) {
61  std::vector<std::string> datasets = output->getDatasetNames();
62  listOfDatasets_.insert(listOfDatasets_.end(),datasets.begin(),datasets.end());
63  if (datasets.size())
64  shmOutputsWithDatasets_.push_back(output);
65  }
66  }
67  }
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > listOfDatasets_
std::vector< std::string > getDatasetNames()
std::vector< edm::FUShmOutputModule * > shmOutputsWithDatasets_
std::vector< edm::FUShmOutputModule * > getShmOutputModules()

Friends And Related Function Documentation

friend class FWEPWrapper
friend

Definition at line 45 of file ShmOutputModuleRegistry.h.

Member Data Documentation

dct evf::ShmOutputModuleRegistry::clm_
private
std::vector<std::string> evf::ShmOutputModuleRegistry::listOfDatasets_
private

Definition at line 44 of file ShmOutputModuleRegistry.h.

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

std::vector<edm::FUShmOutputModule *> evf::ShmOutputModuleRegistry::shmOutputsWithDatasets_
private