78 if (*associationMap1[
edm::Ref<std::vector<int>>(inputCollection1, 0)] != 22 ||
79 *associationMap1[
edm::Ref<std::vector<int>>(inputCollection1, 2)] != 24 ||
82 throw cms::Exception(
"TestFailure") <<
"unexpected result after using AssociationMap 1";
85 if (*iter->
val != 22 || iter->
key !=
edm::Ref<std::vector<int>>(inputCollection1, 0)) {
86 throw cms::Exception(
"TestFailure") <<
"unexpected result after using AssociationMap 2";
89 if (*iter->
val != 24 || iter->
key !=
edm::Ref<std::vector<int>>(inputCollection1, 2)) {
90 throw cms::Exception(
"TestFailure") <<
"unexpected result after using AssociationMap 3";
93 if (iter != associationMap1.
end()) {
94 throw cms::Exception(
"TestFailure") <<
"unexpected result after using AssociationMap 4";
100 if (*associationMap2[
edm::Ref<std::vector<int>>(inputCollection1, 0)] != 22 ||
101 *associationMap2[
edm::Ref<std::vector<int>>(inputCollection1, 2)] != 25 ||
102 *associationMap2[
edm::Ptr<int>(inputCollection1, 0)] != 22 ||
103 *associationMap2[
edm::Ptr<int>(inputCollection1, 2)] != 25) {
104 throw cms::Exception(
"TestFailure") <<
"unexpected result after using AssociationMap 5";
109 if (*iter2->
val != 25 || iter2->
key !=
edm::Ref<std::vector<int>>(inputCollection1, 2)) {
110 throw cms::Exception(
"TestFailure") <<
"unexpected result after using AssociationMap 6";
117 if (associationMap3[
edm::Ref<std::vector<int>>(inputCollection1, 0)] != 11.0 ||
118 associationMap3[
edm::Ref<std::vector<int>>(inputCollection1, 2)] != 12.0 ||
119 associationMap3[
edm::Ptr<int>(inputCollection1, 0)] != 11.0 ||
120 associationMap3[
edm::Ptr<int>(inputCollection1, 2)] != 12.0) {
121 throw cms::Exception(
"TestFailure") <<
"unexpected result after using AssociationMap 7";
125 if (iter3->
val != 12.0 || iter3->
key !=
edm::Ref<std::vector<int>>(inputCollection1, 2)) {
126 throw cms::Exception(
"TestFailure") <<
"unexpected result after using AssociationMap 8";
133 if (associationMap4[
edm::Ref<std::vector<int>>(inputCollection1, 0)] != 21.0 ||
134 associationMap4[
edm::Ref<std::vector<int>>(inputCollection1, 2)] != 22.0 ||
135 associationMap4[
edm::Ptr<int>(inputCollection1, 0)] != 21.0 ||
136 associationMap4[
edm::Ptr<int>(inputCollection1, 2)] != 22.0) {
137 throw cms::Exception(
"TestFailure") <<
"unexpected result after using AssociationMap 9";
141 if (iter4->
val != 22.0 || iter4->
key !=
edm::Ref<std::vector<int>>(inputCollection1, 2)) {
142 throw cms::Exception(
"TestFailure") <<
"unexpected result after using AssociationMap 10";
149 if (*associationMap5[
edm::Ref<std::vector<int>>(inputCollection1, 0)].at(0) != 22 ||
150 *associationMap5[
edm::Ref<std::vector<int>>(inputCollection1, 2)].at(1) != 27 ||
151 *associationMap5[
edm::Ptr<int>(inputCollection1, 0)].at(0) != 22 ||
152 *associationMap5[
edm::Ptr<int>(inputCollection1, 2)].at(1) != 27) {
153 throw cms::Exception(
"TestFailure") <<
"unexpected result after using AssociationMap 11";
158 throw cms::Exception(
"TestFailure") <<
"unexpected result after using AssociationMap 12";
164 if (*associationMap6[
edm::Ref<std::vector<int>>(inputCollection1, 0)].at(0).
first != 22 ||
165 *associationMap6[
edm::Ref<std::vector<int>>(inputCollection1, 2)].at(1).
first != 25 ||
168 associationMap6[
edm::Ref<std::vector<int>>(inputCollection1, 0)].at(0).
second != 31.0 ||
169 associationMap6[
edm::Ref<std::vector<int>>(inputCollection1, 2)].at(1).
second != 32.0 ||
172 throw cms::Exception(
"TestFailure") <<
"unexpected result after using AssociationMap 13";
176 if (*iter6->
val.at(1).first != 25 || iter6->
val.at(1).second != 32.0 ||
178 throw cms::Exception(
"TestFailure") <<
"unexpected result after using AssociationMap 14";
188 if (*associationMap7[inputView1.
refAt(0)] != 24 || *associationMap7[inputView1.
refAt(2)] != 25) {
189 throw cms::Exception(
"TestFailure") <<
"unexpected result after using AssociationMap 15";
193 if (*iter7->
val != 25 || iter7->
key != inputView1.
refAt(2)) {
194 throw cms::Exception(
"TestFailure") <<
"unexpected result after using AssociationMap 16";
200 if (*associationMap8[inputView1.
refAt(0)] != 26 || *associationMap8[inputView1.
refAt(2)] != 27) {
201 throw cms::Exception(
"TestFailure") <<
"unexpected result after using AssociationMap 17";
205 if (*iter8->
val != 27 || iter8->
key != inputView1.
refAt(2)) {
206 throw cms::Exception(
"TestFailure") <<
"unexpected result after using AssociationMap 18";
edm::EDGetTokenT< AssocOneToValue > associationMapToken3_
RefToBase< value_type > refAt(size_type i) const
edm::EDGetTokenT< AssocOneToOneView > associationMapToken8_
edm::AssociationMap< edm::OneToManyWithQuality< std::vector< int >, std::vector< int >, double > > AssocOneToManyWithQuality
edm::EDGetTokenT< AssocOneToOneView > associationMapToken7_
edm::EDGetTokenT< std::vector< int > > inputToken1_
const_iterator end() const
last iterator over the map (read only)
edm::AssociationMap< edm::OneToOne< std::vector< int >, std::vector< int > > > AssocOneToOne
U second(std::pair< T, U > const &p)
void analyze(edm::StreamID, edm::Event const &event, edm::EventSetup const &) const override
edm::EDGetTokenT< edm::View< int > > inputToken1V_
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< AssocOneToValue > associationMapToken4_
edm::EDGetTokenT< AssocOneToOne > associationMapToken1_
edm::EDGetTokenT< std::vector< int > > inputToken2_
edm::EDGetTokenT< AssocOneToOne > associationMapToken2_
const value_type & get(size_type i) const
return value_typeelement with key i
AssociationMapAnalyzer(edm::ParameterSet const &)
const_iterator begin() const
first iterator over the map (read only)
edm::AssociationMap< edm::OneToValue< std::vector< int >, double > > AssocOneToValue
edm::EDGetTokenT< edm::View< int > > inputToken2V_
edm::AssociationMap< edm::OneToMany< std::vector< int >, std::vector< int > > > AssocOneToMany
edm::AssociationMap< edm::OneToOne< edm::View< int >, edm::View< int > > > AssocOneToOneView
edm::EDGetTokenT< AssocOneToMany > associationMapToken5_
edm::EDGetTokenT< AssocOneToManyWithQuality > associationMapToken6_