CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
edm::test::TestProcessorConfig Class Reference

#include <TestProcessor.h>

Classes

struct  ProduceEntry
 

Public Member Functions

ProcessToken addExtraProcess (std::string const &iProcessName)
 
std::vector< ESProduceEntry > const & esProduceEntries () const
 
template<typename REC , typename T >
edm::test::ESPutTokenT< TesProduces (std::string iLabel=std::string())
 
std::vector< std::string > const & extraProcesses () const
 
std::vector< ProduceEntry > const & produceEntries () const
 
template<typename T >
edm::EDPutTokenT< Tproduces (std::string iModuleLabel, std::string iProductInstanceLabel=std::string(), ProcessToken iToken=ProcessToken())
 
std::string const & pythonConfiguration () const
 
void setPythonConfiguration (std::string iConfig)
 
 TestProcessorConfig (std::string const &iPythonConfiguration)
 

Private Member Functions

std::string processName (ProcessToken iToken)
 

Private Attributes

std::string config_
 
std::vector< ESProduceEntryesProduceEntries_
 
std::vector< std::string > extraProcesses_
 
std::vector< ProduceEntryproduceEntries_
 

Detailed Description

Definition at line 86 of file TestProcessor.h.

Constructor & Destructor Documentation

edm::test::TestProcessorConfig::TestProcessorConfig ( std::string const &  iPythonConfiguration)
inline

Definition at line 88 of file TestProcessor.h.

88 : config_(iPythonConfiguration) {}

Member Function Documentation

ProcessToken edm::test::TestProcessorConfig::addExtraProcess ( std::string const &  iProcessName)
inline

add a Process name to the Process history. If multiple calls are made to addProcess, then the call order will be the order of the Processes in the history.

Definition at line 94 of file TestProcessor.h.

94  {
95  extraProcesses_.emplace_back(iProcessName);
96  return ProcessToken(extraProcesses_.size() - 1);
97  }
std::vector< std::string > extraProcesses_
std::vector<ESProduceEntry> const& edm::test::TestProcessorConfig::esProduceEntries ( ) const
inline

Definition at line 138 of file TestProcessor.h.

Referenced by edm::test::TestProcessor::TestProcessor().

138 { return esProduceEntries_; }
std::vector< ESProduceEntry > esProduceEntries_
template<typename REC , typename T >
edm::test::ESPutTokenT<T> edm::test::TestProcessorConfig::esProduces ( std::string  iLabel = std::string())
inline

Definition at line 114 of file TestProcessor.h.

114  {
115  auto rk = eventsetup::EventSetupRecordKey::makeKey<REC>();
116  eventsetup::DataKey dk(eventsetup::DataKey::makeTypeTag<T>(), iLabel.c_str());
117  esProduceEntries_.emplace_back(rk, dk, std::make_shared<TestDataProxy<T>>());
118  return edm::test::ESPutTokenT<T>(esProduceEntries_.size() - 1);
119  }
std::vector< ESProduceEntry > esProduceEntries_
std::vector<std::string> const& edm::test::TestProcessorConfig::extraProcesses ( ) const
inline

Definition at line 99 of file TestProcessor.h.

Referenced by edm::test::TestProcessor::TestProcessor().

99 { return extraProcesses_; }
std::vector< std::string > extraProcesses_
std::string edm::test::TestProcessorConfig::processName ( ProcessToken  iToken)
inlineprivate

Definition at line 146 of file TestProcessor.h.

References edm::test::ProcessToken::index(), and AlCaHLTBitMon_QueryRunRegistry::string.

146  {
147  if (iToken.index() == ProcessToken::undefinedIndex()) {
148  return std::string();
149  }
150  return extraProcesses_[iToken.index()];
151  }
static int undefinedIndex()
Definition: TestProcessor.h:78
std::vector< std::string > extraProcesses_
std::vector<ProduceEntry> const& edm::test::TestProcessorConfig::produceEntries ( ) const
inline

Definition at line 136 of file TestProcessor.h.

Referenced by edm::test::TestProcessor::TestProcessor().

136 { return produceEntries_; }
std::vector< ProduceEntry > produceEntries_
template<typename T >
edm::EDPutTokenT<T> edm::test::TestProcessorConfig::produces ( std::string  iModuleLabel,
std::string  iProductInstanceLabel = std::string(),
ProcessToken  iToken = ProcessToken() 
)
inline

A blank iProcessName means it produces in the primary process. The use of any other name requires that it is first added via addExtraProcess.

Definition at line 105 of file TestProcessor.h.

References eostools::move(), and modifiedElectrons_cfi::processName.

107  {
108  produceEntries_.emplace_back(
109  edm::TypeID(typeid(T)), std::move(iModuleLabel), std::move(iProductInstanceLabel), processName(iToken));
110  return edm::EDPutTokenT<T>(produceEntries_.size() - 1);
111  }
std::vector< ProduceEntry > produceEntries_
long double T
def move(src, dest)
Definition: eostools.py:511
std::string processName(ProcessToken iToken)
std::string const& edm::test::TestProcessorConfig::pythonConfiguration ( ) const
inline

Definition at line 89 of file TestProcessor.h.

Referenced by edm::test::TestProcessor::TestProcessor().

89 { return config_; }
void edm::test::TestProcessorConfig::setPythonConfiguration ( std::string  iConfig)
inline

Definition at line 90 of file TestProcessor.h.

References eostools::move().

90 { config_ = std::move(iConfig); }
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

std::string edm::test::TestProcessorConfig::config_
private

Definition at line 141 of file TestProcessor.h.

std::vector<ESProduceEntry> edm::test::TestProcessorConfig::esProduceEntries_
private

Definition at line 144 of file TestProcessor.h.

std::vector<std::string> edm::test::TestProcessorConfig::extraProcesses_
private

Definition at line 142 of file TestProcessor.h.

std::vector<ProduceEntry> edm::test::TestProcessorConfig::produceEntries_
private

Definition at line 143 of file TestProcessor.h.