ATLAS Offline Software
Loading...
Searching...
No Matches
EvgenOTFTopUpSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef XAOD_ANALYSIS
6
7#ifndef EVGENPRODTOOLS_EVGENOTFTOPUPSVC_H
8#define EVGENPRODTOOLS_EVGENOTFTOPUPSVC_H
9
12#include <string>
13
18class EvgenOTFTopUpSvc : public extends<AthService, IEvgenOTFTopUpSvc> {
19public:
20
21 // Constructor and destructor
22 EvgenOTFTopUpSvc(const std::string& name, ISvcLocator* pSvcLocator);
23
25
26 // Standard sequence functions - don't actually need an excecute
27 // Could use init() as a chance to run OTF for the first time,
28 // but that applied to the OTF algorithm, not this service
29 virtual StatusCode finalize() override;
30
31 // Getters
32 virtual long getNPerFile() const override { return m_nPerFile; }
33 virtual long getNUsedSoFar() const override { return m_nUsedSoFar; }
34 virtual double getEfficiency() const override { return m_efficiency; }
35 virtual bool getNewFileFlag() const override { return m_newFileFlag; }
36
37 // Setters - first for Pythia/Herwig to call when they use up events
38 virtual void usedEvents() override { ++m_nUsedSoFar; }
39 virtual void usedEvents( const int n ) override { m_nUsedSoFar+=n; }
40
41 // New file created by the OTF generator algorithm
42 virtual void newFile( std::string& s ) override
44
45 // New file grabbed by the showering generator
46 virtual const std::string& getFile() override
47 { m_newFileFlag=false; return m_newFileName; }
48
49private:
50
54 double m_efficiency;
56 std::string m_newFileName;
57
58 long m_nTotal;
60};
61
62#endif
63
64#endif
virtual StatusCode finalize() override
long m_nUsedSoFar
Number of events used so far by Pythia/Herwig (counter)
virtual void newFile(std::string &s) override
long m_nTotal
Book-keeping: total number of generated events.
virtual long getNPerFile() const override
double m_efficiency
Rough efficiency in Pythia/Herwig (Set in JO)
~EvgenOTFTopUpSvc()
Nothing to delete...
virtual void usedEvents(const int n) override
EvgenOTFTopUpSvc(const std::string &name, ISvcLocator *pSvcLocator)
virtual void usedEvents() override
long m_nIterations
Book-keeping: total number of OTF iterations.
std::string m_newFileName
Name of the new OTF generated file.
virtual double getEfficiency() const override
virtual const std::string & getFile() override
long m_nPerFile
Number of events per LHE file (Set in JO)
bool m_newFileFlag
Just produced a new file with the OTF generator.
virtual bool getNewFileFlag() const override
virtual long getNUsedSoFar() const override
bool m_execDuringInit
Execute OTF during initialization?