ATLAS Offline Software
Loading...
Searching...
No Matches
CutBookkeeper_v1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
6// Implementation file for class CutBookkeeper_v1
7// Author: Karsten Koeneke, May 2014 <karsten.koeneke@cern.ch>
9
10// Local include(s):
11//#include "xAODCutFlow/versions/CutBookkeeperContainer_v1.h"
13
14// EDM include(s):
16#include "AthLinks/ElementLink.h"
17
18// STL includes
19#include <stdexcept>
20#include <sstream>
21
22
23
24// STL include(s):
25#include <functional>
26
27namespace {
28
29 unsigned int UtilsHash( const std::string& name ) {
30 // The helper object:
31 static const std::hash< std::string > helper;
32 // Let the helper do the work:
33 return helper( name );
34 }
35
36} // private namespace
37
38namespace xAOD {
39
40 //typedef ElementLink< CutBookkeeperContainer_v1> CutBookkeeperLink_t;
42 using CutBookkeeperLinks_t = std::vector<xAOD::CutBookkeeperLink_t>;
43
44
45 // ======================================================================
46 // All the static accessors for the auxiliary store
47 // ======================================================================
48
54 static const SG::AuxElement::Accessor< int > isTopFilterAcc( "isTopFilter" );
63 static const SG::AuxElement::Accessor< double > sumOfEventWeightsAcc( "sumOfEventWeights" );
64 static const SG::AuxElement::Accessor< double > sumOfEventWeightsSquaredAcc( "sumOfEventWeightsSquared" );
65
66
67 // ======================================================================
68 // Constructors and Destructor
69 // ======================================================================
70
72 : SG::AuxElement()
73 // m_cycle(-1),
74 // m_parentIndex(-1),
75 // m_childrenIndices()
76 {
77 // Create a private store all the time for this object.
78 // This is OK since it only happens in initialize that we create new objects
79 // of this type or when merging files.
80 this->makePrivateStore();
81
82 // Set default data members
83 nameIdentifierAcc(*this) = 0;
84 uniqueIdentifierAcc(*this) = 0;
85 nameAcc(*this) = std::string("");
86 descriptionAcc(*this) = std::string("");
87 cutLogicAcc(*this) = 0;
88 isTopFilterAcc(*this) = false;
89 cycleAcc(*this) = -1;
90 inputStreamAcc(*this) = std::string("");
91 outputStreamsAcc(*this) = std::vector< std::string >();
96 nAcceptedEventsAcc(*this) = 0;
97 sumOfEventWeightsAcc(*this) = 0.0;
98 sumOfEventWeightsSquaredAcc(*this) = 0.0;
99 }
100
101
102
105
106
107
108 // ======================================================================
109 // Get and set the whole payload object (which contains all counters) in one go
110 // ======================================================================
111
114 payload.nAcceptedEvents = this->nAcceptedEvents();
115 payload.sumOfEventWeights = this->sumOfEventWeights();
117 return payload;
118 }
119
120
126
127
128
129 // ======================================================================
130 // Setters for the describing properties
131 // ======================================================================
132
133 unsigned int CutBookkeeper_v1::nameIdentifier() const {
134 return nameIdentifierAcc(*this);
135 }
136
139 return;
140 }
141
142
143
145 return uniqueIdentifierAcc(*this);
146 }
147
150 return;
151 }
152
153
154
155
156 const std::string& CutBookkeeper_v1::name() const {
157 return nameAcc(*this);
158 }
159
160
161 void CutBookkeeper_v1::setName(const std::string& name) {
162 nameAcc( *this ) = name;
163 this->setNameIdentifier( ::UtilsHash( name ) );
164 std::ostringstream str;
165 str << name << inputStream() << cycle();
166 this->setUniqueIdentifier( ::UtilsHash( str.str() ) );
167 return;
168 }
169
170
171
172 const std::string& CutBookkeeper_v1::description() const {
173 return descriptionAcc(*this);
174 }
175
176
178 descriptionAcc( *this ) = description;
179 return;
180 }
181
182
183
185 return static_cast<bool>(isTopFilterAcc(*this));
186 }
187
189 isTopFilterAcc( *this ) = static_cast<int>(val);
190 return;
191 }
192
193
194
198
200 cutLogicAcc( *this ) = static_cast<unsigned int>(val);
201 }
202
203
204
206 return cycleAcc(*this);
207 }
208
210 static const SG::AuxElement::Accessor< int > cycleAcc( "cycle" );
211 cycleAcc(*this) = cycle;
212 std::ostringstream str;
213 str << name() << inputStream() << cycle;
214 this->setUniqueIdentifier( ::UtilsHash( str.str() ) );
215 return;
216 }
217
218
219
220 const std::string& CutBookkeeper_v1::inputStream() const {
221 return inputStreamAcc(*this);
222 }
223
224
225 void CutBookkeeper_v1::setInputStream(const std::string& inputstream) {
226 inputStreamAcc(*this) = inputstream;
227 std::ostringstream str;
228 str << name() << inputstream << cycle();
229 this->setUniqueIdentifier( ::UtilsHash( str.str() ) );
230 return;
231 }
232
233
234
235 const std::vector<std::string>& CutBookkeeper_v1::outputStreams() const {
236 return outputStreamsAcc(*this);
237 }
238
239
240 bool CutBookkeeper_v1::hasOutputStream( const std::string& outputstream ) const {
241 for ( std::size_t i=0; i<outputStreamsAcc(*this).size(); ++i ) {
242 if ( outputstream == outputStreamsAcc(*this).at(i) ) {
243 return true;
244 }
245 }
246 return false;
247 }
248
249
250 void CutBookkeeper_v1::addOutputStream( const std::string& outputstream ) {
251 for ( std::size_t i=0; i<outputStreamsAcc(*this).size(); ++i ) {
252 if ( outputstream == outputStreamsAcc(*this).at(i) ) {
253 return;
254 }
255 }
256 outputStreamsAcc(*this).push_back(outputstream);
257 }
258
259
260 void CutBookkeeper_v1::addOutputStreamForAllUsed ATLAS_NOT_THREAD_SAFE (const std::string& outputstream ) {
261 // First, add the output stream name for this one
262 this->addOutputStream(outputstream);
263
264 // Get the container where this CutBookkeeper lives in.
265 // Throw an exception if we cannot find it
267 if ( !ebCont ) {
268 throw std::runtime_error( "ERROR: Could not find the container for this CutBookkeeper" );
269 }
270
271 // Then, find all other CutBookkeepers that were used by this one
272 // and also add the output stream name to those (recursively)
273 for ( std::size_t i=0; i<this->nUsedOthers(); ++i ) {
274 CutBookkeeper_v1* otherEBK = const_cast<CutBookkeeper_v1*>( this->usedOther(i) );
275 otherEBK->addOutputStreamForAllUsed(outputstream);
276 }
277 }
278
279
280 void CutBookkeeper_v1::setOutputStreams(const std::vector<std::string>& outputstreams) {
281 outputStreamsAcc(*this) = outputstreams;
282 return;
283 }
284
285
286
287 // ======================================================================
288 // The counters
289 // ======================================================================
290
294
296 nAcceptedEventsAcc( *this ) = val;
297 return;
298 }
299
300
301
306
307
308
310 return sumOfEventWeightsAcc(*this);
311 }
312
314 sumOfEventWeightsAcc( *this ) = val;
315 return;
316 }
317
318
319
324
325
326
330
332 sumOfEventWeightsSquaredAcc( *this ) = val;
333 return;
334 }
335
336
337
342
343
344
345 // ======================================================================
346 // Equality testing
347 // ======================================================================
349 //This function is mostly a placeholder in case we decide to complexify later.
350 return ( this->uniqueIdentifier() == eb->uniqueIdentifier() );
351 }
352
353
354
355 // ======================================================================
356 // Parent/children handling
357 // ======================================================================
358
360 return ( parentLinkAcc(*this).isValid() );
361 }
362
363
365 if ( parentLinkAcc(*this).isValid() ) {
366 return *(parentLinkAcc(*this));
367 }
368 return nullptr;
369 }
370
371
373 // Get the index of the provided CutBookkeeper in its container
374 std::size_t ebIdx = parentEB->index();
375 const xAOD::CutBookkeeperContainer_v1* ebCont =
376 dynamic_cast<const xAOD::CutBookkeeperContainer_v1*>(parentEB->container());
377 if ( !ebCont ) {
378 throw std::runtime_error( "ERROR: Could not find the container for the parent CutBookkeeper" );
379 }
380 parentLinkAcc(*this) = xAOD::CutBookkeeperLink_t( *ebCont, ebIdx );
381 return;
382 }
383
384
385
386
387 std::size_t CutBookkeeper_v1::nChildren() const {
388 return childrenLinksAcc(*this).size();
389 }
390
391
393 // Search for the child in the existing chidren
394 for ( std::size_t i=0; i<childrenLinksAcc(*this).size(); ++i ) {
395 const xAOD::CutBookkeeperLink_t& tmpLink = childrenLinksAcc(*this).at(i);
396 if ( !(tmpLink.isValid()) ) {
397 throw std::runtime_error( "ERROR: Got an invalid child CutBookkeeper" );
398 }
399 const xAOD::CutBookkeeper_v1* tmpBK = *tmpLink;
400 if ( tmpBK->isEqualTo(testCBK) ) {
401 return true;
402 }
403 }
404 return false;
405 }
406
407
408 const xAOD::CutBookkeeper_v1* CutBookkeeper_v1::child( std::size_t i ) const {
409 if ( i >= childrenLinksAcc(*this).size() ) {
410 throw std::runtime_error( "ERROR: Got an index out of the range of childred CutBookkeepers" );
411 }
412 const xAOD::CutBookkeeperLink_t& tmpLink = childrenLinksAcc(*this).at(i);
413 if ( !(tmpLink.isValid()) ) {
414 throw std::runtime_error( "ERROR: Got an invalid child CutBookkeeper" );
415 }
416 const xAOD::CutBookkeeper_v1* tmpBK = *tmpLink;
417 return tmpBK;
418 }
419
420
421 void
422 CutBookkeeper_v1::setChildren( const std::vector< CutBookkeeper_v1* >& childrenEB ) {
423 childrenLinksAcc(*this).clear();
424 return this->addChildren(childrenEB);
425 }
426
427
428 void
429 CutBookkeeper_v1::addChildren( const std::vector< CutBookkeeper_v1* >& childrenEB ) {
430 // Reserve the space for the children vector
431 childrenLinksAcc(*this).reserve( childrenLinksAcc(*this).size() + childrenEB.size() );
432
433 // Add all children
434 for ( std::size_t i=0; i<childrenEB.size(); ++i ) {
435 this->addChild( childrenEB.at(i) );
436 }
437 return;
438 }
439
440
441 void
443 // See if the provided CutBookkeeper is already a child.
444 // If so, just do nothing
445 if ( this->hasChild(childEB) ) {
446 return;
447 }
448
449 //synchronize contextual info with the parent
450 childEB->setInputStream( this->inputStream() );
451 childEB->setCycle( this->cycle() );
452 childEB->setOutputStreams( this->outputStreams() );
453 childEB->setParent( this );
454
455 // Create the needed ElementLink
456 std::size_t ebIdx = childEB->index();
457 const xAOD::CutBookkeeperContainer_v1* ebCont =
458 dynamic_cast<const xAOD::CutBookkeeperContainer_v1*>(childEB->container());
459 if ( !ebCont ) {
460 throw std::runtime_error( "ERROR: Could not find the container for the child CutBookkeeper" );
461 }
462
463 // Finally, add the provided CutBookkeeper as a child
464 childrenLinksAcc(*this).emplace_back(*ebCont, ebIdx );
465
466 return;
467 }
468
469
472 const std::string& description) {
473 // Get the container where this CutBookkeeper lives in.
474 // Throw an exception if we cannot find it
476 if ( !ebCont ) {
477 throw std::runtime_error( "ERROR: Could not find the container for this CutBookkeeper" );
478 }
479
480 // Create a new CutBookkeeper and add it to the same container as this one
482 ebCont->push_back(eb);
483
484 // Set the properties of the new CutBookkeeper
485 eb->setName(name);
487
488 addChild(eb);
489 return eb;
490 }
491
492
493
494
495
496 // ======================================================================
497 // Handling of the other CutBookkeepers used by this one
498 // ======================================================================
499
500 std::size_t CutBookkeeper_v1::nUsedOthers() const {
501 return othersLinksAcc(*this).size();
502 }
503
504
506 // Search for the usedOther in the existing usedOthers
507 for ( std::size_t i=0; i<othersLinksAcc(*this).size(); ++i ) {
508 const xAOD::CutBookkeeperLink_t& tmpLink = othersLinksAcc(*this).at(i);
509 if ( !(tmpLink.isValid()) ) {
510 throw std::runtime_error( "ERROR: Got an invalid usedOther CutBookkeeper" );
511 }
512 const xAOD::CutBookkeeper_v1* tmpBK = *tmpLink;
513 if ( tmpBK->isEqualTo(testCBK) ) {
514 return true;
515 }
516 }
517 return false;
518 }
519
520
522 if ( i >= othersLinksAcc(*this).size() ) {
523 throw std::runtime_error( "ERROR: Got an index out of the range of usedOthers CutBookkeepers" );
524 }
525 const xAOD::CutBookkeeperLink_t& tmpLink = othersLinksAcc(*this).at(i);
526 if ( !(tmpLink.isValid()) ) {
527 throw std::runtime_error( "ERROR: Got an invalid usedOther CutBookkeeper" );
528 }
529 const xAOD::CutBookkeeper_v1* tmpBK = *tmpLink;
530 return tmpBK;
531 }
532
533
534 void
535 CutBookkeeper_v1::setUsedOthers( const std::vector< CutBookkeeper_v1* >& usedOthers ) {
536 othersLinksAcc(*this).clear();
537 return this->addUsedOthers(usedOthers);
538 }
539
540
541 void
542 CutBookkeeper_v1::addUsedOthers( const std::vector< CutBookkeeper_v1* >& usedOthers ) {
543 // Reserve the space for the used-other vector
544 othersLinksAcc(*this).reserve( othersLinksAcc(*this).size() + usedOthers.size() );
545
546 // Add all used ones
547 for ( std::size_t i=0; i<usedOthers.size(); ++i ) {
548 this->addUsedOther( usedOthers.at(i) );
549 }
550 return;
551 }
552
553
554 void
556 if ( this->hasUsedOther(usedOtherEB) ) {
557 return;
558 }
559
560 // I don't think I need this as the others should have already been properly registered
561 // //synchronize contextual info with the used-other
562 // usedOtherEB->setInputStream( m_inputstream );
563 // usedOtherEB->setCycle( m_cycle );
564 // usedOtherEB->setOutputStream( m_outputstream );
565
566 // Create the needed ElementLink
567 std::size_t ebIdx = usedOtherEB->index();
568 const xAOD::CutBookkeeperContainer_v1* ebCont =
569 dynamic_cast<const xAOD::CutBookkeeperContainer_v1*>(usedOtherEB->container());
570 if ( !ebCont ) {
571 throw std::runtime_error( "ERROR: Could not find the container for the usedOthers CutBookkeeper" );
572 }
573
574 // Finally, add the provided CutBookkeeper as a usedOther
575 othersLinksAcc(*this).emplace_back(*ebCont, ebIdx );
576
577 return;
578 }
579
580
581
582
583 // ======================================================================
584 // Handling of the sibling CutBookkeepers
585 // ======================================================================
586
587 std::size_t CutBookkeeper_v1::nSiblings() const {
588 return siblingsLinksAcc(*this).size();
589 }
590
591
593 // Search for the sibling in the existing sibings
594 for ( std::size_t i=0; i<siblingsLinksAcc(*this).size(); ++i ) {
595 const xAOD::CutBookkeeperLink_t& tmpLink = siblingsLinksAcc(*this).at(i);
596 if ( !(tmpLink.isValid()) ) {
597 throw std::runtime_error( "ERROR: Got an invalid sibling CutBookkeeper" );
598 }
599 const xAOD::CutBookkeeper_v1* tmpBK = *tmpLink;
600 if ( tmpBK->isEqualTo(testCBK) ) {
601 return true;
602 }
603 }
604 return false;
605 }
606
607
608 const xAOD::CutBookkeeper_v1* CutBookkeeper_v1::sibling( std::size_t i ) const {
609 if ( i >= siblingsLinksAcc(*this).size() ) {
610 throw std::runtime_error( "ERROR: Got an index out of the range of sibling CutBookkeepers" );
611 }
612 const xAOD::CutBookkeeperLink_t& tmpLink = siblingsLinksAcc(*this).at(i);
613 if ( !(tmpLink.isValid()) ) {
614 throw std::runtime_error( "ERROR: Got an invalid sibling CutBookkeeper" );
615 }
616 const xAOD::CutBookkeeper_v1* tmpBK = *tmpLink;
617 return tmpBK;
618 }
619
620
621 void
622 CutBookkeeper_v1::setSiblings( const std::vector< CutBookkeeper_v1* >& siblings ) {
623 siblingsLinksAcc(*this).clear();
624 return this->addSiblings(siblings);
625 }
626
627
628 void
629 CutBookkeeper_v1::addSiblings( const std::vector< CutBookkeeper_v1* >& siblings ) {
630 // Reserve the space for the siblings vector
631 siblingsLinksAcc(*this).reserve( siblingsLinksAcc(*this).size() + siblings.size() );
632
633 // Add all siblings
634 for ( std::size_t i=0; i<siblings.size(); ++i ) {
635 this->addSibling( siblings.at(i) );
636 }
637 return;
638 }
639
640
641 void
643 if ( this->hasSibling(siblingEB) ) {
644 return;
645 }
646
647 // Create the needed ElementLink
648 std::size_t ebIdx = siblingEB->index();
649 const xAOD::CutBookkeeperContainer_v1* ebCont =
650 dynamic_cast<const xAOD::CutBookkeeperContainer_v1*>(siblingEB->container());
651 if ( !ebCont ) {
652 throw std::runtime_error( "ERROR: Could not find the container for the sibling CutBookkeeper" );
653 }
654
655 // Finally, add the provided CutBookkeeper as a sibling
656 siblingsLinksAcc(*this).emplace_back(*ebCont, ebIdx );
657
658 //synchronize contextual info with the sibling
659 siblingEB->addSibling( this );
660
661 return;
662 }
663
664
665
666 // ======================================================================
667 // Function preparing the object to be persistified
668 // ======================================================================
669
671 if( parentLinkAcc.isAvailableWritable(*this) ) {
672 parentLinkAcc(*this).toPersistent();
673 }
674 if( childrenLinksAcc.isAvailableWritable(*this) ) {
675 xAOD::CutBookkeeperLinks_t::iterator itr = childrenLinksAcc(*this).begin();
676 xAOD::CutBookkeeperLinks_t::iterator itrEnd = childrenLinksAcc(*this).end();
677 for( ; itr != itrEnd; ++itr ) {
678 itr->toPersistent();
679 }
680 }
681 if( othersLinksAcc.isAvailableWritable(*this) ) {
682 xAOD::CutBookkeeperLinks_t::iterator itr = othersLinksAcc(*this).begin();
683 xAOD::CutBookkeeperLinks_t::iterator itrEnd = othersLinksAcc(*this).end();
684 for( ; itr != itrEnd; ++itr ) {
685 itr->toPersistent();
686 }
687 }
688 if( siblingsLinksAcc.isAvailableWritable(*this) ) {
689 xAOD::CutBookkeeperLinks_t::iterator itr = siblingsLinksAcc(*this).begin();
690 xAOD::CutBookkeeperLinks_t::iterator itrEnd = siblingsLinksAcc(*this).end();
691 for( ; itr != itrEnd; ++itr ) {
692 itr->toPersistent();
693 }
694 }
695 return;
696 }
697
698
699
700} // namespace xAOD
value_type emplace_back(value_type pElem)
Add an element to the end of the collection.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
void makePrivateStore()
Create a new (empty) private store for this object.
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572
const SG::AuxVectorData * container() const
Return the container holding this element.
AuxElement()
Default constructor.
size_t index() const
Return the index of this element within its container.
Container that holds the Container of all CutBookkeepers.
Description of the class that is used to keep track of event counts.
void addSumOfEventWeights(double nWeightedEvents)
Add more sum-of-event-weights that this CutBookkeeper has seen.
double sumOfEventWeightsSquared() const
Get the sum-of-(event-weights-squared) that this CutBookkeeper has seen.
bool hasChild(const xAOD::CutBookkeeper_v1 *testCBK) const
Test if a given child already exists.
std::size_t nSiblings() const
Check if this CutBookkeeper has siblings.
void setUniqueIdentifier(unsigned int hash)
Set the uniqueIdentifier for this CutBookkeeper.
void addSibling(CutBookkeeper_v1 *siblingsEB)
Add one sibling CutBookkeeper to this one.
void setPayload(const Payload &payload)
Set the whole payload object (which contains all counters) in one go.
const xAOD::CutBookkeeper_v1 * usedOther(std::size_t i) const
Get the usedOther at position i.
bool isEqualTo(const CutBookkeeper_v1 *eb) const
Test for the equality of this CutBookkeeper with another one.
bool isTopFilter() const
Check if this CutBookkeeper was a top filter.
void setName(const std::string &name)
Set the name of this CutBookkeeper.
std::size_t nChildren() const
Get the number of children CutBookkeepers of this CutBookkeeper.
void addChild(CutBookkeeper_v1 *childEB)
Add one child to this CutBookkeeper.
unsigned int uniqueIdentifier() const
Get the uniqueIdentifier for this CutBookkeeper.
const xAOD::CutBookkeeper_v1 * parent() const
Get the parent CutBookkeeper.
void addChildren(const std::vector< CutBookkeeper_v1 * > &childrenEB)
Add multiple children in one go to this CutBookkeeper.
int cycle() const
Get the skimming cycle that this CutBookkeeper was running in.
void setUsedOthers(const std::vector< CutBookkeeper_v1 * > &usedOthers)
Set all CutBookkeeper that are used by this one in one go.
void addSumOfEventWeightsSquared(double nWeightedEventsSquared)
Add more sum-of-(event-weights-squared) that this CutBookkeeper has seen.
const xAOD::CutBookkeeper_v1 * child(std::size_t i) const
Get the child at position i.
void addNAcceptedEvents(uint64_t nEvents)
Add seen events to the number of accepted events that this CutBookkeeper has seen.
void setParent(const CutBookkeeper_v1 *parentEB)
Set the parent CutBookkeeper of this CutBookkeeper.
unsigned int nameIdentifier() const
Get the nameIdentifier for this CutBookkeeper.
void addUsedOthers(const std::vector< CutBookkeeper_v1 * > &usedOthers)
Add multiple children in one go to this CutBookkeeper.
CutBookkeeper_v1 * addNewChild(const std::string &name, const std::string &description)
Create a new CutBookkeeper (using the given name and description) and add this new CutBookkeeper to t...
Payload payload() const
Get the whole payload object (which contains all counters) in one go.
const std::string & description() const
Get the description of this CutBookkeeper.
void setNAcceptedEvents(uint64_t nEvents)
Set the number of accepted events for this CutBookkeeper.
void setSumOfEventWeightsSquared(double nWeightedEventsSquared)
Set the sum-of-(event-weights-squared) that this CutBookkeeper has seen.
const std::string & inputStream() const
Get the name of the input-file stream object that was seen by this CutBookkeeper.
void setSumOfEventWeights(double nWeightedEvents)
Set the sum-of-event-weights that this CutBookkeeper has seen.
CutLogic
Enumeration of the logic of a cut.
double sumOfEventWeights() const
Get the sum-of-event-weights that this CutBookkeeper has seen.
void addUsedOther(CutBookkeeper_v1 *usedOtherEB)
Add one other CutBookkeeper that is used by this one.
void addSiblings(const std::vector< CutBookkeeper_v1 * > &siblings)
Add multiple siblings in one go to this CutBookkeeper.
const std::string & name() const
Get the name of this CutBookkeeper.
void addOutputStream(const std::string &outputstream)
Add the name of an output-file stream object for this CutBookkeeper.
const xAOD::CutBookkeeper_v1 * sibling(std::size_t i) const
Get the sibling number i.
bool hasSibling(const xAOD::CutBookkeeper_v1 *testCBK) const
Test if the provided CutBookkeeper is already a sibling.
void setDescription(const std::string &description)
Set the description of this CutBookkeeper.
uint64_t nAcceptedEvents() const
Get the number of accepted events that this CutBookkeeper has seen.
void toPersistent()
Function preparing the object to be persistified.
bool hasOutputStream(const std::string &outputstream) const
Check if the given output stream name is known to this CutBookkeeper.
void setOutputStreams(const std::vector< std::string > &outputstreams)
Set the names of the output-file stream objects for this CutBookkeeper.
bool hasUsedOther(const xAOD::CutBookkeeper_v1 *testCBK) const
Check if this CutBookkeeper has used others.
void setChildren(const std::vector< CutBookkeeper_v1 * > &childrenEB)
Set all children of this CutBookkeeper in one go.
void setCutLogic(CutLogic logic)
Set the cut logic of this CutBookkeeper, e.g., ACCEPT, REQUIRE, VETO.
CutLogic cutLogic() const
Get the cut logic of this CutBookkeeper, e.g., ACCEPT, REQUIRE, VETO.
void setInputStream(const std::string &inputstream)
Set the name of the current input-file stream object for this CutBookkeeper.
void setTopFilter(bool isTopFilter)
Set the top-filter property of this CutBookkeeper.
const std::vector< std::string > & outputStreams() const
Get the names of the output-file stream objects that were seen by this CutBookkeeper.
void setSiblings(const std::vector< CutBookkeeper_v1 * > &siblings)
Set all CutBookkeeper that are siblings to this one in one go.
std::size_t nUsedOthers() const
Check if this CutBookkeeper has used others.
bool hasParent() const
Check if there is a parent CutBookkeeper of this CutBookkeeper.
void setCycle(int cycle)
Set the skimming cycle that this CutBookkeeper is running in.
void setNameIdentifier(unsigned int hash)
Set the nameIdentifier for this CutBookkeeper.
const int nEvents
Forward declaration.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
ElementLink< CutBookkeeperContainer > CutBookkeeperLink_t
static const SG::AuxElement::Accessor< std::string > nameAcc("name")
static const SG::AuxElement::Accessor< int > cycleAcc("cycle")
std::vector< xAOD::CutBookkeeperLink_t > CutBookkeeperLinks_t
static const SG::AuxElement::Accessor< unsigned int > uniqueIdentifierAcc("uniqueIdentifier")
static const SG::AuxElement::Accessor< std::string > descriptionAcc("description")
static const SG::AuxElement::Accessor< double > sumOfEventWeightsAcc("sumOfEventWeights")
static const SG::AuxElement::Accessor< xAOD::CutBookkeeperLinks_t > siblingsLinksAcc("siblingsLinks")
static const SG::AuxElement::Accessor< uint64_t > nAcceptedEventsAcc("nAcceptedEvents")
static const SG::AuxElement::Accessor< std::string > inputStreamAcc("inputStream")
static const SG::AuxElement::Accessor< std::vector< std::string > > outputStreamsAcc("outputStreams")
static const SG::AuxElement::Accessor< unsigned int > nameIdentifierAcc("nameIdentifier")
static const SG::AuxElement::Accessor< xAOD::CutBookkeeperLinks_t > othersLinksAcc("othersLinks")
static const SG::AuxElement::Accessor< xAOD::CutBookkeeperLink_t > parentLinkAcc("parentLink")
static const SG::AuxElement::Accessor< xAOD::CutBookkeeperLinks_t > childrenLinksAcc("childrenLinks")
void ClearTransientTrees ATLAS_NOT_THREAD_SAFE()
Function cleaning up the managed memory.
static const SG::AuxElement::Accessor< unsigned int > cutLogicAcc("cutLogic")
static const SG::AuxElement::Accessor< double > sumOfEventWeightsSquaredAcc("sumOfEventWeightsSquared")
static const SG::AuxElement::Accessor< int > isTopFilterAcc("isTopFilter")
Add struct for payload and implement operator ,/....=,...