ATLAS Offline Software
Loading...
Searching...
No Matches
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
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
60 uint64_t getNAcceptedEvents() const { return m_nAcceptedEvents; }
61 void setNAcceptedEvents( uint64_t nEvents );
62 void addNAcceptedEvents( uint64_t nEvents );
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;
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'
112CLASS_DEF( EventBookkeeper , 241669778 , 1 )
113
114#endif //> EVENTBOOKKEEPER_H
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
double cycle(double a, double b)
uint64_t getNAcceptedEvents() const
const std::string & getDescription() const
const std::string & getLogic() const
EventBookkeeper * AddNewChild(const std::string &name, const std::string &description)
const std::string & getInputStream() const
void setOutputStreamOfFamily(const std::string &outputstream)
const std::string & getOutputStream() const
void setNAcceptedEvents(uint64_t nEvents)
double getNWeightedAcceptedEvents() const
std::vector< unsigned int > * m_childrenIndices
void setDescription(const std::string &description)
void fillWithWholeFamily(EventBookkeeperCollection *family)
EventBookkeeper * DeepCopyForFlatStructure(EventBookkeeperCollection *collFLAT)
uint64_t m_nAcceptedEvents
const std::vector< EventBookkeeper * > * getChildrenEventBookkeepers() const
bool isEqualTo(const EventBookkeeper *eb)
void setCycle(int cycle)
const std::string & getName() const
void addNAcceptedEvents(uint64_t nEvents)
void SetDefaultDataMemberValues()
EventBookkeeper()
Constructors.
friend class EventBookkeeperCollection
void setOutputStream(const std::string &outputstream)
void PrintToMsg(MsgStream &, const std::string &indent="")
void PrintFamily(const std::string &indent="")
std::string m_logic
void setNWeightedAcceptedEvents(double nWeightedEvents)
void AddChildren(std::vector< EventBookkeeper * > *children)
void Print(const std::string &indent="", std::ostream &out=std::cout)
void updateAcceptedEventsIncludingFamily(const EventBookkeeper *eb)
std::string m_outputstream
std::string m_inputstream
std::string m_description
friend class CutFlowSvc
void setName(const std::string &name)
double m_nWeightedAcceptedEvents
void AddChild(EventBookkeeper *eb)
int getCycle() const
EventBookkeeper & operator=(const EventBookkeeper &rhs)
std::vector< EventBookkeeper * > * m_childrenEB
void addNWeightedAcceptedEvents(double nWeightedEvents)
void setLogic(const std::string &logic)
void setChildrenEventBookkeepers(std::vector< EventBookkeeper * > *childrenEB)
void setInputStream(const std::string &inputstream)
std::string m_name
const int nEvents
std::string description
glabal timer - how long have I taken so far?
Definition hcg.cxx:91