ATLAS Offline Software
EventBookkeeper.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // Header file for class EventBookkeeper
7 // Author: David Cote, September 2008. <david.cote@cern.ch>
9 #ifndef EVENTBOOKKEEPER_H
10 #define EVENTBOOKKEEPER_H
11 
12 #include "AthenaKernel/CLASS_DEF.h"
13 #include <string>
14 #include <iosfwd>
15 #include <stdint.h>
16 #include <vector>
17 
18 #include "GaudiKernel/MsgStream.h"
19 
20 //fwd declare
22 
24 {
25  public:
26  //Constructors
28  EventBookkeeper(const std::string &name);
29  EventBookkeeper(const std::string &name,
30  const std::string &description,
31  const std::string &logic);
32  // Copy constructors:
33  EventBookkeeper( const EventBookkeeper& rhs );
35 
36  // Destructor
38 
39  void Print(const std::string &indent="", std::ostream& out = std::cout);
40  void PrintToMsg(MsgStream &, const std::string &indent="");
41  void PrintFamily(const std::string &indent="");
42 
43  // get() and set() methods
44  const std::string& getName() const { return m_name; }
45  void setName( const std::string& name );
46 
47  const std::string& getInputStream() const { return m_inputstream; }
48  void setInputStream( const std::string& inputstream );
49 
50  const std::string& getOutputStream() const { return m_outputstream; }
51  void setOutputStream( const std::string& outputstream );
52  void setOutputStreamOfFamily( const std::string &outputstream );
53 
54  const std::string& getDescription() const { return m_description; }
55  void setDescription( const std::string &description );
56 
57  const std::string& getLogic() const { return m_logic; }
58  void setLogic( const std::string& logic );
59 
63 
65  void setNWeightedAcceptedEvents( double nWeightedEvents );
66  void addNWeightedAcceptedEvents( double nWeightedEvents );
67 
69 
70  int getCycle() const { return m_cycle; }
71  void setCycle( int cycle );
72 
73  const std::vector<EventBookkeeper*>* getChildrenEventBookkeepers() const { return m_childrenEB; }
75  void setChildrenEventBookkeepers(std::vector<EventBookkeeper*>* childrenEB );
76  void AddChild(EventBookkeeper* eb);
77  void AddChildren( std::vector<EventBookkeeper*>* children );
78  EventBookkeeper* AddNewChild(const std::string& name,
79  const std::string& description);
80 
81  bool isEqualTo( const EventBookkeeper *eb );
82 
83  private:
85 
86  std::string m_name;
87  std::string m_description;
88  std::string m_inputstream;
89  std::string m_outputstream;
90  std::string m_logic;
93  int m_cycle;
94  std::vector<EventBookkeeper*>* m_childrenEB;
95 
96  //Additional functions and data for EventBookkeeperCollection with flat structure
97  //This special mode is only foreseen for dumping in a TTree, please don't use it otherwise
98  //In this case, the m_childrenEB are not usable, being replaced m_childrenIndices
99  friend class CutFlowSvc;
103  std::vector<unsigned int>* m_childrenIndices;
104 
105  //Helper data members for CutFlowSvc (transient-only)
108 };
109 
110 
111 //this is automatically generated by: 'clid -m EventBookkeeper'
112 CLASS_DEF( EventBookkeeper , 241669778 , 1 )
113 
114 #endif //> EVENTBOOKKEEPER_H
nEvents
const int nEvents
Definition: fbtTestBasics.cxx:77
EventBookkeeper::getLogic
const std::string & getLogic() const
Definition: EventBookkeeper.h:57
EventBookkeeper::PrintFamily
void PrintFamily(const std::string &indent="")
Definition: EventBookkeeper.cxx:306
EventBookkeeper::m_nWeightedAcceptedEvents
double m_nWeightedAcceptedEvents
Definition: EventBookkeeper.h:92
EventBookkeeper::m_declaredChildFilter
bool m_declaredChildFilter
Definition: EventBookkeeper.h:106
EventBookkeeper::addNWeightedAcceptedEvents
void addNWeightedAcceptedEvents(double nWeightedEvents)
Definition: EventBookkeeper.cxx:217
EventBookkeeper::setLogic
void setLogic(const std::string &logic)
Definition: EventBookkeeper.cxx:193
EventBookkeeper::m_cycle
int m_cycle
Definition: EventBookkeeper.h:93
EventBookkeeper::setNAcceptedEvents
void setNAcceptedEvents(uint64_t nEvents)
Definition: EventBookkeeper.cxx:199
cycle
double cycle(double a, double b)
Definition: SiHitCollectionCnv_p2.cxx:38
EventBookkeeper::getInputStream
const std::string & getInputStream() const
Definition: EventBookkeeper.h:47
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
EventBookkeeperCollection
Definition: EventBookkeeperCollection.h:21
EventBookkeeper::setCycle
void setCycle(int cycle)
Definition: EventBookkeeper.cxx:236
EventBookkeeper::m_outputstream
std::string m_outputstream
Definition: EventBookkeeper.h:89
EventBookkeeper::AddNewChild
EventBookkeeper * AddNewChild(const std::string &name, const std::string &description)
Definition: EventBookkeeper.cxx:271
EventBookkeeper::DeepCopyForFlatStructure
EventBookkeeper * DeepCopyForFlatStructure(EventBookkeeperCollection *collFLAT)
Definition: EventBookkeeper.cxx:115
EventBookkeeper::m_description
std::string m_description
Definition: EventBookkeeper.h:87
EventBookkeeper::setOutputStream
void setOutputStream(const std::string &outputstream)
Definition: EventBookkeeper.cxx:177
EventBookkeeper::AddChildren
void AddChildren(std::vector< EventBookkeeper * > *children)
Definition: EventBookkeeper.cxx:264
EventBookkeeper::EventBookkeeper
EventBookkeeper()
Constructors.
Definition: EventBookkeeper.cxx:16
EventBookkeeper::m_name
std::string m_name
Definition: EventBookkeeper.h:86
EventBookkeeper::setNWeightedAcceptedEvents
void setNWeightedAcceptedEvents(double nWeightedEvents)
Definition: EventBookkeeper.cxx:211
geometry_dat_to_json.indent
indent
Definition: geometry_dat_to_json.py:36
CutFlowSvc
This implements the methods for ICutFlowSvc.
Definition: CutFlowSvc.h:47
EventBookkeeper::addNAcceptedEvents
void addNAcceptedEvents(uint64_t nEvents)
Definition: EventBookkeeper.cxx:205
EventBookkeeper::m_nAcceptedEvents
uint64_t m_nAcceptedEvents
Definition: EventBookkeeper.h:91
EventBookkeeper::setChildrenEventBookkeepers
void setChildrenEventBookkeepers(std::vector< EventBookkeeper * > *childrenEB)
Definition: EventBookkeeper.cxx:242
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
EventBookkeeper
Definition: EventBookkeeper.h:24
EventBookkeeper::m_parentIndex
int m_parentIndex
Definition: EventBookkeeper.h:102
EventBookkeeper::getNAcceptedEvents
uint64_t getNAcceptedEvents() const
Definition: EventBookkeeper.h:60
EventBookkeeper::updateAcceptedEventsIncludingFamily
void updateAcceptedEventsIncludingFamily(const EventBookkeeper *eb)
Definition: EventBookkeeper.cxx:223
EventBookkeeper::getNWeightedAcceptedEvents
double getNWeightedAcceptedEvents() const
Definition: EventBookkeeper.h:64
EventBookkeeper::getDescription
const std::string & getDescription() const
Definition: EventBookkeeper.h:54
EventBookkeeper::setName
void setName(const std::string &name)
Definition: EventBookkeeper.cxx:159
EventBookkeeper::m_declaredTopFilter
bool m_declaredTopFilter
Definition: EventBookkeeper.h:107
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
EventBookkeeper::~EventBookkeeper
~EventBookkeeper()
Definition: EventBookkeeper.cxx:146
EventBookkeeper::isEqualTo
bool isEqualTo(const EventBookkeeper *eb)
Definition: EventBookkeeper.cxx:280
EventBookkeeper::getOutputStream
const std::string & getOutputStream() const
Definition: EventBookkeeper.h:50
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
EventBookkeeper::Print
void Print(const std::string &indent="", std::ostream &out=std::cout)
Definition: EventBookkeeper.cxx:299
python.DecayParser.children
children
Definition: DecayParser.py:32
EventBookkeeper::m_childrenEB
std::vector< EventBookkeeper * > * m_childrenEB
Definition: EventBookkeeper.h:94
EventBookkeeper::m_childrenIndices
std::vector< unsigned int > * m_childrenIndices
Definition: EventBookkeeper.h:103
EventBookkeeper::AddChild
void AddChild(EventBookkeeper *eb)
Definition: EventBookkeeper.cxx:248
EventBookkeeper::setOutputStreamOfFamily
void setOutputStreamOfFamily(const std::string &outputstream)
Definition: EventBookkeeper.cxx:183
EventBookkeeper::getChildrenEventBookkeepers
const std::vector< EventBookkeeper * > * getChildrenEventBookkeepers() const
Definition: EventBookkeeper.h:73
EventBookkeeper::setDescription
void setDescription(const std::string &description)
Definition: EventBookkeeper.cxx:165
CLASS_DEF.h
macros to associate a CLID to a type
EventBookkeeper::SetDefaultDataMemberValues
void SetDefaultDataMemberValues()
Definition: EventBookkeeper.cxx:96
EventBookkeeper::PrintToMsg
void PrintToMsg(MsgStream &, const std::string &indent="")
Definition: EventBookkeeper.cxx:286
EventBookkeeper::m_inputstream
std::string m_inputstream
Definition: EventBookkeeper.h:88
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88
EventBookkeeper::m_logic
std::string m_logic
Definition: EventBookkeeper.h:90
EventBookkeeper::setInputStream
void setInputStream(const std::string &inputstream)
Definition: EventBookkeeper.cxx:171
EventBookkeeper::operator=
EventBookkeeper & operator=(const EventBookkeeper &rhs)
Definition: EventBookkeeper.cxx:65
EventBookkeeper::getCycle
int getCycle() const
Definition: EventBookkeeper.h:70
EventBookkeeper::fillWithWholeFamily
void fillWithWholeFamily(EventBookkeeperCollection *family)
Definition: EventBookkeeper.cxx:317
EventBookkeeper::getName
const std::string & getName() const
Definition: EventBookkeeper.h:44