ATLAS Offline Software
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 
27 namespace {
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 
38 namespace 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 
49  static const SG::AuxElement::Accessor< unsigned int > nameIdentifierAcc( "nameIdentifier" );
50  static const SG::AuxElement::Accessor< unsigned int > uniqueIdentifierAcc( "uniqueIdentifier" );
51  static const SG::AuxElement::Accessor< std::string > nameAcc( "name" );
52  static const SG::AuxElement::Accessor< std::string > descriptionAcc( "description" );
53  static const SG::AuxElement::Accessor< unsigned int > cutLogicAcc( "cutLogic" );
54  static const SG::AuxElement::Accessor< int > isTopFilterAcc( "isTopFilter" );
55  static const SG::AuxElement::Accessor< int > cycleAcc( "cycle" );
56  static const SG::AuxElement::Accessor< std::string > inputStreamAcc( "inputStream" );
57  static const SG::AuxElement::Accessor< std::vector< std::string > > outputStreamsAcc( "outputStreams" );
58  static const SG::AuxElement::Accessor< xAOD::CutBookkeeperLink_t > parentLinkAcc( "parentLink" );
59  static const SG::AuxElement::Accessor< xAOD::CutBookkeeperLinks_t > childrenLinksAcc( "childrenLinks" );
60  static const SG::AuxElement::Accessor< xAOD::CutBookkeeperLinks_t > othersLinksAcc( "othersLinks" );
61  static const SG::AuxElement::Accessor< xAOD::CutBookkeeperLinks_t > siblingsLinksAcc( "siblingsLinks" );
62  static const SG::AuxElement::Accessor< uint64_t > nAcceptedEventsAcc( "nAcceptedEvents" );
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 >();
92  parentLinkAcc(*this) = xAOD::CutBookkeeperLink_t();
93  childrenLinksAcc(*this) = xAOD::CutBookkeeperLinks_t();
94  othersLinksAcc(*this) = xAOD::CutBookkeeperLinks_t();
95  siblingsLinksAcc(*this) = xAOD::CutBookkeeperLinks_t();
96  nAcceptedEventsAcc(*this) = 0;
97  sumOfEventWeightsAcc(*this) = 0.0;
98  sumOfEventWeightsSquaredAcc(*this) = 0.0;
99  }
100 
101 
102 
104  }
105 
106 
107 
108  // ======================================================================
109  // Get and set the whole payload object (which contains all counters) in one go
110  // ======================================================================
111 
115  payload.sumOfEventWeights = this->sumOfEventWeights();
117  return payload;
118  }
119 
120 
122  this->setNAcceptedEvents( payload.nAcceptedEvents );
123  this->setSumOfEventWeights( payload.sumOfEventWeights );
125  }
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 
137  void CutBookkeeper_v1::setNameIdentifier( unsigned int nameIdentifier ) {
138  nameIdentifierAcc( *this ) = nameIdentifier;
139  return;
140  }
141 
142 
143 
144  unsigned int CutBookkeeper_v1::uniqueIdentifier() const {
145  return uniqueIdentifierAcc(*this);
146  }
147 
149  uniqueIdentifierAcc( *this ) = uniqueIdentifier;
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 
196  return static_cast<CutBookkeeper_v1::CutLogic>(cutLogicAcc(*this));
197  }
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
266  CutBookkeeperContainer_v1* ebCont = dynamic_cast<xAOD::CutBookkeeperContainer_v1*>(this->container());
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 
292  return nAcceptedEventsAcc(*this);
293  }
294 
296  nAcceptedEventsAcc( *this ) = val;
297  return;
298  }
299 
300 
301 
303  nAcceptedEventsAcc(*this) += nEvents;
304  return;
305  }
306 
307 
308 
310  return sumOfEventWeightsAcc(*this);
311  }
312 
314  sumOfEventWeightsAcc( *this ) = val;
315  return;
316  }
317 
318 
319 
320  void CutBookkeeper_v1::addSumOfEventWeights(double sumOfEventWeights) {
321  sumOfEventWeightsAcc(*this) += sumOfEventWeights;
322  return;
323  }
324 
325 
326 
328  return sumOfEventWeightsSquaredAcc(*this);
329  }
330 
332  sumOfEventWeightsSquaredAcc( *this ) = val;
333  return;
334  }
335 
336 
337 
338  void CutBookkeeper_v1::addSumOfEventWeightsSquared(double sumOfEventWeightsSquared) {
339  sumOfEventWeightsSquaredAcc(*this) += sumOfEventWeightsSquared;
340  return;
341  }
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 
392  bool CutBookkeeper_v1::hasChild( const xAOD::CutBookkeeper_v1* testCBK ) const {
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 
471  CutBookkeeper_v1::addNewChild( const std::string& name,
472  const std::string& description) {
473  // Get the container where this CutBookkeeper lives in.
474  // Throw an exception if we cannot find it
475  CutBookkeeperContainer_v1* ebCont = dynamic_cast<xAOD::CutBookkeeperContainer_v1*>(this->container());
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
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
xAOD::CutBookkeeper_v1::addSiblings
void addSiblings(const std::vector< CutBookkeeper_v1 * > &siblings)
Add multiple siblings in one go to this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:629
xAOD::name
name
Definition: TriggerMenuJson_v1.cxx:29
xAOD::CutBookkeeper_v1::cycle
int cycle() const
Get the skimming cycle that this CutBookkeeper was running in.
Definition: CutBookkeeper_v1.cxx:205
xAOD::CutBookkeeperLinks_t
std::vector< xAOD::CutBookkeeperLink_t > CutBookkeeperLinks_t
Definition: CutBookkeeper_v1.cxx:42
xAOD::CutBookkeeper_v1::setCycle
void setCycle(int cycle)
Set the skimming cycle that this CutBookkeeper is running in.
Definition: CutBookkeeper_v1.cxx:209
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
xAOD::CutBookkeeper_v1::setName
void setName(const std::string &name)
Set the name of this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:161
xAOD::CutBookkeeper_v1::setDescription
void setDescription(const std::string &description)
Set the description of this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:177
xAOD::CutBookkeeper_v1::CutBookkeeper_v1
CutBookkeeper_v1()
Constructor.
Definition: CutBookkeeper_v1.cxx:71
xAOD::CutBookkeeper_v1::sibling
const xAOD::CutBookkeeper_v1 * sibling(std::size_t i) const
Get the sibling number i.
Definition: CutBookkeeper_v1.cxx:608
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
AuxStoreAccessorMacros.h
xAOD::CutBookkeeper_v1::addSibling
void addSibling(CutBookkeeper_v1 *siblingsEB)
Add one sibling CutBookkeeper to this one.
Definition: CutBookkeeper_v1.cxx:642
xAOD::CutBookkeeper_v1
Description of the class that is used to keep track of event counts.
Definition: CutBookkeeper_v1.h:29
xAOD::CutBookkeeper_v1::setOutputStreams
void setOutputStreams(const std::vector< std::string > &outputstreams)
Set the names of the output-file stream objects for this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:280
cycle
double cycle(double a, double b)
Definition: SiHitCollectionCnv_p2.cxx:38
xAOD::CutBookkeeper_v1::nUsedOthers
std::size_t nUsedOthers() const
Check if this CutBookkeeper has used others.
Definition: CutBookkeeper_v1.cxx:500
xAOD::CutBookkeeper_v1::setUsedOthers
void setUsedOthers(const std::vector< CutBookkeeper_v1 * > &usedOthers)
Set all CutBookkeeper that are used by this one in one go.
Definition: CutBookkeeper_v1.cxx:535
xAOD::CutBookkeeper_v1::addChild
void addChild(CutBookkeeper_v1 *childEB)
Add one child to this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:442
xAOD::CutBookkeeper_v1::sumOfEventWeightsSquared
double sumOfEventWeightsSquared() const
Get the sum-of-(event-weights-squared) that this CutBookkeeper has seen.
Definition: CutBookkeeper_v1.cxx:327
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::CutBookkeeper_v1::outputStreams
const std::vector< std::string > & outputStreams() const
Get the names of the output-file stream objects that were seen by this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:235
xAOD::CutBookkeeper_v1::CutLogic
CutLogic
Enumeration of the logic of a cut.
Definition: CutBookkeeper_v1.h:34
xAOD::CutBookkeeper_v1::addUsedOther
void addUsedOther(CutBookkeeper_v1 *usedOtherEB)
Add one other CutBookkeeper that is used by this one.
Definition: CutBookkeeper_v1.cxx:555
xAOD::CutBookkeeper_v1::payload
Payload payload() const
Get the whole payload object (which contains all counters) in one go.
Definition: CutBookkeeper_v1.cxx:112
xAOD::CutBookkeeper_v1::nSiblings
std::size_t nSiblings() const
Check if this CutBookkeeper has siblings.
Definition: CutBookkeeper_v1.cxx:587
xAOD::CutBookkeeper_v1::toPersistent
void toPersistent()
Function preparing the object to be persistified.
Definition: CutBookkeeper_v1.cxx:670
xAOD::CutBookkeeperLink_t
ElementLink< CutBookkeeperContainer > CutBookkeeperLink_t
Definition: CutBookkeeper_v1.cxx:41
xAOD::CutBookkeeper_v1::Payload::sumOfEventWeightsSquared
double sumOfEventWeightsSquared
Definition: CutBookkeeper_v1.h:66
xAOD::CutBookkeeper_v1::hasParent
bool hasParent() const
Check if there is a parent CutBookkeeper of this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:359
xAOD::CutBookkeeper_v1::setUniqueIdentifier
void setUniqueIdentifier(unsigned int hash)
Set the uniqueIdentifier for this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:148
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
xAOD::CutBookkeeper_v1::setNAcceptedEvents
void setNAcceptedEvents(uint64_t nEvents)
Set the number of accepted events for this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:295
xAOD::ATLAS_NOT_THREAD_SAFE
void ErrorHandler ATLAS_NOT_THREAD_SAFE(Int_t level, Bool_t abort, const char *location, const char *message)
Function filtering the warnings coming from ROOT.
Definition: Init.cxx:105
xAOD::CutBookkeeper_v1::addChildren
void addChildren(const std::vector< CutBookkeeper_v1 * > &childrenEB)
Add multiple children in one go to this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:429
xAOD::CutBookkeeper_v1::addNAcceptedEvents
void addNAcceptedEvents(uint64_t nEvents)
Add seen events to the number of accepted events that this CutBookkeeper has seen.
Definition: CutBookkeeper_v1.cxx:302
xAOD::CutBookkeeper_v1::addUsedOthers
void addUsedOthers(const std::vector< CutBookkeeper_v1 * > &usedOthers)
Add multiple children in one go to this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:542
lumiFormat.i
int i
Definition: lumiFormat.py:85
xAOD::CutBookkeeper_v1::uniqueIdentifier
unsigned int uniqueIdentifier() const
Get the uniqueIdentifier for this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:144
xAOD::CutBookkeeper_v1::hasChild
bool hasChild(const xAOD::CutBookkeeper_v1 *testCBK) const
Test if a given child already exists.
Definition: CutBookkeeper_v1.cxx:392
xAOD::CutBookkeeper_v1::setSumOfEventWeights
void setSumOfEventWeights(double nWeightedEvents)
Set the sum-of-event-weights that this CutBookkeeper has seen.
Definition: CutBookkeeper_v1.cxx:313
CutBookkeeperContainer.h
xAOD::CutBookkeeper_v1::description
const std::string & description() const
Get the description of this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:172
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
xAOD::CutBookkeeper_v1::setParent
void setParent(const CutBookkeeper_v1 *parentEB)
Set the parent CutBookkeeper of this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:372
nEvents
int nEvents
Definition: fbtTestBasics.cxx:79
xAOD::CutBookkeeperContainer_v1
Container that holds the Container of all CutBookkeepers.
Definition: CutBookkeeperContainer_v1.h:27
xAOD::CutBookkeeper_v1::setChildren
void setChildren(const std::vector< CutBookkeeper_v1 * > &childrenEB)
Set all children of this CutBookkeeper in one go.
Definition: CutBookkeeper_v1.cxx:422
xAOD::CutBookkeeper_v1::hasUsedOther
bool hasUsedOther(const xAOD::CutBookkeeper_v1 *testCBK) const
Check if this CutBookkeeper has used others.
Definition: CutBookkeeper_v1.cxx:505
xAOD::CutBookkeeper_v1::setSumOfEventWeightsSquared
void setSumOfEventWeightsSquared(double nWeightedEventsSquared)
Set the sum-of-(event-weights-squared) that this CutBookkeeper has seen.
Definition: CutBookkeeper_v1.cxx:331
xAOD::CutBookkeeper_v1::isEqualTo
bool isEqualTo(const CutBookkeeper_v1 *eb) const
Test for the equality of this CutBookkeeper with another one.
Definition: CutBookkeeper_v1.cxx:348
SG::AuxElement::index
size_t index() const
Return the index of this element within its container.
xAOD::str
std::string str(const TrigT2MbtsBits_v1 &trigT2MbtsBits)
Definition: TrigT2MbtsBits_v1.cxx:37
xAOD::CutBookkeeper_v1::hasSibling
bool hasSibling(const xAOD::CutBookkeeper_v1 *testCBK) const
Test if the provided CutBookkeeper is already a sibling.
Definition: CutBookkeeper_v1.cxx:592
python.trfUtils.uniqueIdentifier
def uniqueIdentifier()
return a URL-safe, base 64-encoded pseudorandom UUID
Definition: trfUtils.py:678
xAOD::CutBookkeeper_v1::setInputStream
void setInputStream(const std::string &inputstream)
Set the name of the current input-file stream object for this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:225
xAOD::CutBookkeeper_v1::nAcceptedEvents
uint64_t nAcceptedEvents() const
Get the number of accepted events that this CutBookkeeper has seen.
Definition: CutBookkeeper_v1.cxx:291
xAOD::CutBookkeeper_v1::child
const xAOD::CutBookkeeper_v1 * child(std::size_t i) const
Get the child at position i.
Definition: CutBookkeeper_v1.cxx:408
xAOD::CutBookkeeper_v1::Payload::sumOfEventWeights
double sumOfEventWeights
Definition: CutBookkeeper_v1.h:65
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
xAOD::CutBookkeeper_v1::addSumOfEventWeights
void addSumOfEventWeights(double nWeightedEvents)
Add more sum-of-event-weights that this CutBookkeeper has seen.
Definition: CutBookkeeper_v1.cxx:320
xAOD::CutBookkeeper_v1::setNameIdentifier
void setNameIdentifier(unsigned int hash)
Set the nameIdentifier for this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:137
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
xAOD::CutBookkeeper_v1::isTopFilter
bool isTopFilter() const
Check if this CutBookkeeper was a top filter.
Definition: CutBookkeeper_v1.cxx:184
SG::AuxElement::makePrivateStore
void makePrivateStore()
Create a new (empty) private store for this object.
Definition: AuxElement.cxx:172
xAOD::CutBookkeeper_v1::sumOfEventWeights
double sumOfEventWeights() const
Get the sum-of-event-weights that this CutBookkeeper has seen.
Definition: CutBookkeeper_v1.cxx:309
xAOD::CutBookkeeper_v1::setCutLogic
void setCutLogic(CutLogic logic)
Set the cut logic of this CutBookkeeper, e.g., ACCEPT, REQUIRE, VETO.
Definition: CutBookkeeper_v1.cxx:199
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
xAOD::CutBookkeeper_v1::name
const std::string & name() const
Get the name of this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:156
xAOD::CutBookkeeper_v1::usedOther
const xAOD::CutBookkeeper_v1 * usedOther(std::size_t i) const
Get the usedOther at position i.
Definition: CutBookkeeper_v1.cxx:521
xAOD::CutBookkeeper_v1::nameIdentifier
unsigned int nameIdentifier() const
Get the nameIdentifier for this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:133
xAOD::CutBookkeeper_v1::cutLogic
CutLogic cutLogic() const
Get the cut logic of this CutBookkeeper, e.g., ACCEPT, REQUIRE, VETO.
Definition: CutBookkeeper_v1.cxx:195
xAOD::CutBookkeeper_v1::inputStream
const std::string & inputStream() const
Get the name of the input-file stream object that was seen by this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:220
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
xAOD::CutBookkeeper_v1::~CutBookkeeper_v1
~CutBookkeeper_v1()
Destructor.
Definition: CutBookkeeper_v1.cxx:103
xAOD::CutBookkeeper_v1::Payload::nAcceptedEvents
uint64_t nAcceptedEvents
Definition: CutBookkeeper_v1.h:64
xAOD::CutBookkeeper_v1::setPayload
void setPayload(const Payload &payload)
Set the whole payload object (which contains all counters) in one go.
Definition: CutBookkeeper_v1.cxx:121
xAOD::CutBookkeeper_v1::nChildren
std::size_t nChildren() const
Get the number of children CutBookkeepers of this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:387
xAOD::CutBookkeeper_v1::addSumOfEventWeightsSquared
void addSumOfEventWeightsSquared(double nWeightedEventsSquared)
Add more sum-of-(event-weights-squared) that this CutBookkeeper has seen.
Definition: CutBookkeeper_v1.cxx:338
xAOD::CutBookkeeper_v1::addOutputStream
void addOutputStream(const std::string &outputstream)
Add the name of an output-file stream object for this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:250
xAOD::CutBookkeeper_v1::Payload
Add struct for payload and implement operator *,/....*=,...
Definition: CutBookkeeper_v1.h:46
str
Definition: BTagTrackIpAccessor.cxx:11
SG::AuxElement::container
const SG::AuxVectorData * container() const
Return the container holding this element.
xAOD::CutBookkeeper_v1::setTopFilter
void setTopFilter(bool isTopFilter)
Set the top-filter property of this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:188
xAOD::CutBookkeeper_v1::setSiblings
void setSiblings(const std::vector< CutBookkeeper_v1 * > &siblings)
Set all CutBookkeeper that are siblings to this one in one go.
Definition: CutBookkeeper_v1.cxx:622
xAOD::CutBookkeeper_v1::hasOutputStream
bool hasOutputStream(const std::string &outputstream) const
Check if the given output stream name is known to this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:240
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88
xAOD::CutBookkeeper_v1::parent
const xAOD::CutBookkeeper_v1 * parent() const
Get the parent CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:364
xAOD::CutBookkeeper_v1::addNewChild
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...
Definition: CutBookkeeper_v1.cxx:471