ATLAS Offline Software
LArShapeDumper.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 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"
18 #include "LArCafJobs/DataStore.h"
25 #include "GaudiKernel/NTuple.h"
26 #include "GaudiKernel/SmartDataPtr.h"
27 #include <fstream>
28 #include <string>
29 #include <stdint.h>
30 #include "TFile.h"
31 #include "TTree.h"
32 #include "TRandom.h"
39 
43 
44 
45 class MsgStream;
46 class StoreGateSvc;
47 class ILArPedestal;
48 class ILArShape;
49 class ILArAutoCorr;
50 class HWIdentifier;
51 class Identifier;
53 
54 namespace LArSamples {
55  class EventData;
56  class RunData;
57 }
58 
59 namespace Trig {
60  class ChainGroup;
61 }
62 
64 {
65  public:
66  LArShapeDumper(const std::string & name, ISvcLocator * pSvcLocator);
67 
68  ~LArShapeDumper();
69 
70  //standart algorithm methods
71  virtual StatusCode initialize() override;
72  virtual StatusCode start() override;
73  virtual StatusCode execute() override;
74  virtual StatusCode stop() override;
75  virtual StatusCode finalize() override;
76 
77  int makeEvent(LArSamples::EventData*& eventData, int run, int event, int lumiBlock, int bunchXing) const;
78 
79  private:
80 
81  std::string m_fileName;
82 
83  int m_prescale;
84  unsigned m_count;
85  unsigned m_maxChannels;
87  unsigned m_nPrescaledAway;
88  unsigned m_nLArError;
89  unsigned m_nNoDigits;
90 
91 
92  std::string m_digitsKey, m_channelsKey;
93  std::string m_caloType; // EM, HEC, FCAL
94  double m_energyCut, m_noiseSignifCut;
96  std::string m_gainSpec;
97  bool m_dumpDisc;
98  std::vector<std::string> m_triggerNames;
99 
100  ToolHandle<ILArShapeDumperTool> m_dumperTool{this,"LArShapeDumperTool","LArShapeDumperTool"};
101 
103  Gaudi::Property<std::vector<std::string> > m_problemsToMask{this,"ProblemsToMask",{}, "Bad-Channel categories to patch"};
104 
105 
106 
107  SG::ReadCondHandleKey<LArADC2MeV> m_adc2mevKey{this,"ADC2MeVKey","LArADC2MeV","SG Key of ADC2MeV conditions object"};
108 
109  PublicToolHandle< Trig::TrigDecisionTool > m_trigDec{this, "TrigDecisionTool", "", "Handle to the TrigDecisionTool"};
110 
111  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
112  SG::ReadCondHandleKey<LArBadChannelCont> m_BCKey{this, "BadChanKey", "LArBadChannel", "SG bad channels key"};
113  SG::ReadCondHandleKey<CaloNoise> m_noiseCDOKey{this,"CaloNoiseKey","totalNoise","SG Key of CaloNoise data object"};
114 
115  SG::ReadCondHandleKey<BunchCrossingCondData> m_bcDataKey {this, "BunchCrossingCondDataKey", "BunchCrossingData" ,"SG Key of BunchCrossing CDO"};
116 
117 
118  SG::ReadCondHandleKey<ILArPedestal> m_pedestalKey{this,"PedestalKey","LArPedestal","SG Key of LArPedestal object"};
119 
121  , "CaloDetDescrManager"
122  , "CaloDetDescrManager"
123  , "SG Key for CaloDetDescrManager in the Condition Store" };
126  //const DataHandle<LArPhysWaveContainer> m_physWave;
127 
128  bool m_doStream, m_doTrigger, m_doOFCIter,
129  m_doAllEvents, m_doRoIs, m_doAllLvl1, m_dumpChannelInfos;
130  bool m_doEM, m_doHEC, m_doFCAL;
131  bool m_gains[CaloGain::LARNGAIN]{};
132 
134 
136  std::unique_ptr<LArSamples::RunData> m_runData;
137  std::vector<const Trig::ChainGroup*> m_triggerGroups;
138  TRandom m_random;
139 };
140 
141 #endif
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:53
LArEM_ID.h
ILArShapeDumperTool.h
LArShapeDumper::m_gainSpec
std::string m_gainSpec
Definition: LArShapeDumper.h:96
Trig
The common trigger namespace for trigger analysis tools.
Definition: CaloTowerVecMon.h:44
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
DataStore.h
ILArPedestal
Definition: ILArPedestal.h:12
initialize
void initialize()
Definition: run_EoverP.cxx:894
LArPhysWaveContainer.h
LArShapeDumper::m_bcMask
LArBadChannelMask m_bcMask
Definition: LArShapeDumper.h:102
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
LArShapeDumper::m_digitsKey
std::string m_digitsKey
Definition: LArShapeDumper.h:92
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:89
LArShapeDumper::m_triggerNames
std::vector< std::string > m_triggerNames
Definition: LArShapeDumper.h:98
LArHEC_ID.h
HWIdentifier
Definition: HWIdentifier.h:13
LArShapeDumper::m_nLArError
unsigned m_nLArError
Definition: LArShapeDumper.h:88
CaloGain::LARNGAIN
@ LARNGAIN
Definition: CaloGain.h:19
LArShapeDumper::m_nPrescaledAway
unsigned m_nPrescaledAway
Definition: LArShapeDumper.h:87
LArShapeDumper
Definition: LArShapeDumper.h:64
DataHandle.h
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
LArShapeDumper::m_count
unsigned m_count
Definition: LArShapeDumper.h:84
ILArAutoCorr
This class defines the interface for accessing AutoCorrelation parameters for each channel @stereotyp...
Definition: ILArAutoCorr.h:29
LArG4FSStartPointFilterLegacy.execute
execute
Definition: LArG4FSStartPointFilterLegacy.py:20
LArShapeDumper::m_caloType
std::string m_caloType
Definition: LArShapeDumper.h:93
AthAlgorithm.h
LArBadChannelCont.h
LArADC2MeV.h
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
LArOnOffIdMapping.h
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
LArShapeDumper::m_fileName
std::string m_fileName
Definition: LArShapeDumper.h:81
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
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:10
run
Definition: run.py:1
LArShapeDumper::m_minADCMax
int m_minADCMax
Definition: LArShapeDumper.h:95
LArShapeDumper::m_maxChannels
unsigned m_maxChannels
Definition: LArShapeDumper.h:85
AthAlgorithm
Definition: AthAlgorithm.h:47
ReadCondHandleKey.h
LArShapeDumper::m_doHEC
bool m_doHEC
Definition: LArShapeDumper.h:130
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
CaloNoise.h
LArOnlineID
Definition: LArOnlineID.h:20
DataHandle< ILArAutoCorr >
LArSamples::DataStore
storage of the time histories of all the cells
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:32
LArDigitContainer.h
SG::ReadCondHandleKey< LArADC2MeV >
LArFCAL_ID.h
LArShapeDumper::m_runData
std::unique_ptr< LArSamples::RunData > m_runData
Definition: LArShapeDumper.h:136
LArShapeDumper::m_samples
LArSamples::DataStore * m_samples
Definition: LArShapeDumper.h:135
LArShapeDumper::m_dumpChannelInfos
bool m_dumpChannelInfos
Definition: LArShapeDumper.h:129
LArShapeDumper::m_autoCorr
const DataHandle< ILArAutoCorr > m_autoCorr
Definition: LArShapeDumper.h:125
LArShapeDumper::m_random
TRandom m_random
Definition: LArShapeDumper.h:138
LArShapeDumper::m_prescale
int m_prescale
Definition: LArShapeDumper.h:83
LArShapeDumper::m_triggerGroups
std::vector< const Trig::ChainGroup * > m_triggerGroups
Definition: LArShapeDumper.h:137
BunchCrossingCondData.h
Replaces the BunchCrossing AlgTool used in run1/2.
LArShapeDumper::m_onlyEmptyBC
bool m_onlyEmptyBC
Definition: LArShapeDumper.h:133
LArShapeDumper::m_doTrigger
bool m_doTrigger
Definition: LArShapeDumper.h:128
LArShapeDumper::m_nWrongBunchGroup
unsigned m_nWrongBunchGroup
Definition: LArShapeDumper.h:86
LArShapeDumper::m_onlineHelper
const LArOnlineID * m_onlineHelper
Definition: LArShapeDumper.h:124
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:97
LArSamples::EventData
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:29
LArRawChannelContainer.h
LArShapeDumper::m_noiseSignifCut
double m_noiseSignifCut
Definition: LArShapeDumper.h:94
LArBadChannelMask
Definition: LArBadChannelMask.h:18