ATLAS Offline Software
Loading...
Searching...
No Matches
CSCConditionsTestAlgMT.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7// Constructor
8CSCConditionsTestAlgMT::CSCConditionsTestAlgMT(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator) {}
9
10// Destructor
12
13// Initialize
15 ATH_MSG_INFO("Calling initialize");
16 ATH_CHECK(m_readKey.initialize());
17 return StatusCode::SUCCESS;
18}
19
20// Execute
22 StatusCode sc(StatusCode::SUCCESS);
23
24 ATH_MSG_INFO("Calling execute");
25 std::stringstream ss;
26 ss << "Now setting up read handle: ";
28 const CscCondDbData* readCdo{*readHandle};
29 if (readCdo == nullptr) {
30 ss << "DID NOT WORK!";
31 ATH_MSG_INFO(ss.str());
32 ATH_MSG_ERROR("Null pointer to the read conditions object");
33 return StatusCode::FAILURE;
34 } else {
35 ss << "WORKED!";
36 ATH_MSG_INFO(ss.str());
37 }
38
39 ss.clear();
40
41 unsigned int hash = 24903;
42 ATH_MSG_INFO("Focussing on channel with hash " << hash);
43 ATH_MSG_INFO("Reading F001 =====> " << readCdo->getChannelF001(hash));
44 ATH_MSG_INFO("Reading Noise ====> " << readCdo->getChannelNoise(hash));
45 ATH_MSG_INFO("Reading Pedestal => " << readCdo->getChannelPed(hash));
46 ATH_MSG_INFO("Reading PSlope ===> " << readCdo->getChannelPSlope(hash));
47 ATH_MSG_INFO("Reading RMS ======> " << readCdo->getChannelRMS(hash));
48 ATH_MSG_INFO("Reading Status ===> " << readCdo->getChannelStatus(hash));
49 ATH_MSG_INFO("Reading T0Base ===> " << readCdo->getChannelT0Base(hash));
50 ATH_MSG_INFO("Reading T0Phase ==> " << readCdo->getChannelT0Phase(hash));
51 ATH_MSG_INFO("Is it Good? ======> " << readCdo->isGoodChannelHash(hash));
52
53 ATH_MSG_INFO("MADE IT TO THE END!!");
54 return sc;
55}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
static Double_t ss
static Double_t sc
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
virtual ~CSCConditionsTestAlgMT()
SG::ReadCondHandleKey< CscCondDbData > m_readKey
StatusCode initialize() override
StatusCode execute() override
CSCConditionsTestAlgMT(const std::string &name, ISvcLocator *pSvcLocator)
const bool & getChannelT0Phase(IdentifierHash) const
const float & getChannelPed(IdentifierHash) const
const float & getChannelPSlope(IdentifierHash) const
const int & getChannelStatus(IdentifierHash) const
const float & getChannelF001(IdentifierHash) const
bool isGoodChannelHash(const IdentifierHash &) const
const float & getChannelRMS(IdentifierHash) const
const float & getChannelNoise(IdentifierHash) const
const float & getChannelT0Base(IdentifierHash) const