ATLAS Offline Software
LArRawSCCalibDataReadingAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LARBYTESTREAM_LARRAWSCCALIBDATAREADINDINGALG_H
6 #define LARBYTESTREAM_LARRAWSCCALIBDATAREADINDINGALG_H
7 
12 #include "GaudiKernel/ServiceHandle.h"
13 #include "GaudiKernel/SystemOfUnits.h"
14 
18 
19 
20 //Event classes
24 class LArOnlineID;
26 
28  public:
29  LArRawSCCalibDataReadingAlg(const std::string& name, ISvcLocator* pSvcLocator): AthReentrantAlgorithm(name, pSvcLocator) {};
30 
31  StatusCode initialize() override;
32  StatusCode execute(const EventContext& ctx) const override;
33 
34  private:
35  // Mapping input
36  SG::ReadCondHandleKey<LArLATOMEMapping> m_mapKey {this,"MappingKey","LArLATOMEMap"};
37  SG::ReadCondHandleKey<LArCalibLineMapping> m_calibMapKey{this,"CalibCablingKeyLeg","LArCalibLineMap","SG Key of LArCalibLineMapping object"};
38  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this, "OnOffMapLeg", "LArOnOffIdMap", "SG key for legacy mapping object"};
39 
40  //Event output:
43  SG::WriteHandleKey<LArLATOMEHeaderContainer> m_latomeHeaderCollKey{this, "LArLATOMEHeaderKey", "", "SG key of the LArLATOMEHEaderContainer"};
44 
45  //Service providing the input data
46  ServiceHandle<IROBDataProviderSvc> m_robDataProviderSvc{this,"ROBDataProviderSvc","ROBDataProviderSvc"};
47 
48  //Other properties:
49  BooleanProperty m_failOnCorruption{this,"FailOnCorruption",true,"Return FAILURE if data corruption is found"};
50 
51  DoubleProperty m_delayScale{this,"DelayScale",(25./240.)*Gaudi::Units::nanosecond,"One calibration step in time"};
52 
53 
54  //Identifier helper
55  const LArOnlineID* m_onlineId=nullptr;
56 
57 
58  // The LATOME Decoder tool
59  ToolHandle<LArLATOMEDecoder> m_latomeDecoder{this, "LATOMEDecoder", "LArByteStream/LATOMEDecoder", "decoder instance"};
60 
61  //Switches set in initialize() based of SG keys of output object
62  bool m_doAccDigits=false;
63  bool m_doAccCalibDigits=false;
64  bool m_doLATOMEHeader = true;
65 
66 };
67 
68 #endif
LArRawSCCalibDataReadingAlg::m_failOnCorruption
BooleanProperty m_failOnCorruption
Definition: LArRawSCCalibDataReadingAlg.h:49
LArRawSCCalibDataReadingAlg::m_onlineId
const LArOnlineID * m_onlineId
Definition: LArRawSCCalibDataReadingAlg.h:55
LArRawSCCalibDataReadingAlg::m_doAccDigits
bool m_doAccDigits
Definition: LArRawSCCalibDataReadingAlg.h:62
LArAccumulatedDigitContainer
Container class for LArAccumulatedDigit.
Definition: LArAccumulatedDigitContainer.h:22
python.SystemOfUnits.nanosecond
int nanosecond
Definition: SystemOfUnits.py:119
LArRawSCCalibDataReadingAlg::m_calibMapKey
SG::ReadCondHandleKey< LArCalibLineMapping > m_calibMapKey
Definition: LArRawSCCalibDataReadingAlg.h:37
LArRawSCCalibDataReadingAlg::m_delayScale
DoubleProperty m_delayScale
Definition: LArRawSCCalibDataReadingAlg.h:51
LArLATOMEHeaderContainer
Container class for LArLATOMEHeader.
Definition: LArLATOMEHeaderContainer.h:19
LArRawSCCalibDataReadingAlg::m_mapKey
SG::ReadCondHandleKey< LArLATOMEMapping > m_mapKey
Definition: LArRawSCCalibDataReadingAlg.h:36
ReadCondHandle.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
LArRawSCCalibDataReadingAlg::initialize
StatusCode initialize() override
Definition: LArRawSCCalibDataReadingAlg.cxx:17
LArRawSCCalibDataReadingAlg::m_doAccCalibDigits
bool m_doAccCalibDigits
Definition: LArRawSCCalibDataReadingAlg.h:63
LArRawSCCalibDataReadingAlg::m_accDigitKey
SG::WriteHandleKey< LArAccumulatedDigitContainer > m_accDigitKey
Definition: LArRawSCCalibDataReadingAlg.h:41
WriteHandle.h
Handle class for recording to StoreGate.
IROBDataProviderSvc
Interface class for managing ROB for both online and offline.
Definition: IROBDataProviderSvc.h:23
LArOnOffIdMapping.h
LArRawSCCalibDataReadingAlg
Definition: LArRawSCCalibDataReadingAlg.h:27
SG::WriteHandleKey< LArAccumulatedDigitContainer >
LArRawSCCalibDataReadingAlg::m_latomeHeaderCollKey
SG::WriteHandleKey< LArLATOMEHeaderContainer > m_latomeHeaderCollKey
Definition: LArRawSCCalibDataReadingAlg.h:43
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArRawSCCalibDataReadingAlg::m_accCalibDigitKey
SG::WriteHandleKey< LArAccumulatedCalibDigitContainer > m_accCalibDigitKey
Definition: LArRawSCCalibDataReadingAlg.h:42
LArRawSCCalibDataReadingAlg::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: LArRawSCCalibDataReadingAlg.h:38
ReadCondHandleKey.h
AthReentrantAlgorithm.h
LArRawSCCalibDataReadingAlg::m_robDataProviderSvc
ServiceHandle< IROBDataProviderSvc > m_robDataProviderSvc
Definition: LArRawSCCalibDataReadingAlg.h:46
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
LArOnlineID
Definition: LArOnlineID.h:20
LArRawSCCalibDataReadingAlg::m_latomeDecoder
ToolHandle< LArLATOMEDecoder > m_latomeDecoder
Definition: LArRawSCCalibDataReadingAlg.h:59
SG::ReadCondHandleKey< LArLATOMEMapping >
LArRawSCCalibDataReadingAlg::execute
StatusCode execute(const EventContext &ctx) const override
Definition: LArRawSCCalibDataReadingAlg.cxx:68
LArRawSCCalibDataReadingAlg::m_doLATOMEHeader
bool m_doLATOMEHeader
Definition: LArRawSCCalibDataReadingAlg.h:64
LArLATOMEDecoder.h
Byte stream converter of LATOME.
LArRawSCCalibDataReadingAlg::LArRawSCCalibDataReadingAlg
LArRawSCCalibDataReadingAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: LArRawSCCalibDataReadingAlg.h:29
LArCalibLineMapping.h
LArAccumulatedCalibDigitContainer
Container class for LArAccumulatedCalibDigit.
Definition: LArAccumulatedCalibDigitContainer.h:25
ServiceHandle< IROBDataProviderSvc >