ATLAS Offline Software
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 
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
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 
116  //inline StatusCode retrieveAbstractInterface(const LArCaliPulseParamsVsCalib*& data_object);
119  inline StatusCode retrieveAbstractInterface(const LArTdriftComplete*& 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);
125  inline StatusCode retrieveAbstractInterface(const LArEMEC_HVbetaComplete*& data_object);
126  inline StatusCode retrieveAbstractInterface(const LArCableLengthComplete*& 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
LArParams2Ntuple::m_allChannels2Ntuple
bool m_allChannels2Ntuple
Definition: LArParams2Ntuple.h:42
LArEMEC_CphiComplete
This class implements the ILArEMEC_Cphi interface.
Definition: LArEMEC_CphiComplete.h:28
LArParams2Ntuple::DumpFlags::set
void set(unsigned i)
Definition: LArParams2Ntuple.h:53
LArParams2Ntuple::DumpFlags::operator[]
bool operator[](unsigned i) const
Definition: LArParams2Ntuple.h:55
LArParams2Ntuple::DumpFlags::flags
const std::vector< bool > & flags() const
Definition: LArParams2Ntuple.h:56
LArParams2Ntuple::m_completeCaliPulseParams
const LArCaliPulseParamsComplete * m_completeCaliPulseParams
Definition: LArParams2Ntuple.h:65
LArCond2NtupleBase.h
LArParams2Ntuple::finalize
StatusCode finalize()
Definition: LArParams2Ntuple.h:34
LArTdriftComplete
This class implements the ILArTdrift interface.
Definition: LArTdriftComplete.h:23
LArParams2Ntuple::m_dump_flags_map
std::vector< std::map< HWIdentifier, DumpFlags > > m_dump_flags_map
Definition: LArParams2Ntuple.h:63
LArParams2Ntuple::m_completePhysCaliTdiff
const LArPhysCaliTdiffComplete * m_completePhysCaliTdiff
Definition: LArParams2Ntuple.h:67
LArParams2Ntuple::m_ntName
std::string m_ntName
Definition: LArParams2Ntuple.h:44
LArParams2Ntuple::m_keylist
std::vector< std::string > m_keylist
Definition: LArParams2Ntuple.h:59
LArParams2Ntuple::m_dumpFlags
DumpFlags m_dumpFlags
Definition: LArParams2Ntuple.h:60
LArParams2Ntuple::m_completeOFCBin
const LArOFCBinComplete * m_completeOFCBin
Definition: LArParams2Ntuple.h:78
LArCableLengthComplete
This class implements the ILArCableLength interface.
Definition: LArCableLengthComplete.h:26
LArParams2Ntuple::~LArParams2Ntuple
~LArParams2Ntuple()
LArParams2Ntuple::DumpFlags
Definition: LArParams2Ntuple.h:48
LArCond2NtupleBase
Definition: LArCond2NtupleBase.h:32
LArParams2Ntuple::m_completeEMEC_Cphi
const LArEMEC_CphiComplete * m_completeEMEC_Cphi
Definition: LArParams2Ntuple.h:72
LArRinjComplete
This class implements the ILArRinj interface.
Definition: LArRinjComplete.h:26
LArParams2Ntuple::m_completeMphysOverMcal
const LArMphysOverMcalComplete * m_completeMphysOverMcal
Definition: LArParams2Ntuple.h:69
LArParams2Ntuple::stop
virtual StatusCode stop()
Definition: LArParams2Ntuple.cxx:85
LArParams2Ntuple::retrieveAbstractInterface
StatusCode retrieveAbstractInterface(const LArCaliPulseParamsComplete *&data_object)
Definition: LArParams2Ntuple.cxx:681
LArParams2Ntuple::execute
StatusCode execute()
Definition: LArParams2Ntuple.h:32
LArMphysOverMcalComplete
This class implements the ILArMphysOverMcal interface.
Definition: LArMphysOverMcalComplete.h:29
LArParams2Ntuple::m_classNames
std::vector< std::string > m_classNames
Definition: LArParams2Ntuple.h:39
LArParams2Ntuple::m_completeEMEC_HVbeta
const LArEMEC_HVbetaComplete * m_completeEMEC_HVbeta
Definition: LArParams2Ntuple.h:74
lumiFormat.i
int i
Definition: lumiFormat.py:85
LArPhysCaliTdiffComplete
This class implements the ILArPhysCaliTdiff interface ` *.
Definition: LArPhysCaliTdiffComplete.h:22
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArParams2Ntuple::DumpFlags::clear
void clear(unsigned i)
Definition: LArParams2Ntuple.h:54
LArParams2Ntuple::DumpFlags::DumpFlags
DumpFlags()
Definition: LArParams2Ntuple.h:52
LArEMEC_HVbetaComplete
This class implements the ILArEMEC_HVbeta interface.
Definition: LArEMEC_HVbetaComplete.h:28
LArEMEC_HValphaComplete
This class implements the ILArEMEC_HValpha interface.
Definition: LArEMEC_HValphaComplete.h:28
LArOFCBinComplete
Definition: LArOFCBinComplete.h:13
LArCableAttenuationComplete
This class implements the ILArCableAttenuation interface.
Definition: LArCableAttenuationComplete.h:26
LArCaliPulseParamsComplete
This class implements the ILArCaliPulseParams interface.
Definition: LArCaliPulseParamsComplete.h:27
LArParams2Ntuple::LArParams2Ntuple
LArParams2Ntuple(const std::string &name, ISvcLocator *pSvcLocator)
Definition: LArParams2Ntuple.cxx:12
LArParams2Ntuple::m_suffix
std::string m_suffix
Definition: LArParams2Ntuple.h:61
LArParams2Ntuple::scanCalibChannels
StatusCode scanCalibChannels(const DATA *&data_object)
Definition: LArParams2Ntuple.cxx:569
LArParams2Ntuple::m_completeRinj
const LArRinjComplete * m_completeRinj
Definition: LArParams2Ntuple.h:70
LArParams2Ntuple::retrieveFromDetStore
StatusCode retrieveFromDetStore(const DATA *&data_object)
Definition: LArParams2Ntuple.cxx:641
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
LArParams2Ntuple::m_completeEMEC_HValpha
const LArEMEC_HValphaComplete * m_completeEMEC_HValpha
Definition: LArParams2Ntuple.h:73
LArParams2Ntuple::m_useAbstractInterface
bool m_useAbstractInterface
Definition: LArParams2Ntuple.h:43
LArParams2Ntuple::m_completeDetCellParams
const LArDetCellParamsComplete * m_completeDetCellParams
Definition: LArParams2Ntuple.h:66
LArParams2Ntuple
This algorithm produces a column-wise NTuple out of several complete structures.
Definition: LArParams2Ntuple.h:24
LArParams2Ntuple::initialize
StatusCode initialize()
Definition: LArParams2Ntuple.cxx:43
LArParams2Ntuple::m_completeCableAttenuation
const LArCableAttenuationComplete * m_completeCableAttenuation
Definition: LArParams2Ntuple.h:76
LArParams2Ntuple::retrieveAbstractInterface
StatusCode retrieveAbstractInterface(const LArOFCBinComplete *&)
Definition: LArParams2Ntuple.h:128
LArParams2Ntuple::m_completeTdrift
const LArTdriftComplete * m_completeTdrift
Definition: LArParams2Ntuple.h:68
LArParams2Ntuple::m_nClasses
static const unsigned m_nClasses
Definition: LArParams2Ntuple.h:46
LArParamsProperties.h
LArParams2Ntuple::m_completeTshaper
const LArTshaperComplete * m_completeTshaper
Definition: LArParams2Ntuple.h:71
LArParams2Ntuple::DumpFlags::m_flags
std::vector< bool > m_flags
Definition: LArParams2Ntuple.h:50
LArParams2Ntuple::m_completeCableLength
const LArCableLengthComplete * m_completeCableLength
Definition: LArParams2Ntuple.h:75
LArParams2Ntuple::scanReadoutChannels
StatusCode scanReadoutChannels(const DATA *&data_object)
Definition: LArParams2Ntuple.cxx:497
LArParams2Ntuple::m_detStoreKeys
std::vector< std::string > m_detStoreKeys
Definition: LArParams2Ntuple.h:40
LArDetCellParamsComplete
This class implements the ILArDetCellParams interface.
Definition: LArDetCellParamsComplete.h:24
LArParams2Ntuple::m_detStoreJo
std::vector< std::string > m_detStoreJo
Definition: LArParams2Ntuple.h:41
LArTshaperComplete
This class implements the ILArTshaper interface.
Definition: LArTshaperComplete.h:26