47 {
48
50
51
53 if(!
event.retrieveMetaInput(incompleteCBC,
"IncompleteCutBookkeepers").isSuccess()){
54 throw std::runtime_error("Failed to retrieve IncompleteCutBookkeepers from MetaData!");
55 }
57
58
60 if(!
event.retrieveMetaInput(completeCBC,
"CutBookkeepers").isSuccess()){
61 throw std::runtime_error("Failed to retrieve CutBookkeepers from MetaData!");
62 }
63
64
66 int maxCycle = -1;
67 for (const auto *cbk: *completeCBC) {
68 if (cbk->cycle() > maxCycle &&
69 cbk->name() == "AllExecutedEvents" &&
70 cbk->inputStream() == "StreamAOD") {
71 allEventsCBK = cbk;
72 maxCycle = cbk->cycle();
73 }
74 }
79}
size_type size() const noexcept
Returns the number of elements in the collection.
double sumOfEventWeightsSquared() const
Get the sum-of-(event-weights-squared) that this CutBookkeeper has seen.
double sumOfEventWeights() const
Get the sum-of-event-weights that this CutBookkeeper has seen.
uint64_t nAcceptedEvents() const
Get the number of accepted events that this CutBookkeeper has seen.
CutBookkeeper_v1 CutBookkeeper
Define the latest version of the CutBookkeeper class.
CutBookkeeperContainer_v1 CutBookkeeperContainer
Define the latest version of the CutBookkeeperContainer class.