ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
EvgenOTFTopUpSvc Class Reference

Service to hold some information for topping up algorithms that are running on the fly. More...

#include <EvgenOTFTopUpSvc.h>

Inheritance diagram for EvgenOTFTopUpSvc:
Collaboration diagram for EvgenOTFTopUpSvc:

Public Member Functions

 EvgenOTFTopUpSvc (const std::string &name, ISvcLocator *pSvcLocator)
 
 ~EvgenOTFTopUpSvc ()
 Nothing to delete... More...
 
StatusCode finalize ()
 
virtual long getNPerFile () const
 
virtual long getNUsedSoFar () const
 
virtual double getEfficiency () const
 
virtual bool getNewFileFlag () const
 
virtual void usedEvents ()
 
virtual void usedEvents (const int n)
 
virtual void newFile (std::string &s)
 
virtual const std::string & getFile ()
 
StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface)
 Query the interfaces - this is copied and pasted :(. More...
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Private Attributes

bool m_execDuringInit
 Execute OTF during initialization? (Set in JO) More...
 
long m_nPerFile
 Number of events per LHE file (Set in JO) More...
 
long m_nUsedSoFar
 Number of events used so far by Pythia/Herwig (counter) More...
 
double m_efficiency
 Rough efficiency in Pythia/Herwig (Set in JO) More...
 
bool m_newFileFlag
 Just produced a new file with the OTF generator
More...
 
std::string m_newFileName
 Name of the new OTF generated file. More...
 
long m_nTotal
 Book-keeping: total number of generated events. More...
 
long m_nIterations
 Book-keeping: total number of OTF iterations. More...
 

Detailed Description

Service to hold some information for topping up algorithms that are running on the fly.

It's a bit tricky, but this is mostly just a service for holding some numbers...

Definition at line 18 of file EvgenOTFTopUpSvc.h.

Constructor & Destructor Documentation

◆ EvgenOTFTopUpSvc()

EvgenOTFTopUpSvc::EvgenOTFTopUpSvc ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 9 of file EvgenOTFTopUpSvc.cxx.

10  : AthService(name, pSvcLocator)
11  , m_nUsedSoFar(0)
12  , m_newFileFlag(false)
13  , m_nTotal(0)
14  , m_nIterations(0)
15 {
16  declareProperty("Efficiency", m_efficiency=0.9, "Estimate of Pythia/Herwig matching efficiency and filter efficiency");
17  declareProperty("ExecDuringInit", m_execDuringInit=false, "Execute OTF algorithm during intialize");
18  declareProperty("NPerFile", m_nPerFile=long(5000./0.9), "Number of events to make per file with OTF algorithm");
19  declareProperty("NewFileName", m_newFileName="events.lhe", "Please that the new OTF events went");
20 }

◆ ~EvgenOTFTopUpSvc()

EvgenOTFTopUpSvc::~EvgenOTFTopUpSvc ( )
inline

Nothing to delete...

Definition at line 24 of file EvgenOTFTopUpSvc.h.

Member Function Documentation

◆ finalize()

StatusCode EvgenOTFTopUpSvc::finalize ( )

Definition at line 22 of file EvgenOTFTopUpSvc.cxx.

22  {
23  ATH_MSG_INFO("Total on the fly generated events: " << m_nTotal << " over " << m_nIterations << " iterations.");
24  return StatusCode::SUCCESS;
25 }

◆ getEfficiency()

virtual double EvgenOTFTopUpSvc::getEfficiency ( ) const
inlinevirtual

Implements IEvgenOTFTopUpSvc.

Definition at line 34 of file EvgenOTFTopUpSvc.h.

34 { return m_efficiency; }

◆ getFile()

virtual const std::string& EvgenOTFTopUpSvc::getFile ( )
inlinevirtual

Implements IEvgenOTFTopUpSvc.

Definition at line 45 of file EvgenOTFTopUpSvc.h.

45 { m_newFileFlag=false; return m_newFileName; }

◆ getNewFileFlag()

virtual bool EvgenOTFTopUpSvc::getNewFileFlag ( ) const
inlinevirtual

Implements IEvgenOTFTopUpSvc.

Definition at line 35 of file EvgenOTFTopUpSvc.h.

35 { return m_newFileFlag; }

◆ getNPerFile()

virtual long EvgenOTFTopUpSvc::getNPerFile ( ) const
inlinevirtual

Implements IEvgenOTFTopUpSvc.

Definition at line 32 of file EvgenOTFTopUpSvc.h.

32 { return m_nPerFile; }

◆ getNUsedSoFar()

virtual long EvgenOTFTopUpSvc::getNUsedSoFar ( ) const
inlinevirtual

Implements IEvgenOTFTopUpSvc.

Definition at line 33 of file EvgenOTFTopUpSvc.h.

33 { return m_nUsedSoFar; }

◆ interfaceID()

static const InterfaceID& EvgenOTFTopUpSvc::interfaceID ( )
inlinestatic

Definition at line 47 of file EvgenOTFTopUpSvc.h.

47 { return IID_IEvgenOTFTopUpSvc; }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Service >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Service >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Service >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ newFile()

virtual void EvgenOTFTopUpSvc::newFile ( std::string &  s)
inlinevirtual

Implements IEvgenOTFTopUpSvc.

Definition at line 42 of file EvgenOTFTopUpSvc.h.

◆ queryInterface()

StatusCode EvgenOTFTopUpSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvInterface 
)

Query the interfaces - this is copied and pasted :(.

Definition at line 28 of file EvgenOTFTopUpSvc.cxx.

28  {
29  if ( IID_IEvgenOTFTopUpSvc == riid )
30  *ppvInterface = (IEvgenOTFTopUpSvc*)this;
31  else {
32  // Interface is not directly available: try out a base class
33  return Service::queryInterface(riid, ppvInterface);
34  }
35  addRef();
36  return StatusCode::SUCCESS;
37 }

◆ usedEvents() [1/2]

virtual void EvgenOTFTopUpSvc::usedEvents ( )
inlinevirtual

Implements IEvgenOTFTopUpSvc.

Definition at line 38 of file EvgenOTFTopUpSvc.h.

38 { ++m_nUsedSoFar; }

◆ usedEvents() [2/2]

virtual void EvgenOTFTopUpSvc::usedEvents ( const int  n)
inlinevirtual

Implements IEvgenOTFTopUpSvc.

Definition at line 39 of file EvgenOTFTopUpSvc.h.

39 { m_nUsedSoFar+=n; }

Member Data Documentation

◆ m_efficiency

double EvgenOTFTopUpSvc::m_efficiency
private

Rough efficiency in Pythia/Herwig (Set in JO)

Definition at line 55 of file EvgenOTFTopUpSvc.h.

◆ m_execDuringInit

bool EvgenOTFTopUpSvc::m_execDuringInit
private

Execute OTF during initialization? (Set in JO)

Definition at line 52 of file EvgenOTFTopUpSvc.h.

◆ m_newFileFlag

bool EvgenOTFTopUpSvc::m_newFileFlag
private

Just produced a new file with the OTF generator

Definition at line 56 of file EvgenOTFTopUpSvc.h.

◆ m_newFileName

std::string EvgenOTFTopUpSvc::m_newFileName
private

Name of the new OTF generated file.

Definition at line 57 of file EvgenOTFTopUpSvc.h.

◆ m_nIterations

long EvgenOTFTopUpSvc::m_nIterations
private

Book-keeping: total number of OTF iterations.

Definition at line 60 of file EvgenOTFTopUpSvc.h.

◆ m_nPerFile

long EvgenOTFTopUpSvc::m_nPerFile
private

Number of events per LHE file (Set in JO)

Definition at line 53 of file EvgenOTFTopUpSvc.h.

◆ m_nTotal

long EvgenOTFTopUpSvc::m_nTotal
private

Book-keeping: total number of generated events.

Definition at line 59 of file EvgenOTFTopUpSvc.h.

◆ m_nUsedSoFar

long EvgenOTFTopUpSvc::m_nUsedSoFar
private

Number of events used so far by Pythia/Herwig (counter)

Definition at line 54 of file EvgenOTFTopUpSvc.h.


The documentation for this class was generated from the following files:
AthService::AthService
AthService()
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
EvgenOTFTopUpSvc::m_nIterations
long m_nIterations
Book-keeping: total number of OTF iterations.
Definition: EvgenOTFTopUpSvc.h:60
EvgenOTFTopUpSvc::m_nUsedSoFar
long m_nUsedSoFar
Number of events used so far by Pythia/Herwig (counter)
Definition: EvgenOTFTopUpSvc.h:54
EvgenOTFTopUpSvc::m_execDuringInit
bool m_execDuringInit
Execute OTF during initialization? (Set in JO)
Definition: EvgenOTFTopUpSvc.h:52
EvgenOTFTopUpSvc::m_nTotal
long m_nTotal
Book-keeping: total number of generated events.
Definition: EvgenOTFTopUpSvc.h:59
IEvgenOTFTopUpSvc
Definition: IEvgenOTFTopUpSvc.h:18
beamspotman.n
n
Definition: beamspotman.py:731
EvgenOTFTopUpSvc::m_newFileFlag
bool m_newFileFlag
Just produced a new file with the OTF generator
Definition: EvgenOTFTopUpSvc.h:56
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
EvgenOTFTopUpSvc::m_nPerFile
long m_nPerFile
Number of events per LHE file (Set in JO)
Definition: EvgenOTFTopUpSvc.h:53
EvgenOTFTopUpSvc::m_newFileName
std::string m_newFileName
Name of the new OTF generated file.
Definition: EvgenOTFTopUpSvc.h:57
EvgenOTFTopUpSvc::m_efficiency
double m_efficiency
Rough efficiency in Pythia/Herwig (Set in JO)
Definition: EvgenOTFTopUpSvc.h:55
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15