ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_CalibHvTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
10
11#ifndef SCT_CalibHvTool_h
12#define SCT_CalibHvTool_h
13
14//Athena includes
16
17//Inner detector includes
19
20//local includes
22#include "SCT_ConditionsTools/ISCT_DCSConditionsTool.h" //template parameter
23
24// Gaudi includes
25#include "GaudiKernel/ToolHandle.h"
26
27//STL includes
28#include <string>
29#include <vector>
30#include <queue>
31#include <utility> //for 'pair'
32
33//fwd declarations
34class StatusCode;
35class ISvcLocator;
36class IdentifierHash;
37
38class SCT_CalibHvTool : public extends<AthAlgTool, ISCT_CalibHistoTool>
39{
40
41 public:
42 //@name Tool methods, reimplemented
44 SCT_CalibHvTool(const std::string&, const std::string&, const IInterface*);
45 virtual ~SCT_CalibHvTool() = default;
46 virtual StatusCode initialize();
47 virtual StatusCode finalize();
49 //@name ISCT_CalibHistoTool methods, reimplemented
51 virtual bool book();
52 virtual bool fill(const bool fromData=false);
53 virtual bool fillFromData();
55
56 private:
61 };
62
63 ToolHandle<ISCT_DCSConditionsTool> m_DCSConditionsTool{this, "SCT_DCSConditionsTool", "SCT_DCSConditionsTool", "Tool to retrieve SCT DCS information"};
64
65 const SCT_ID* m_pSCTHelper{nullptr};
68 typedef std::vector<int> VecInt;
71
72 //private use in this class
73 int m_maxq{100};
74 // For HV trips
75 std::vector<std::queue<int>> m_phvtripQueue;
76 std::queue<int> m_prevLBN;
81 //
86 int m_tq[100] {0};
87
88 std::vector<std::vector<std::pair<int, int>>> m_summarytrips;
89 std::vector<std::vector<std::pair<int, int>>> m_summarytripslb;
90 bool m_outputLowHits{false};
91 int m_lowHitCut{100};
93 template<class T>
94 bool retrievedTool(T& tool, const std::string& toolName) const {
95 if (tool.retrieve().isFailure()) {
96 ATH_MSG_ERROR("Unable to retrieve " << toolName);
97 return false;
98 }
99 return true;
100 }
101
102};
103#endif
#define ATH_MSG_ERROR(x)
Header file to interface class for histograms in the SCT_CalibAlgs package.
interface file for service that keeps track of errors in the bytestream.
This is an Identifier helper class for the SCT subdetector.
This is a "hash" representation of an Identifier.
VecInt * m_sct_numHitsInWafer
std::vector< int > VecInt
ToolHandle< ISCT_DCSConditionsTool > m_DCSConditionsTool
VecInt m_phvtripProcessedEventsInt
SCT_CalibHvTool(const std::string &, const std::string &, const IInterface *)
std::vector< std::vector< std::pair< int, int > > > m_summarytripslb
VecInt m_phvtripRunningTotalInt
SCT_ID::const_id_iterator m_waferItrBegin
virtual StatusCode finalize()
virtual ~SCT_CalibHvTool()=default
VecInt m_phvtripHasItTripped_prev
std::queue< int > m_prevLBN
virtual bool book()
bool retrievedTool(T &tool, const std::string &toolName) const
retrieve a tool and report if it failed
virtual bool fillFromData()
VecInt m_phvtripHasItTripped
SCT_ID::const_id_iterator m_waferItrEnd
virtual bool fill(const bool fromData=false)
VecInt * m_sct_waferHash
virtual StatusCode initialize()
const SCT_ID * m_pSCTHelper
std::vector< std::queue< int > > m_phvtripQueue
std::vector< std::vector< std::pair< int, int > > > m_summarytrips
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
std::vector< Identifier >::const_iterator const_id_iterator
Definition SCT_ID.h:73