ATLAS Offline Software
Loading...
Searching...
No Matches
TFCSLateralShapeParametrization.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
7#include <TClass.h>
8
9//=============================================
10//======= TFCSLateralShapeParametrization =========
11//=============================================
12
14 const char *name, const char *title)
15 : TFCSParametrization(name, title), m_Ekin_bin(-1), m_calosample(-1) {}
16
20
24
31
33 const TFCSParametrizationBase &ref) const {
34 if (IsA() != ref.IsA()) {
35 ATH_MSG_DEBUG("compare(): different class types "
36 << IsA()->GetName() << " != " << ref.IsA()->GetName());
37 return false;
38 }
39 const TFCSLateralShapeParametrization &ref_typed =
40 static_cast<const TFCSLateralShapeParametrization &>(ref);
41 if (Ekin_bin() != ref_typed.Ekin_bin()) {
42 ATH_MSG_DEBUG("compare(): different Ekin bin");
43 return false;
44 }
45 if (calosample() != ref_typed.calosample()) {
46 ATH_MSG_DEBUG("compare(): different calosample");
47 return false;
48 }
49
50 return true;
51}
52
53void TFCSLateralShapeParametrization::Print(Option_t *option) const {
54 TString opt(option);
55 bool shortprint = opt.Index("short") >= 0;
56 bool longprint = msgLvl(MSG::DEBUG) || (msgLvl(MSG::INFO) && !shortprint);
57 TString optprint = opt;
58 optprint.ReplaceAll("short", "");
60 if (longprint) {
61 if (Ekin_bin() == -1)
62 ATH_MSG_INFO(optprint << " Ekin_bin=all ; calosample=" << calosample());
63 else
64 ATH_MSG_INFO(optprint << " Ekin_bin=" << Ekin_bin()
65 << " ; calosample=" << calosample());
66 }
67}
const boost::regex ref(r_ef)
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
bool msgLvl(const MSG::Level lvl) const
Check whether the logging system is active at the provided verbosity level.
Definition MLogging.h:222
void Print(Option_t *option="") const override
TFCSLateralShapeParametrization(const char *name=nullptr, const char *title=nullptr)
bool compare(const TFCSParametrizationBase &ref) const
virtual void set_pdgid_Ekin_eta_Ekin_bin_calosample(const TFCSLateralShapeParametrization &ref)
void Print(Option_t *option="") const
Print object information.
TFCSParametrizationBase(const char *name=nullptr, const char *title=nullptr)
virtual void set_pdgid_Ekin_eta(const TFCSParametrizationBase &ref)
TFCSParametrization(const char *name=nullptr, const char *title=nullptr)
#define IsA
Declare the TObject style functions.