ATLAS Offline Software
Loading...
Searching...
No Matches
LArParams2Ntuple.h
Go to the documentation of this file.
1//Dear emacs, this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5*/
6
7
14
15#ifndef LARPARAMS2NTUPLE_H
16#define LARPARAMS2NTUPLE_H
17
20
21//using namespace LArParamsProperties ;
22
24{
25 public:
26
27 LArParams2Ntuple(const std::string & name, ISvcLocator * pSvcLocator);
29
30 //standard algorithm methods
31 StatusCode initialize();
32 StatusCode execute() {return StatusCode::SUCCESS;}
33 virtual StatusCode stop();
34 StatusCode finalize(){return StatusCode::SUCCESS;}
35 //StatusCode ntChannelInfo(HWIdentifier chid,int igain) ;
36
37 private:
38
39 std::vector<std::string> m_classNames ;
40 std::vector<std::string> m_detStoreKeys ;
41 std::vector<std::string> m_detStoreJo ;
44 std::string m_ntName;
45
46 static const unsigned m_nClasses;
47
48 class DumpFlags {
49 private:
50 std::vector<bool> m_flags ;
51 public:
52 DumpFlags() { for ( unsigned i=0 ; i<m_nClasses ; i++ ) m_flags.push_back(false) ; }
53 void set(unsigned i) { if ( i<m_nClasses ) m_flags[i] = true ; }
54 void clear(unsigned i) { if ( i<m_nClasses ) m_flags[i] = false ; }
55 inline bool operator[](unsigned i) const { return (i<m_nClasses) && m_flags[i] ; }
56 inline const std::vector<bool>& flags() const { return m_flags ; }
57 } ;
58
59 std::vector<std::string> m_keylist ;
61 std::string m_suffix ;
62
63 std::vector< std::map< HWIdentifier , DumpFlags > > m_dump_flags_map ;
64
77 //const LArCaliPulseParamsVsCalib* m_calibCaliPulseParams ;
79
80
81 template < class DATA >
82 StatusCode scanReadoutChannels(const DATA*& data_object) ;
83 template < class DATA >
84 StatusCode scanCalibChannels(const DATA*& data_object) ;
85 template < class DATA >
86 StatusCode retrieveFromDetStore(const DATA*& data_object) ;
87
88// inline StatusCode retrieveAbstractInterface(const LArCaliPulseParamsComplete*& data_object)
89// { return m_detStore->retrieve(dynamic_cast<const ILArCaliPulseParams*&>(data_object) ) ; }
90// inline StatusCode retrieveAbstractInterface(const LArCaliPulseParamsVsCalib*& data_object)
91// { return m_detStore->retrieve(dynamic_cast<const ILArCaliPulseParams*&>(data_object) ) ; }
92// inline StatusCode retrieveAbstractInterface(const LArDetCellParamsComplete*& data_object)
93// { return m_detStore->retrieve(dynamic_cast<const ILArDetCellParams*&>(data_object) ) ; }
94// inline StatusCode retrieveAbstractInterface(const LArPhysCaliTdiffComplete*& data_object)
95// { return m_detStore->retrieve(dynamic_cast<const ILArPhysCaliTdiff*&>(data_object) ) ; }
96// inline StatusCode retrieveAbstractInterface(const LArTdriftComplete*& data_object)
97// { return m_detStore->retrieve(dynamic_cast<const ILArTdrift*&>(data_object) ) ; }
98// inline StatusCode retrieveAbstractInterface(const LArMphysOverMcalComplete*& data_object)
99// { return m_detStore->retrieve(dynamic_cast<const ILArMphysOverMcal*&>(data_object) ) ; }
100// inline StatusCode retrieveAbstractInterface(const LArRinjComplete*& data_object)
101// { return m_detStore->retrieve(dynamic_cast<const ILArRinj*&>(data_object) ) ; }
102// inline StatusCode retrieveAbstractInterface(const LArTshaperComplete*& data_object)
103// { return m_detStore->retrieve(dynamic_cast<const ILArTshaper*&>(data_object) ) ; }
104// inline StatusCode retrieveAbstractInterface(const LArEMEC_CphiComplete*& data_object)
105// { return m_detStore->retrieve(dynamic_cast<const ILArEMEC_Cphi*&>(data_object) ) ; }
106// inline StatusCode retrieveAbstractInterface(const LArEMEC_HValphaComplete*& data_object)
107// { return m_detStore->retrieve(dynamic_cast<const ILArEMEC_HValpha*&>(data_object) ) ; }
108// inline StatusCode retrieveAbstractInterface(const LArEMEC_HVbetaComplete*& data_object)
109// { return m_detStore->retrieve(dynamic_cast<const ILArEMEC_HVbeta*&>(data_object) ) ; }
110// inline StatusCode retrieveAbstractInterface(const LArCableLengthComplete*& data_object)
111// { return m_detStore->retrieve(dynamic_cast<const ILArCableLength*&>(data_object) ) ; }
112// inline StatusCode retrieveAbstractInterface(const LArCableAttenuationComplete*& data_object)
113// { return m_detStore->retrieve(dynamic_cast<const ILArCableAttenuation*&>(data_object) ) ; }
114
115 inline StatusCode retrieveAbstractInterface(const LArCaliPulseParamsComplete*& data_object);
116 //inline StatusCode retrieveAbstractInterface(const LArCaliPulseParamsVsCalib*& data_object);
117 inline StatusCode retrieveAbstractInterface(const LArDetCellParamsComplete*& data_object);
118 inline StatusCode retrieveAbstractInterface(const LArPhysCaliTdiffComplete*& data_object);
119 inline StatusCode retrieveAbstractInterface(const LArTdriftComplete*& data_object);
120 inline StatusCode retrieveAbstractInterface(const LArMphysOverMcalComplete*& data_object);
121 inline StatusCode retrieveAbstractInterface(const LArRinjComplete*& data_object);
122 inline StatusCode retrieveAbstractInterface(const LArTshaperComplete*& data_object);
123 inline StatusCode retrieveAbstractInterface(const LArEMEC_CphiComplete*& data_object);
124 inline StatusCode retrieveAbstractInterface(const LArEMEC_HValphaComplete*& data_object);
125 inline StatusCode retrieveAbstractInterface(const LArEMEC_HVbetaComplete*& data_object);
126 inline StatusCode retrieveAbstractInterface(const LArCableLengthComplete*& data_object);
127 inline StatusCode retrieveAbstractInterface(const LArCableAttenuationComplete*& data_object);
128 StatusCode retrieveAbstractInterface(const LArOFCBinComplete*& /*data_object*/){return StatusCode::SUCCESS;};
129
130
131
132 // dump all channel info to text file
133 //------------------------------------
134 //std::string m_dumpAllOnlineChannels ;
135 //void dumpChannels() ;
136 //void writeToFile(const HWIdentifier & ch, FILE* f) ;
137
138 // Athena / Gaudi services:
139};
140
141
142#endif
This class implements the ILArCableAttenuation interface.
This class implements the ILArCableLength interface.
This class implements the ILArCaliPulseParams interface.
LArCond2NtupleBase(const std::string &name, ISvcLocator *pSvcLocator)
This class implements the ILArDetCellParams interface.
This class implements the ILArEMEC_Cphi interface.
This class implements the ILArEMEC_HValpha interface.
This class implements the ILArEMEC_HVbeta interface.
This class implements the ILArMphysOverMcal interface.
const std::vector< bool > & flags() const
bool operator[](unsigned i) const
std::vector< bool > m_flags
const LArEMEC_HVbetaComplete * m_completeEMEC_HVbeta
const LArTdriftComplete * m_completeTdrift
StatusCode scanReadoutChannels(const DATA *&data_object)
const LArPhysCaliTdiffComplete * m_completePhysCaliTdiff
std::vector< std::map< HWIdentifier, DumpFlags > > m_dump_flags_map
const LArDetCellParamsComplete * m_completeDetCellParams
const LArEMEC_HValphaComplete * m_completeEMEC_HValpha
LArParams2Ntuple(const std::string &name, ISvcLocator *pSvcLocator)
std::vector< std::string > m_detStoreJo
const LArEMEC_CphiComplete * m_completeEMEC_Cphi
StatusCode retrieveAbstractInterface(const LArOFCBinComplete *&)
StatusCode retrieveAbstractInterface(const LArCaliPulseParamsComplete *&data_object)
virtual StatusCode stop()
StatusCode finalize()
StatusCode initialize()
std::vector< std::string > m_detStoreKeys
const LArCaliPulseParamsComplete * m_completeCaliPulseParams
std::vector< std::string > m_keylist
StatusCode retrieveFromDetStore(const DATA *&data_object)
const LArOFCBinComplete * m_completeOFCBin
const LArMphysOverMcalComplete * m_completeMphysOverMcal
static const unsigned m_nClasses
StatusCode scanCalibChannels(const DATA *&data_object)
const LArRinjComplete * m_completeRinj
StatusCode execute()
const LArTshaperComplete * m_completeTshaper
const LArCableLengthComplete * m_completeCableLength
const LArCableAttenuationComplete * m_completeCableAttenuation
std::vector< std::string > m_classNames
This class implements the ILArPhysCaliTdiff interface ` *.
This class implements the ILArRinj interface.
This class implements the ILArTdrift interface.
This class implements the ILArTshaper interface.