Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
LArShapeDumper.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
10 #ifndef LARCAFJOBS_LARSHAPEDUMPER_H
11 #define LARCAFJOBS_LARSHAPEDUMPER_H
12 
14 #include "GaudiKernel/ToolHandle.h"
15 #include "StoreGate/DataHandle.h"
19 #include "LArCafJobs/DataStore.h"
27 #include "GaudiKernel/NTuple.h"
28 #include "GaudiKernel/SmartDataPtr.h"
29 #include <fstream>
30 #include <string>
31 #include <stdint.h>
32 #include "TFile.h"
33 #include "TTree.h"
34 #include "TRandom.h"
42 
48 
49 
50 class MsgStream;
51 class StoreGateSvc;
52 class ILArShape;
53 class HWIdentifier;
54 class Identifier;
56 
57 namespace LArSamples {
58  class EventData;
59  class RunData;
60 }
61 
62 namespace Trig {
63  class ChainGroup;
64 }
65 
67 {
68  public:
69  LArShapeDumper(const std::string & name, ISvcLocator * pSvcLocator);
70 
71  ~LArShapeDumper();
72 
73  //standart algorithm methods
74  virtual StatusCode initialize() override;
75  virtual StatusCode start() override;
76  virtual StatusCode execute() override;
77  virtual StatusCode stop() override;
78  virtual StatusCode finalize() override;
79 
80  int makeEvent(LArSamples::EventData*& eventData, int run, int event, int lumiBlock, int bunchXing) const;
81 
82  private:
83 
84  std::string m_fileName;
85 
86  int m_prescale;
87  unsigned m_count;
88  unsigned m_maxChannels;
90  unsigned m_nPrescaledAway;
91  unsigned m_nLArError;
92  unsigned m_nNoDigits;
93  unsigned m_nNoDigitsSC;
94 
95 
96  std::string m_caloType; // EM, HEC, FCAL, SC
97  double m_energyCut, m_noiseSignifCut;
98  double m_energyCutSC;
99  int m_minADCMax,m_minADCMaxSC ;
100  std::string m_gainSpec;
102  std::vector<std::string> m_triggerNames;
103 
104  ToolHandle<ILArShapeDumperTool> m_dumperTool{this,"LArShapeDumperTool","LArShapeDumperTool"};
105  ToolHandle<ILArShapeDumperTool> m_dumperToolSC{this,"LArShapeDumperToolSC","LArShapeDumperToolSC"};
106 
108  Gaudi::Property<std::vector<std::string> > m_problemsToMask{this,"ProblemsToMask",{}, "Bad-Channel categories to patch"};
110  Gaudi::Property<std::vector<std::string> > m_problemsToMaskSC{this,"ProblemsToMaskSC",{}, "Bad-Channel categories to mask"};
111 
112  SG::ReadHandleKey<LArDigitContainer> m_digitsKey{this, "DigitsKey", "FREE", "key for LArDigitContainer"};
113  SG::ReadHandleKey<LArRawChannelContainer> m_channelsKey{this, "ChannelsKey", "LArRawChannels", "key for LArRawChannels"};
114 
115  SG::ReadHandleKey<LArDigitContainer> m_digitsKeySC{this, "DigitsKeySC", "SC_ADC_BAS", "key for LArDigitContainer for SC"};
116  SG::ReadHandleKey<LArRawSCContainer> m_rawscKey{this, "RawSCKey", "SC_ET_ID", "key for LArRawSCContainer"};
117 
118 
119  SG::ReadCondHandleKey<LArADC2MeV> m_adc2mevKey{this,"ADC2MeVKey","LArADC2MeV","SG Key of ADC2MeV conditions object"};
120 
121  PublicToolHandle< Trig::TrigDecisionTool > m_trigDec{this, "TrigDecisionTool", "", "Handle to the TrigDecisionTool"};
122 
123  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
124  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKeySC{this,"CablingKeySC","LArOnOffIdMapSC","SG Key of LArOnOffIdMapping object for SC"};
125 
126  SG::ReadCondHandleKey<LArBadChannelCont> m_BCKey{this, "BadChanKey", "LArBadChannel", "SG bad channels key"};
127  SG::ReadCondHandleKey<LArBadChannelCont> m_BCKeySC{this, "BadChanKeySC", "LArBadChannelSC", "SG bad channels key"};
128 
129  SG::ReadCondHandleKey<CaloNoise> m_noiseCDOKey{this,"CaloNoiseKey","totalNoise","SG Key of CaloNoise data object"};
130 
131  SG::ReadCondHandleKey<BunchCrossingCondData> m_bcDataKey {this, "BunchCrossingCondDataKey", "BunchCrossingData" ,"SG Key of BunchCrossing CDO"};
132 
133 
134  SG::ReadCondHandleKey<ILArPedestal> m_pedestalKey{this,"PedestalKey","LArPedestal","SG Key of LArPedestal object"};
135  SG::ReadCondHandleKey<ILArPedestal> m_pedestalKeySC{this,"PedestalKeySC","LArPedestalSC","SG Key of LArPedestal object"};
136 
137  SG::ReadCondHandleKey<ILArAutoCorr> m_acorrKey{this,"AutocorrKey","LArAutoCorr","SG Key of LArAutoCorr object"};
139  , "CaloDetDescrManager"
140  , "CaloDetDescrManager"
141  , "SG Key for CaloDetDescrManager in the Condition Store" };
143  "CaloSuperCellDetDescrManager", "CaloSuperCellDetDescrManager",
144  "SG key of the resulting CaloSuperCellDetDescrManager" };
147  //const DataHandle<ILArAutoCorr> m_autoCorr;
148  //const DataHandle<LArPhysWaveContainer> m_physWave;
149 
150  bool m_doStream, m_doTrigger, m_doOFCIter,
151  m_doAllEvents, m_doRoIs, m_doAllLvl1, m_dumpChannelInfos;
152  bool m_doEM, m_doHEC, m_doFCAL, m_doSC;
153  bool m_gains[CaloGain::LARNGAIN]{};
154 
156 
158  std::unique_ptr<LArSamples::RunData> m_runData;
159  std::vector<const Trig::ChainGroup*> m_triggerGroups;
160  TRandom m_random;
161 };
162 
163 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
LArEM_ID.h
LArRawSCContainer.h
ILArShapeDumperTool.h
LArShapeDumper::m_gainSpec
std::string m_gainSpec
Definition: LArShapeDumper.h:100
Trig
The common trigger namespace for trigger analysis tools.
Definition: LArCellMonAlg.h:33
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
LArShapeDumper::m_bcMaskSC
LArBadChannelMask m_bcMaskSC
Definition: LArShapeDumper.h:109
DataStore.h
initialize
void initialize()
Definition: run_EoverP.cxx:894
LArPhysWaveContainer.h
LArShapeDumper::m_bcMask
LArBadChannelMask m_bcMask
Definition: LArShapeDumper.h:107
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
TrigDecisionTool.h
LArSamples
Definition: AbsShape.h:24
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
LArShapeDumper::m_nNoDigits
unsigned m_nNoDigits
Definition: LArShapeDumper.h:92
SG::ReadHandleKey< LArDigitContainer >
LArShapeDumper::m_triggerNames
std::vector< std::string > m_triggerNames
Definition: LArShapeDumper.h:102
LArHEC_ID.h
HWIdentifier
Definition: HWIdentifier.h:13
LArShapeDumper::m_nLArError
unsigned m_nLArError
Definition: LArShapeDumper.h:91
CaloGain::LARNGAIN
@ LARNGAIN
Definition: CaloGain.h:19
LArShapeDumper::m_nPrescaledAway
unsigned m_nPrescaledAway
Definition: LArShapeDumper.h:90
LArShapeDumper
Definition: LArShapeDumper.h:67
DataHandle.h
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
LArShapeDumper::m_count
unsigned m_count
Definition: LArShapeDumper.h:87
LArG4FSStartPointFilterLegacy.execute
execute
Definition: LArG4FSStartPointFilterLegacy.py:20
LArShapeDumper::m_caloType
std::string m_caloType
Definition: LArShapeDumper.h:96
AthAlgorithm.h
LArBadChannelCont.h
LArADC2MeV.h
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:125
LArOnOffIdMapping.h
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
LArShapeDumper::m_fileName
std::string m_fileName
Definition: LArShapeDumper.h:84
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
EventData
Definition: Trigger/TrigAccel/TrigCudaFitter/src/EventData.h:11
run
Definition: run.py:1
LArShapeDumper::m_onlineHelperSC
const LArOnline_SuperCellID * m_onlineHelperSC
Definition: LArShapeDumper.h:146
LArShapeDumper::m_minADCMaxSC
int m_minADCMaxSC
Definition: LArShapeDumper.h:99
LArShapeDumper::m_maxChannels
unsigned m_maxChannels
Definition: LArShapeDumper.h:88
AthAlgorithm
Definition: AthAlgorithm.h:47
ReadCondHandleKey.h
LArShapeDumper::m_doSC
bool m_doSC
Definition: LArShapeDumper.h:152
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
CaloNoise.h
LArOnlineID
Definition: LArOnlineID.h:20
LArShapeDumper::m_nNoDigitsSC
unsigned m_nNoDigitsSC
Definition: LArShapeDumper.h:93
LArSamples::DataStore
storage of the time histories of all the cells
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:32
LArDigitContainer.h
LArOnline_SuperCellID
Definition: LArOnline_SuperCellID.h:20
SG::ReadCondHandleKey< LArADC2MeV >
LArFCAL_ID.h
LArShapeDumper::m_runData
std::unique_ptr< LArSamples::RunData > m_runData
Definition: LArShapeDumper.h:158
LArShapeDumper::m_samples
LArSamples::DataStore * m_samples
Definition: LArShapeDumper.h:157
ILArPedestal.h
LArShapeDumper::m_dumpChannelInfos
bool m_dumpChannelInfos
Definition: LArShapeDumper.h:151
LArShapeDumper::m_random
TRandom m_random
Definition: LArShapeDumper.h:160
LArShapeDumper::m_prescale
int m_prescale
Definition: LArShapeDumper.h:86
LArOnline_SuperCellID.h
LArShapeDumper::m_energyCutSC
double m_energyCutSC
Definition: LArShapeDumper.h:98
LArShapeDumper::m_triggerGroups
std::vector< const Trig::ChainGroup * > m_triggerGroups
Definition: LArShapeDumper.h:159
ILArAutoCorr.h
BunchCrossingCondData.h
Replaces the BunchCrossing AlgTool used in run1/2.
LArShapeDumper::m_onlyEmptyBC
bool m_onlyEmptyBC
Definition: LArShapeDumper.h:155
LArShapeDumper::m_doTrigger
bool m_doTrigger
Definition: LArShapeDumper.h:150
LArShapeDumper::m_nWrongBunchGroup
unsigned m_nWrongBunchGroup
Definition: LArShapeDumper.h:89
LArShapeDumper::m_onlineHelper
const LArOnlineID * m_onlineHelper
Definition: LArShapeDumper.h:145
xAOD::lumiBlock
setTeId lumiBlock
Definition: L2StandAloneMuon_v1.cxx:327
CaloGain.h
ILArShape
Definition: ILArShape.h:13
LArBadChannelMask.h
LArShapeDumper::m_dumpDisc
bool m_dumpDisc
Definition: LArShapeDumper.h:101
LArSamples::EventData
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:29
LArRawChannelContainer.h
LArShapeDumper::m_noiseSignifCut
double m_noiseSignifCut
Definition: LArShapeDumper.h:97
LArBadChannelMask
Definition: LArBadChannelMask.h:18
Identifier
Definition: IdentifierFieldParser.cxx:14