@@ -77,22 +77,22 @@ int read_frames(const std::string& filename, bool assertBuildVersion = true) {
77
77
return 1 ;
78
78
}
79
79
80
- if (reader.getEntries (" events " ) != 10 ) {
80
+ if (reader.getEntries (podio::Category::Event ) != 10 ) {
81
81
std::cerr << " Could not read back the number of events correctly. "
82
- << " (expected:" << 10 << " , actual: " << reader.getEntries (" events " ) << " )" << std::endl;
82
+ << " (expected:" << 10 << " , actual: " << reader.getEntries (podio::Category::Event ) << " )" << std::endl;
83
83
return 1 ;
84
84
}
85
85
86
- if (reader.getEntries (" events " ) != reader.getEntries (" other_events" )) {
86
+ if (reader.getEntries (podio::Category::Event ) != reader.getEntries (" other_events" )) {
87
87
std::cerr << " Could not read back the number of events correctly. "
88
88
<< " (expected:" << 10 << " , actual: " << reader.getEntries (" other_events" ) << " )" << std::endl;
89
89
return 1 ;
90
90
}
91
91
92
92
// Read the frames in a different order than when writing them here to make
93
93
// sure that the writing/reading order does not impose any usage requirements
94
- for (size_t i = 0 ; i < reader.getEntries (" events " ); ++i) {
95
- auto frame = podio::Frame (reader.readNextEntry (" events " ));
94
+ for (size_t i = 0 ; i < reader.getEntries (podio::Category::Event ); ++i) {
95
+ auto frame = podio::Frame (reader.readNextEntry (podio::Category::Event ));
96
96
if (reader.currentFileVersion () > podio::version::Version{0 , 16 , 2 }) {
97
97
if (frame.get (" emptySubsetColl" ) == nullptr ) {
98
98
std::cerr << " Could not retrieve an empty subset collection" << std::endl;
@@ -114,7 +114,7 @@ int read_frames(const std::string& filename, bool assertBuildVersion = true) {
114
114
}
115
115
}
116
116
117
- if (reader.readNextEntry (" events " )) {
117
+ if (reader.readNextEntry (podio::Category::Event )) {
118
118
std::cerr << " Trying to read more frame data than is present should return a nullptr" << std::endl;
119
119
return 1 ;
120
120
}
@@ -127,10 +127,10 @@ int read_frames(const std::string& filename, bool assertBuildVersion = true) {
127
127
128
128
// Reading specific (jumping to) entry
129
129
{
130
- auto frame = podio::Frame (reader.readEntry (" events " , 4 ));
130
+ auto frame = podio::Frame (reader.readEntry (podio::Category::Event , 4 ));
131
131
processEvent (frame, 4 , reader.currentFileVersion ());
132
132
// Reading the next entry after jump, continues from after the jump
133
- auto nextFrame = podio::Frame (reader.readNextEntry (" events " ));
133
+ auto nextFrame = podio::Frame (reader.readNextEntry (podio::Category::Event ));
134
134
processEvent (nextFrame, 5 , reader.currentFileVersion ());
135
135
136
136
auto otherFrame = podio::Frame (reader.readEntry (" other_events" , 4 ));
@@ -147,7 +147,7 @@ int read_frames(const std::string& filename, bool assertBuildVersion = true) {
147
147
}
148
148
149
149
// Trying to read a Frame that is not present returns a nullptr
150
- if (reader.readEntry (" events " , 10 )) {
150
+ if (reader.readEntry (podio::Category::Event , 10 )) {
151
151
std::cerr << " Trying to read a specific entry that does not exist should return a nullptr" << std::endl;
152
152
return 1 ;
153
153
}
0 commit comments