4 #include "DataFormats/TestObjects/interface/TableTest.h" 14 std::vector<float> doublesToFloats(std::vector<double>
const& iDoubles) {
16 t.reserve(iDoubles.size());
17 for (
double d : iDoubles) {
18 t.push_back(static_cast<float>(
d));
32 produces<edmtest::TableTest>();
49 aFloats_(doublesToFloats(iConfig.getUntrackedParameter<
std::
vector<double>>(
"aFloats"))),
53 throw cms::Exception(
"Configuration") <<
"anInts_, aFloats_, and aStrings_ must have the same length";
63 <<
"Table size (" <<
size <<
") does not equal expected size (" <<
anInts_.size() <<
")";
66 unsigned int index = 0;
67 for (
auto const& row :
t) {
70 <<
"index " <<
index <<
" anInt =" << row.get<edmtest::AnInt>() <<
" expected " <<
anInts_[
index];
74 <<
"index " <<
index <<
" aFloat =" << row.get<edmtest::AFloat>() <<
" expected " <<
aFloats_[
index];
78 <<
"index " <<
index <<
" aString =" << row.get<edmtest::AString>() <<
" expected " <<
aStrings_[
index];
98 desc.setComment(
"Tests edm::soa::Table.");
99 OutputModule::fillDescription(
desc);
100 descriptions.
add(
"tabletestOutput",
desc);
115 if (3 != examiner->columnDescriptions().size()) {
117 <<
"wrong number of columns, expected 3 got " << examiner->columnDescriptions().size();
119 for (
auto const&
c : examiner->columnDescriptions()) {
const std::vector< float > aFloats_
void writeRun(edm::RunForOutput const &) override
void write(edm::EventForOutput const &e) override
TableTestProducer(edm::ParameterSet const &iConfig)
const std::vector< std::string > aStrings_
edm::EDGetTokenT< edmtest::TableTest > tableToken_
TypeID unwrappedTypeID() const
void writeLuminosityBlock(edm::LuminosityBlockForOutput const &) override
T getUntrackedParameter(std::string const &, T const &) const
const std::vector< float > aFloats_
void analyze(edm::StreamID, edm::Event const &iEvent, edm::EventSetup const &) const final
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
TableTestAnalyzer(edm::ParameterSet const &iConfig)
#define DEFINE_FWK_MODULE(type)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool isValid() const noexcept(true)
const std::vector< int > anInts_
const std::vector< std::string > aStrings_
SelectedProductsForBranchType const & keptProducts() const
WrapperBase const * wrapper() const noexcept(true)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const std::vector< int > anInts_
void produce(edm::StreamID, edm::Event &iEvent, edm::EventSetup const &) const final
TableTestOutputModule(edm::ParameterSet const &pset)
OutputModule(edm::ParameterSet const &iPSet)
std::shared_ptr< soa::TableExaminerBase > tableExaminer() const