ATLAS Offline Software
DerivedILArCalibCalculatorSvcForTest.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 // defining this class is just used for testing since class LArCalibCalculatorSvc is a abstract class which needs to be instatiated in my test code
6 // actually the class(i.e. IService) that LArCalibCalculatorSvc inherits is also abstract, which means I also need to override the pure virtual functions in class IService
7 // To make matters more complicated, the classes(i.e. INamedInterface and IStateful) that IService inherits are also abstract, so I need to override the pure virtual functions in classes INamedInterface and IStateful
8 // In addition, since INamedInterface and IStateful all inherit the class IInterface, which is abstract. Therefore, I also override the pure virtual functions in the class IInterface.
9 
10 #ifndef LARG4CODE_DERIVEDILARCALIBCALCULATORSVCFORTEST_H
11 #define LARG4CODE_DERIVEDILARCALIBCALCULATORSVCFORTEST_H
12 
14 #include "GaudiKernel/StateMachine.h"
15 
16 class DerivedILArCalibCalculatorSvcForTest : public implements<ILArCalibCalculatorSvc> {
17 
18 public:
19 
21 
23 
24 // there are no concrete functions for the following member functions,
26  {
27  StatusCode s1;
28  return s1;
29  }
30 
32  {
33  StatusCode s2;
34  return s2;
35  }
36 
38  {
39  StatusCode s3;
40  return s3;
41  }
42 
44  {
45  StatusCode s4;
46  return s4;
47  }
48 
50  {
51  StatusCode s5;
52  return s5;
53  }
54 
56  {
57  StatusCode s6;
58  return s6;
59  }
60 
61  void setServiceManager( ISvcManager* ) { return; }
62 
64  {
65  StatusCode s7;
66  return s7;
67  }
68 
70  {
71  StatusCode s7;
72  return s7;
73  }
74 
76  {
77  StatusCode s7;
78  return s7;
79  }
80 
82  {
83  StatusCode s7;
84  return s7;
85  }
86 
88  {
89  StatusCode s7;
90  return s7;
91  }
92 
94  {
95  StatusCode s7;
96  return s7;
97  }
98 
100  {
101  StatusCode s7;
102  return s7;
103  }
104 
106  {
107  StatusCode s7;
108  return s7;
109  }
110 
112  {
113  return Gaudi::StateMachine::State(0);
114  }
115 
117  {
118  return Gaudi::StateMachine::State(0);
119  }
120 
121  const std::string& name() const
122  {
123  static const std::string Tes = "test";
124  return Tes;
125  }
126 
127  G4bool Process (const G4Step* step, LArG4Identifier & identifier,
128  std::vector<G4double> & energies,
130  {
131  (void)step; //just to silence the unused-parameter warning, the same below
132 // (void)energies;
133  (void)process;
134 
135  identifier.add(4); //add a set of numbers into the LArG4Identifier class, which can provide proper setting for test
136  identifier.add(1);
137  identifier.add(2);
138  identifier.add(3);
139  identifier.add(4);
140  identifier.add(5);
141  identifier.add(6);
142 
143  energies = {1., 2., 3., 4.};
144 
145  return true; //returning true aims to make "m_calculator->Process( a_step, identifier, vtmp, LArG4::kOnlyID)" return true in the tested code LArG4CalibSD.cc
146  }
147 
148 };
149 #endif
DerivedILArCalibCalculatorSvcForTest::sysStop
StatusCode sysStop()
Definition: DerivedILArCalibCalculatorSvcForTest.h:37
DerivedILArCalibCalculatorSvcForTest::~DerivedILArCalibCalculatorSvcForTest
~DerivedILArCalibCalculatorSvcForTest()
Definition: DerivedILArCalibCalculatorSvcForTest.h:22
LArG4Identifier
Definition: LArG4Identifier.h:121
ReadCellNoiseFromCoolCompare.s1
s1
Definition: ReadCellNoiseFromCoolCompare.py:378
DerivedILArCalibCalculatorSvcForTest::setServiceManager
void setServiceManager(ISvcManager *)
Definition: DerivedILArCalibCalculatorSvcForTest.h:61
DerivedILArCalibCalculatorSvcForTest::name
const std::string & name() const
Definition: DerivedILArCalibCalculatorSvcForTest.h:121
DerivedILArCalibCalculatorSvcForTest::restart
StatusCode restart()
Definition: DerivedILArCalibCalculatorSvcForTest.h:105
ReadCellNoiseFromCoolCompare.s4
s4
Definition: ReadCellNoiseFromCoolCompare.py:381
xAOD::identifier
identifier
Definition: UncalibratedMeasurement_v1.cxx:15
SUSY_SimplifiedModel_PostInclude.process
string process
Definition: SUSY_SimplifiedModel_PostInclude.py:42
DerivedILArCalibCalculatorSvcForTest::DerivedILArCalibCalculatorSvcForTest
DerivedILArCalibCalculatorSvcForTest()
Definition: DerivedILArCalibCalculatorSvcForTest.h:20
DerivedILArCalibCalculatorSvcForTest::sysStart
StatusCode sysStart()
Definition: DerivedILArCalibCalculatorSvcForTest.h:31
DerivedILArCalibCalculatorSvcForTest::terminate
StatusCode terminate()
Definition: DerivedILArCalibCalculatorSvcForTest.h:93
DerivedILArCalibCalculatorSvcForTest::finalize
StatusCode finalize()
Definition: DerivedILArCalibCalculatorSvcForTest.h:87
DerivedILArCalibCalculatorSvcForTest::sysFinalize
StatusCode sysFinalize()
Definition: DerivedILArCalibCalculatorSvcForTest.h:43
DerivedILArCalibCalculatorSvcForTest::configure
StatusCode configure()
Definition: DerivedILArCalibCalculatorSvcForTest.h:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonR4::State
CalibratedSpacePoint::State State
Definition: SpacePointCalibrator.cxx:24
DerivedILArCalibCalculatorSvcForTest::sysReinitialize
StatusCode sysReinitialize()
Definition: DerivedILArCalibCalculatorSvcForTest.h:49
DerivedILArCalibCalculatorSvcForTest::stop
StatusCode stop()
Definition: DerivedILArCalibCalculatorSvcForTest.h:81
ILArCalibCalculatorSvc.h
ReadCellNoiseFromCoolCompare.s3
s3
Definition: ReadCellNoiseFromCoolCompare.py:380
DerivedILArCalibCalculatorSvcForTest::targetFSMState
Gaudi::StateMachine::State targetFSMState() const
Definition: DerivedILArCalibCalculatorSvcForTest.h:116
DerivedILArCalibCalculatorSvcForTest::sysRestart
StatusCode sysRestart()
Definition: DerivedILArCalibCalculatorSvcForTest.h:55
DerivedILArCalibCalculatorSvcForTest
Definition: DerivedILArCalibCalculatorSvcForTest.h:16
DerivedILArCalibCalculatorSvcForTest::Process
G4bool Process(const G4Step *step, LArG4Identifier &identifier, std::vector< G4double > &energies, const LArG4::eCalculatorProcessing process=LArG4::kEnergyAndID) const
Definition: DerivedILArCalibCalculatorSvcForTest.h:127
DerivedILArCalibCalculatorSvcForTest::start
StatusCode start()
Definition: DerivedILArCalibCalculatorSvcForTest.h:75
ReadCellNoiseFromCoolCompare.s2
s2
Definition: ReadCellNoiseFromCoolCompare.py:379
DerivedILArCalibCalculatorSvcForTest::initialize
StatusCode initialize()
Definition: DerivedILArCalibCalculatorSvcForTest.h:69
LArCellBinning.step
step
Definition: LArCellBinning.py:158
LArG4::kEnergyAndID
@ kEnergyAndID
Definition: LArG4EnumDefs.h:10
DerivedILArCalibCalculatorSvcForTest::reinitialize
StatusCode reinitialize()
Definition: DerivedILArCalibCalculatorSvcForTest.h:99
DerivedILArCalibCalculatorSvcForTest::FSMState
Gaudi::StateMachine::State FSMState() const
Definition: DerivedILArCalibCalculatorSvcForTest.h:111
LArG4::eCalculatorProcessing
eCalculatorProcessing
Definition: LArG4EnumDefs.h:10
DerivedILArCalibCalculatorSvcForTest::sysInitialize
StatusCode sysInitialize()
Definition: DerivedILArCalibCalculatorSvcForTest.h:25