Skip to content

Commit 8d495e4

Browse files
hahassan7sawenzel
authored andcommitted
[EMCAL-791] Adapting the SimParam to be a CCDB object
1 parent 4d47730 commit 8d495e4

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

Detectors/EMCAL/simulation/include/EMCALSimulation/SimParam.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class SimParam : public o2::conf::ConfigurableParamHelper<SimParam>
4545
Float_t getTimeResponseTau() const { return mTimeResponseTau; }
4646
Float_t getTimeResponsePower() const { return mTimeResponsePower; }
4747
Float_t getTimeResponseThreshold() const { return mTimeResponseThreshold; }
48+
Int_t getBCPhaseSwap() const { return mSwapPhase; }
4849

4950
// Parameters used in SDigitizer
5051
Float_t getA() const { return mA; }
@@ -67,7 +68,6 @@ class SimParam : public o2::conf::ConfigurableParamHelper<SimParam>
6768

6869
void PrintStream(std::ostream& stream) const;
6970

70-
private:
7171
// Digitizer
7272
Int_t mDigitThreshold{3}; ///< Threshold for storing digits in EMC
7373
Int_t mMeanPhotonElectron{4400}; ///< number of photon electrons per GeV deposited energy
@@ -83,6 +83,7 @@ class SimParam : public o2::conf::ConfigurableParamHelper<SimParam>
8383
Float_t mTimeResponseTau{2.35}; ///< Raw time response function tau parameter
8484
Float_t mTimeResponsePower{2}; ///< Raw time response function power parameter
8585
Float_t mTimeResponseThreshold{0.001}; ///< Raw time response function energy threshold
86+
Int_t mSwapPhase{0}; ///< BC phase swap similar to data
8687

8788
// SDigitizer
8889
Float_t mA{0.}; ///< Pedestal parameter
@@ -112,6 +113,16 @@ class SimParam : public o2::conf::ConfigurableParamHelper<SimParam>
112113
std::ostream& operator<<(std::ostream& stream, const SimParam& s);
113114

114115
} // namespace emcal
116+
117+
namespace framework
118+
{
119+
template <typename T>
120+
struct is_messageable;
121+
template <>
122+
struct is_messageable<o2::emcal::SimParam> : std::true_type {
123+
};
124+
} // namespace framework
125+
115126
} // namespace o2
116127

117128
#endif

Detectors/EMCAL/simulation/src/EMCALSimulationLinkDef.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#pragma link C++ class o2::emcal::DigitsWriteoutBuffer + ;
2323
#pragma link C++ class o2::emcal::DigitsVectorStream + ;
2424
#pragma link C++ class o2::emcal::SimParam + ;
25+
#pragma link C++ class o2::conf::ConfigurableParamHelper < o2::emcal::SimParam> + ;
2526
#pragma link C++ class o2::emcal::LabeledDigit + ;
2627
#pragma link C++ class o2::emcal::RawWriter + ;
2728

Detectors/EMCAL/simulation/src/SimParam.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ O2ParamImpl(o2::emcal::SimParam);
1717

1818
using namespace o2::emcal;
1919

20-
std::ostream& operator<<(std::ostream& stream, const o2::emcal::SimParam& s)
20+
std::ostream& o2::emcal::operator<<(std::ostream& stream, const o2::emcal::SimParam& s)
2121
{
2222
s.PrintStream(stream);
2323
return stream;
@@ -39,6 +39,7 @@ void SimParam::PrintStream(std::ostream& stream) const
3939
stream << "\nEMCal::SimParam.mTimeResponsePower = " << mTimeResponsePower;
4040
stream << "\nEMCal::SimParam.mTimeResponseThreshold = " << mTimeResponseThreshold;
4141
stream << "\nEMCal::SimParam.mNADCEC = " << mNADCEC;
42+
stream << "\nEMCal::SimParam.mSwapPhase = " << mSwapPhase;
4243
stream << "\nEMCal::SimParam.mA = " << mA;
4344
stream << "\nEMCal::SimParam.mB = " << mB;
4445
stream << "\nEMCal::SimParam.mECPrimThreshold = " << mECPrimThreshold;

0 commit comments

Comments
 (0)