CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
edmtest::HcalDumpConditions Class Reference
Inheritance diagram for edmtest::HcalDumpConditions:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
template<class S , class SRcd >
void dumpIt (const std::vector< std::string > &mDumpRequest, const edm::Event &e, const edm::EventSetup &context, const std::string name, const edm::ESGetToken< S, SRcd > tok)
 
template<class S , class SRcd >
void dumpIt (const std::vector< std::string > &mDumpRequest, const edm::Event &e, const edm::EventSetup &context, const std::string name, const HcalTopology *topo, const edm::ESGetToken< S, SRcd > tok)
 
 HcalDumpConditions (edm::ParameterSet const &p)
 
 HcalDumpConditions (int i)
 
template<class S >
void writeToFile (const S &myS, const edm::Event &e, const std::string name)
 
 ~HcalDumpConditions () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex >
const & 
esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector
< ProductResolverIndexAndSkipBit >
const & 
itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

std::string front
 
edm::ESGetToken< HcalDbService,
HcalDbRecord
m_tokdb
 
edm::ESGetToken< HcalTopology,
HcalRecNumberingRecord
m_toktopo
 
std::vector< std::string > mDumpRequest
 
edm::ESGetToken
< HcalChannelQuality,
HcalChannelQualityRcd
tok_ChannelQuality
 
edm::ESGetToken< HcalDcsMap,
HcalDcsMapRcd
tok_DcsMap
 
edm::ESGetToken< HcalDcsValues,
HcalDcsRcd
tok_DcsValues
 
edm::ESGetToken
< HcalElectronicsMap,
HcalElectronicsMapRcd
tok_ElectronicsMap
 
edm::ESGetToken
< HcalFlagHFDigiTimeParams,
HcalFlagHFDigiTimeParamsRcd
tok_FlagHFDigiTimeParams
 
edm::ESGetToken
< HcalFrontEndMap,
HcalFrontEndMapRcd
tok_FrontEndMap
 
edm::ESGetToken< HcalGains,
HcalGainsRcd
tok_Gains
 
edm::ESGetToken
< HcalGainWidths,
HcalGainWidthsRcd
tok_GainWidths
 
edm::ESGetToken
< HcalL1TriggerObjects,
HcalL1TriggerObjectsRcd
tok_L1TriggerObjects
 
edm::ESGetToken
< HcalLongRecoParams,
HcalLongRecoParamsRcd
tok_LongRecoParams
 
edm::ESGetToken< HcalLUTCorrs,
HcalLUTCorrsRcd
tok_LUTCorrs
 
edm::ESGetToken
< HcalLutMetadata,
HcalLutMetadataRcd
tok_LutMetadata
 
edm::ESGetToken< HcalMCParams,
HcalMCParamsRcd
tok_MCParams
 
edm::ESGetToken< HcalPedestals,
HcalPedestalsRcd
tok_Pedestals
 
edm::ESGetToken< HcalPedestals,
HcalPedestalsRcd
tok_Pedestals_effective
 
edm::ESGetToken
< HcalPedestalWidths,
HcalPedestalWidthsRcd
tok_PedestalWidths
 
edm::ESGetToken
< HcalPedestalWidths,
HcalPedestalWidthsRcd
tok_PedestalWidths_effective
 
edm::ESGetToken< HcalPFCorrs,
HcalPFCorrsRcd
tok_PFCorrs
 
edm::ESGetToken< HcalQIEData,
HcalQIEDataRcd
tok_QIEData
 
edm::ESGetToken< HcalQIETypes,
HcalQIETypesRcd
tok_QIETypes
 
edm::ESGetToken
< HcalRecoParams,
HcalRecoParamsRcd
tok_RecoParams
 
edm::ESGetToken< HcalRespCorrs,
HcalRespCorrsRcd
tok_RespCorrs
 
edm::ESGetToken
< HcalSiPMCharacteristics,
HcalSiPMCharacteristicsRcd
tok_SiPMCharacteristics
 
edm::ESGetToken
< HcalSiPMParameters,
HcalSiPMParametersRcd
tok_SiPMParameters
 
edm::ESGetToken< HcalTimeCorrs,
HcalTimeCorrsRcd
tok_TimeCorrs
 
edm::ESGetToken
< HcalTimingParams,
HcalTimingParamsRcd
tok_TimingParams
 
edm::ESGetToken
< HcalTPChannelParameters,
HcalTPChannelParametersRcd
tok_TPChannelParameters
 
edm::ESGetToken
< HcalTPParameters,
HcalTPParametersRcd
tok_TPParameters
 
edm::ESGetToken
< HcalValidationCorrs,
HcalValidationCorrsRcd
tok_ValidationCorrs
 
edm::ESGetToken
< HcalZDCLowGainFractions,
HcalZDCLowGainFractionsRcd
tok_ZDCLowGainFractions
 
edm::ESGetToken
< HcalZSThresholds,
HcalZSThresholdsRcd
tok_ZSThresholds
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 38 of file HcalDumpConditions.cc.

Constructor & Destructor Documentation

edmtest::HcalDumpConditions::HcalDumpConditions ( edm::ParameterSet const &  p)
inlineexplicit

Definition at line 40 of file HcalDumpConditions.cc.

References front, edm::ParameterSet::getUntrackedParameter(), m_tokdb, m_toktopo, mDumpRequest, AlCaHLTBitMon_QueryRunRegistry::string, tok_ChannelQuality, tok_DcsMap, tok_DcsValues, tok_ElectronicsMap, tok_FlagHFDigiTimeParams, tok_FrontEndMap, tok_Gains, tok_GainWidths, tok_L1TriggerObjects, tok_LongRecoParams, tok_LUTCorrs, tok_LutMetadata, tok_MCParams, tok_Pedestals, tok_Pedestals_effective, tok_PedestalWidths, tok_PedestalWidths_effective, tok_PFCorrs, tok_QIEData, tok_QIETypes, tok_RecoParams, tok_RespCorrs, tok_SiPMCharacteristics, tok_SiPMParameters, tok_TimeCorrs, tok_TimingParams, tok_TPChannelParameters, tok_TPParameters, tok_ValidationCorrs, tok_ZDCLowGainFractions, and tok_ZSThresholds.

40  {
41  front = p.getUntrackedParameter<std::string>("outFilePrefix", "Dump");
42  mDumpRequest = p.getUntrackedParameter<std::vector<std::string> >("dump", std::vector<std::string>());
43  m_toktopo = esConsumes<HcalTopology, HcalRecNumberingRecord>();
44  m_tokdb = esConsumes<HcalDbService, HcalDbRecord>();
45 
46  tok_ElectronicsMap = esConsumes<HcalElectronicsMap, HcalElectronicsMapRcd>();
47  tok_FrontEndMap = esConsumes<HcalFrontEndMap, HcalFrontEndMapRcd>();
48  tok_QIEData = esConsumes<HcalQIEData, HcalQIEDataRcd>();
49  tok_QIETypes = esConsumes<HcalQIETypes, HcalQIETypesRcd>();
50  tok_Pedestals = esConsumes<HcalPedestals, HcalPedestalsRcd>();
51  tok_PedestalWidths = esConsumes<HcalPedestalWidths, HcalPedestalWidthsRcd>();
52  tok_Pedestals_effective = esConsumes<HcalPedestals, HcalPedestalsRcd>(edm::ESInputTag("", "effective"));
54  esConsumes<HcalPedestalWidths, HcalPedestalWidthsRcd>(edm::ESInputTag("", "effective"));
55  tok_Gains = esConsumes<HcalGains, HcalGainsRcd>();
56  tok_GainWidths = esConsumes<HcalGainWidths, HcalGainWidthsRcd>();
57  tok_ChannelQuality = esConsumes<HcalChannelQuality, HcalChannelQualityRcd>();
58  tok_RespCorrs = esConsumes<HcalRespCorrs, HcalRespCorrsRcd>();
59  tok_ZSThresholds = esConsumes<HcalZSThresholds, HcalZSThresholdsRcd>();
60  tok_L1TriggerObjects = esConsumes<HcalL1TriggerObjects, HcalL1TriggerObjectsRcd>();
61  tok_TimeCorrs = esConsumes<HcalTimeCorrs, HcalTimeCorrsRcd>();
62  tok_LUTCorrs = esConsumes<HcalLUTCorrs, HcalLUTCorrsRcd>();
63  tok_PFCorrs = esConsumes<HcalPFCorrs, HcalPFCorrsRcd>();
64  tok_ValidationCorrs = esConsumes<HcalValidationCorrs, HcalValidationCorrsRcd>();
65  tok_LutMetadata = esConsumes<HcalLutMetadata, HcalLutMetadataRcd>();
66  tok_DcsValues = esConsumes<HcalDcsValues, HcalDcsRcd>();
67  tok_DcsMap = esConsumes<HcalDcsMap, HcalDcsMapRcd>();
68  tok_RecoParams = esConsumes<HcalRecoParams, HcalRecoParamsRcd>();
69  tok_TimingParams = esConsumes<HcalTimingParams, HcalTimingParamsRcd>();
70  tok_LongRecoParams = esConsumes<HcalLongRecoParams, HcalLongRecoParamsRcd>();
71  tok_ZDCLowGainFractions = esConsumes<HcalZDCLowGainFractions, HcalZDCLowGainFractionsRcd>();
72  tok_MCParams = esConsumes<HcalMCParams, HcalMCParamsRcd>();
73  tok_FlagHFDigiTimeParams = esConsumes<HcalFlagHFDigiTimeParams, HcalFlagHFDigiTimeParamsRcd>();
74  tok_SiPMParameters = esConsumes<HcalSiPMParameters, HcalSiPMParametersRcd>();
75  tok_SiPMCharacteristics = esConsumes<HcalSiPMCharacteristics, HcalSiPMCharacteristicsRcd>();
76  tok_TPChannelParameters = esConsumes<HcalTPChannelParameters, HcalTPChannelParametersRcd>();
77  tok_TPParameters = esConsumes<HcalTPParameters, HcalTPParametersRcd>();
78  }
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > tok_ChannelQuality
edm::ESGetToken< HcalPedestals, HcalPedestalsRcd > tok_Pedestals_effective
edm::ESGetToken< HcalDbService, HcalDbRecord > m_tokdb
edm::ESGetToken< HcalRespCorrs, HcalRespCorrsRcd > tok_RespCorrs
edm::ESGetToken< HcalQIETypes, HcalQIETypesRcd > tok_QIETypes
edm::ESGetToken< HcalPedestalWidths, HcalPedestalWidthsRcd > tok_PedestalWidths
edm::ESGetToken< HcalTimingParams, HcalTimingParamsRcd > tok_TimingParams
edm::ESGetToken< HcalZDCLowGainFractions, HcalZDCLowGainFractionsRcd > tok_ZDCLowGainFractions
edm::ESGetToken< HcalFrontEndMap, HcalFrontEndMapRcd > tok_FrontEndMap
edm::ESGetToken< HcalQIEData, HcalQIEDataRcd > tok_QIEData
edm::ESGetToken< HcalPedestalWidths, HcalPedestalWidthsRcd > tok_PedestalWidths_effective
edm::ESGetToken< HcalZSThresholds, HcalZSThresholdsRcd > tok_ZSThresholds
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > m_toktopo
edm::ESGetToken< HcalLUTCorrs, HcalLUTCorrsRcd > tok_LUTCorrs
edm::ESGetToken< HcalSiPMParameters, HcalSiPMParametersRcd > tok_SiPMParameters
edm::ESGetToken< HcalDcsValues, HcalDcsRcd > tok_DcsValues
edm::ESGetToken< HcalPedestals, HcalPedestalsRcd > tok_Pedestals
edm::ESGetToken< HcalPFCorrs, HcalPFCorrsRcd > tok_PFCorrs
edm::ESGetToken< HcalElectronicsMap, HcalElectronicsMapRcd > tok_ElectronicsMap
edm::ESGetToken< HcalSiPMCharacteristics, HcalSiPMCharacteristicsRcd > tok_SiPMCharacteristics
edm::ESGetToken< HcalLutMetadata, HcalLutMetadataRcd > tok_LutMetadata
edm::ESGetToken< HcalFlagHFDigiTimeParams, HcalFlagHFDigiTimeParamsRcd > tok_FlagHFDigiTimeParams
edm::ESGetToken< HcalDcsMap, HcalDcsMapRcd > tok_DcsMap
edm::ESGetToken< HcalTPChannelParameters, HcalTPChannelParametersRcd > tok_TPChannelParameters
edm::ESGetToken< HcalRecoParams, HcalRecoParamsRcd > tok_RecoParams
edm::ESGetToken< HcalGains, HcalGainsRcd > tok_Gains
std::vector< std::string > mDumpRequest
edm::ESGetToken< HcalGainWidths, HcalGainWidthsRcd > tok_GainWidths
edm::ESGetToken< HcalValidationCorrs, HcalValidationCorrsRcd > tok_ValidationCorrs
edm::ESGetToken< HcalLongRecoParams, HcalLongRecoParamsRcd > tok_LongRecoParams
edm::ESGetToken< HcalMCParams, HcalMCParamsRcd > tok_MCParams
edm::ESGetToken< HcalL1TriggerObjects, HcalL1TriggerObjectsRcd > tok_L1TriggerObjects
edm::ESGetToken< HcalTPParameters, HcalTPParametersRcd > tok_TPParameters
edm::ESGetToken< HcalTimeCorrs, HcalTimeCorrsRcd > tok_TimeCorrs
edmtest::HcalDumpConditions::HcalDumpConditions ( int  i)
inlineexplicit

Definition at line 80 of file HcalDumpConditions.cc.

80 {}
edmtest::HcalDumpConditions::~HcalDumpConditions ( )
inlineoverride

Definition at line 81 of file HcalDumpConditions.cc.

81 {}

Member Function Documentation

void edmtest::HcalDumpConditions::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 183 of file HcalDumpConditions.cc.

References visDQMUpload::context, gather_cfg::cout, alignCSCRings::e, edm::EventSetup::getData(), edm::EventBase::id(), m_toktopo, mDumpRequest, edm::EventID::run(), tok_ChannelQuality, tok_DcsMap, tok_DcsValues, tok_ElectronicsMap, tok_FlagHFDigiTimeParams, tok_FrontEndMap, tok_Gains, tok_GainWidths, tok_L1TriggerObjects, tok_LongRecoParams, tok_LUTCorrs, tok_LutMetadata, tok_MCParams, tok_Pedestals, tok_Pedestals_effective, tok_PedestalWidths, tok_PedestalWidths_effective, tok_PFCorrs, tok_QIEData, tok_QIETypes, tok_RecoParams, tok_RespCorrs, tok_SiPMCharacteristics, tok_SiPMParameters, tok_TimeCorrs, tok_TimingParams, tok_TPChannelParameters, tok_TPParameters, tok_ValidationCorrs, tok_ZDCLowGainFractions, and tok_ZSThresholds.

183  {
184  const HcalTopology* topo = &context.getData(m_toktopo);
185 
186  using namespace edm::eventsetup;
187  std::cout << "HcalDumpConditions::analyze-> I AM IN RUN NUMBER " << e.id().run() << std::endl;
188 
189  if (mDumpRequest.empty())
190  return;
191 
192  // dumpIt called for all possible ValueMaps. The function checks if the dump is actually requested.
193 
194  dumpIt<HcalElectronicsMap, HcalElectronicsMapRcd>(mDumpRequest, e, context, "ElectronicsMap", tok_ElectronicsMap);
195  dumpIt<HcalFrontEndMap, HcalFrontEndMapRcd>(mDumpRequest, e, context, "FrontEndMap", tok_FrontEndMap);
196  dumpIt<HcalQIEData, HcalQIEDataRcd>(mDumpRequest, e, context, "QIEData", topo, tok_QIEData);
197  dumpIt<HcalQIETypes, HcalQIETypesRcd>(mDumpRequest, e, context, "QIETypes", topo, tok_QIETypes);
198  dumpIt<HcalPedestals, HcalPedestalsRcd>(mDumpRequest, e, context, "Pedestals", topo, tok_Pedestals);
199  dumpIt<HcalPedestalWidths, HcalPedestalWidthsRcd>(
200  mDumpRequest, e, context, "PedestalWidths", topo, tok_PedestalWidths);
201  dumpIt<HcalPedestals, HcalPedestalsRcd>(
202  mDumpRequest, e, context, "EffectivePedestals", topo, tok_Pedestals_effective);
203  dumpIt<HcalPedestalWidths, HcalPedestalWidthsRcd>(
204  mDumpRequest, e, context, "EffectivePedestalWidths", topo, tok_PedestalWidths_effective);
205  dumpIt<HcalGains, HcalGainsRcd>(mDumpRequest, e, context, "Gains", topo, tok_Gains);
206  dumpIt<HcalGainWidths, HcalGainWidthsRcd>(mDumpRequest, e, context, "GainWidths", topo, tok_GainWidths);
207  dumpIt<HcalChannelQuality, HcalChannelQualityRcd>(
208  mDumpRequest, e, context, "ChannelQuality", topo, tok_ChannelQuality);
209  dumpIt<HcalRespCorrs, HcalRespCorrsRcd>(mDumpRequest, e, context, "RespCorrs", topo, tok_RespCorrs);
210  dumpIt<HcalZSThresholds, HcalZSThresholdsRcd>(mDumpRequest, e, context, "ZSThresholds", topo, tok_ZSThresholds);
211  dumpIt<HcalL1TriggerObjects, HcalL1TriggerObjectsRcd>(
212  mDumpRequest, e, context, "L1TriggerObjects", topo, tok_L1TriggerObjects);
213  dumpIt<HcalTimeCorrs, HcalTimeCorrsRcd>(mDumpRequest, e, context, "TimeCorrs", topo, tok_TimeCorrs);
214  dumpIt<HcalLUTCorrs, HcalLUTCorrsRcd>(mDumpRequest, e, context, "LUTCorrs", topo, tok_LUTCorrs);
215  dumpIt<HcalPFCorrs, HcalPFCorrsRcd>(mDumpRequest, e, context, "PFCorrs", topo, tok_PFCorrs);
216  dumpIt<HcalValidationCorrs, HcalValidationCorrsRcd>(
217  mDumpRequest, e, context, "ValidationCorrs", topo, tok_ValidationCorrs);
218  dumpIt<HcalLutMetadata, HcalLutMetadataRcd>(mDumpRequest, e, context, "LutMetadata", topo, tok_LutMetadata);
219  dumpIt<HcalDcsValues, HcalDcsRcd>(mDumpRequest, e, context, "DcsValues", tok_DcsValues);
220  dumpIt<HcalDcsMap, HcalDcsMapRcd>(mDumpRequest, e, context, "DcsMap", tok_DcsMap);
221  dumpIt<HcalRecoParams, HcalRecoParamsRcd>(mDumpRequest, e, context, "RecoParams", topo, tok_RecoParams);
222  dumpIt<HcalTimingParams, HcalTimingParamsRcd>(mDumpRequest, e, context, "TimingParams", topo, tok_TimingParams);
223  dumpIt<HcalLongRecoParams, HcalLongRecoParamsRcd>(
224  mDumpRequest, e, context, "LongRecoParams", topo, tok_LongRecoParams);
225  dumpIt<HcalZDCLowGainFractions, HcalZDCLowGainFractionsRcd>(
226  mDumpRequest, e, context, "ZDCLowGainFractions", topo, tok_ZDCLowGainFractions);
227  dumpIt<HcalMCParams, HcalMCParamsRcd>(mDumpRequest, e, context, "MCParams", topo, tok_MCParams);
228  dumpIt<HcalFlagHFDigiTimeParams, HcalFlagHFDigiTimeParamsRcd>(
229  mDumpRequest, e, context, "FlagHFDigiTimeParams", topo, tok_FlagHFDigiTimeParams);
230  dumpIt<HcalSiPMParameters, HcalSiPMParametersRcd>(
231  mDumpRequest, e, context, "SiPMParameters", topo, tok_SiPMParameters);
232  dumpIt<HcalSiPMCharacteristics, HcalSiPMCharacteristicsRcd>(
233  mDumpRequest, e, context, "SiPMCharacteristics", tok_SiPMCharacteristics);
234  dumpIt<HcalTPChannelParameters, HcalTPChannelParametersRcd>(
235  mDumpRequest, e, context, "TPChannelParameters", topo, tok_TPChannelParameters);
236  dumpIt<HcalTPParameters, HcalTPParametersRcd>(mDumpRequest, e, context, "TPParameters", tok_TPParameters);
237  }
RunNumber_t run() const
Definition: EventID.h:38
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > tok_ChannelQuality
edm::ESGetToken< HcalPedestals, HcalPedestalsRcd > tok_Pedestals_effective
edm::ESGetToken< HcalRespCorrs, HcalRespCorrsRcd > tok_RespCorrs
edm::ESGetToken< HcalQIETypes, HcalQIETypesRcd > tok_QIETypes
edm::ESGetToken< HcalPedestalWidths, HcalPedestalWidthsRcd > tok_PedestalWidths
edm::ESGetToken< HcalTimingParams, HcalTimingParamsRcd > tok_TimingParams
edm::ESGetToken< HcalZDCLowGainFractions, HcalZDCLowGainFractionsRcd > tok_ZDCLowGainFractions
edm::ESGetToken< HcalFrontEndMap, HcalFrontEndMapRcd > tok_FrontEndMap
edm::ESGetToken< HcalQIEData, HcalQIEDataRcd > tok_QIEData
edm::ESGetToken< HcalPedestalWidths, HcalPedestalWidthsRcd > tok_PedestalWidths_effective
edm::ESGetToken< HcalZSThresholds, HcalZSThresholdsRcd > tok_ZSThresholds
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > m_toktopo
edm::ESGetToken< HcalLUTCorrs, HcalLUTCorrsRcd > tok_LUTCorrs
edm::ESGetToken< HcalSiPMParameters, HcalSiPMParametersRcd > tok_SiPMParameters
edm::ESGetToken< HcalDcsValues, HcalDcsRcd > tok_DcsValues
edm::ESGetToken< HcalPedestals, HcalPedestalsRcd > tok_Pedestals
edm::ESGetToken< HcalPFCorrs, HcalPFCorrsRcd > tok_PFCorrs
edm::ESGetToken< HcalElectronicsMap, HcalElectronicsMapRcd > tok_ElectronicsMap
edm::ESGetToken< HcalSiPMCharacteristics, HcalSiPMCharacteristicsRcd > tok_SiPMCharacteristics
edm::ESGetToken< HcalLutMetadata, HcalLutMetadataRcd > tok_LutMetadata
edm::ESGetToken< HcalFlagHFDigiTimeParams, HcalFlagHFDigiTimeParamsRcd > tok_FlagHFDigiTimeParams
edm::ESGetToken< HcalDcsMap, HcalDcsMapRcd > tok_DcsMap
edm::ESGetToken< HcalTPChannelParameters, HcalTPChannelParametersRcd > tok_TPChannelParameters
edm::ESGetToken< HcalRecoParams, HcalRecoParamsRcd > tok_RecoParams
edm::ESGetToken< HcalGains, HcalGainsRcd > tok_Gains
std::vector< std::string > mDumpRequest
edm::ESGetToken< HcalGainWidths, HcalGainWidthsRcd > tok_GainWidths
edm::EventID id() const
Definition: EventBase.h:59
edm::ESGetToken< HcalValidationCorrs, HcalValidationCorrsRcd > tok_ValidationCorrs
edm::ESGetToken< HcalLongRecoParams, HcalLongRecoParamsRcd > tok_LongRecoParams
tuple cout
Definition: gather_cfg.py:144
edm::ESGetToken< HcalMCParams, HcalMCParamsRcd > tok_MCParams
edm::ESGetToken< HcalL1TriggerObjects, HcalL1TriggerObjectsRcd > tok_L1TriggerObjects
edm::ESGetToken< HcalTPParameters, HcalTPParametersRcd > tok_TPParameters
edm::ESGetToken< HcalTimeCorrs, HcalTimeCorrsRcd > tok_TimeCorrs
template<class S , class SRcd >
void edmtest::HcalDumpConditions::dumpIt ( const std::vector< std::string > &  mDumpRequest,
const edm::Event e,
const edm::EventSetup context,
const std::string  name,
const edm::ESGetToken< S, SRcd >  tok 
)

Definition at line 139 of file HcalDumpConditions.cc.

References gather_cfg::cout, spr::find(), edm::EventSetup::get(), edm::EventSetup::getData(), edm::IOVSyncValue::invalidIOVSyncValue(), mergeVDriftHistosByStation::name, and writeToFile().

143  {
144  if (std::find(mDumpRequest.begin(), mDumpRequest.end(), name) != mDumpRequest.end()) {
145  const S& myobject = context.getData(tok);
146 
147  writeToFile(myobject, e, name);
148 
149  if (context.get<SRcd>().validityInterval().first() == edm::IOVSyncValue::invalidIOVSyncValue())
150  std::cout << "error: invalid IOV sync value !" << std::endl;
151  }
152  }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
bool getData(T &iHolder) const
Definition: EventSetup.h:122
std::vector< std::string > mDumpRequest
T get() const
Definition: EventSetup.h:82
tuple cout
Definition: gather_cfg.py:144
static const IOVSyncValue & invalidIOVSyncValue()
Definition: IOVSyncValue.cc:78
void writeToFile(const S &myS, const edm::Event &e, const std::string name)
template<class S , class SRcd >
void edmtest::HcalDumpConditions::dumpIt ( const std::vector< std::string > &  mDumpRequest,
const edm::Event e,
const edm::EventSetup context,
const std::string  name,
const HcalTopology topo,
const edm::ESGetToken< S, SRcd >  tok 
)

Definition at line 155 of file HcalDumpConditions.cc.

References gather_cfg::cout, spr::find(), edm::EventSetup::get(), edm::EventSetup::getData(), edm::IOVSyncValue::invalidIOVSyncValue(), mergeVDriftHistosByStation::name, and writeToFile().

160  {
161  if (std::find(mDumpRequest.begin(), mDumpRequest.end(), name) != mDumpRequest.end()) {
162  S myobject = context.getData(tok);
163  if (topo)
164  myobject.setTopo(topo);
165 
166  writeToFile(myobject, e, name);
167 
168  if (context.get<SRcd>().validityInterval().first() == edm::IOVSyncValue::invalidIOVSyncValue())
169  std::cout << "error: invalid IOV sync value !" << std::endl;
170  }
171  }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
bool getData(T &iHolder) const
Definition: EventSetup.h:122
std::vector< std::string > mDumpRequest
T get() const
Definition: EventSetup.h:82
tuple cout
Definition: gather_cfg.py:144
static const IOVSyncValue & invalidIOVSyncValue()
Definition: IOVSyncValue.cc:78
void writeToFile(const S &myS, const edm::Event &e, const std::string name)
template<class S >
void edmtest::HcalDumpConditions::writeToFile ( const S myS,
const edm::Event e,
const std::string  name 
)

Definition at line 174 of file HcalDumpConditions.cc.

References gather_cfg::cout, HcalDbASCIIIO::dumpObject(), mergeVDriftHistosByStation::file, front, edm::EventBase::id(), and edm::EventID::run().

Referenced by dumpIt().

174  {
175  int myrun = e.id().run();
176  std::ostringstream file;
177  file << front << name.c_str() << "_Run" << myrun << ".txt";
178  std::ofstream outStream(file.str().c_str());
179  std::cout << "HcalDumpConditions: ---- Dumping " << name << " ----" << std::endl;
180  HcalDbASCIIIO::dumpObject(outStream, myS);
181  }
RunNumber_t run() const
Definition: EventID.h:38
edm::EventID id() const
Definition: EventBase.h:59
bool dumpObject(std::ostream &fOutput, const HcalPedestals &fObject)
tuple cout
Definition: gather_cfg.py:144

Member Data Documentation

std::string edmtest::HcalDumpConditions::front
private

Definition at line 101 of file HcalDumpConditions.cc.

Referenced by HcalDumpConditions(), and writeToFile().

edm::ESGetToken<HcalDbService, HcalDbRecord> edmtest::HcalDumpConditions::m_tokdb
private

Definition at line 104 of file HcalDumpConditions.cc.

Referenced by HcalDumpConditions().

edm::ESGetToken<HcalTopology, HcalRecNumberingRecord> edmtest::HcalDumpConditions::m_toktopo
private

Definition at line 103 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

std::vector<std::string> edmtest::HcalDumpConditions::mDumpRequest
private

Definition at line 102 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalChannelQuality, HcalChannelQualityRcd> edmtest::HcalDumpConditions::tok_ChannelQuality
private

Definition at line 115 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalDcsMap, HcalDcsMapRcd> edmtest::HcalDumpConditions::tok_DcsMap
private

Definition at line 125 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalDcsValues, HcalDcsRcd> edmtest::HcalDumpConditions::tok_DcsValues
private

Definition at line 124 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalElectronicsMap, HcalElectronicsMapRcd> edmtest::HcalDumpConditions::tok_ElectronicsMap
private

Definition at line 105 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalFlagHFDigiTimeParams, HcalFlagHFDigiTimeParamsRcd> edmtest::HcalDumpConditions::tok_FlagHFDigiTimeParams
private

Definition at line 131 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalFrontEndMap, HcalFrontEndMapRcd> edmtest::HcalDumpConditions::tok_FrontEndMap
private

Definition at line 106 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalGains, HcalGainsRcd> edmtest::HcalDumpConditions::tok_Gains
private

Definition at line 113 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalGainWidths, HcalGainWidthsRcd> edmtest::HcalDumpConditions::tok_GainWidths
private

Definition at line 114 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalL1TriggerObjects, HcalL1TriggerObjectsRcd> edmtest::HcalDumpConditions::tok_L1TriggerObjects
private

Definition at line 118 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalLongRecoParams, HcalLongRecoParamsRcd> edmtest::HcalDumpConditions::tok_LongRecoParams
private

Definition at line 128 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalLUTCorrs, HcalLUTCorrsRcd> edmtest::HcalDumpConditions::tok_LUTCorrs
private

Definition at line 120 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalLutMetadata, HcalLutMetadataRcd> edmtest::HcalDumpConditions::tok_LutMetadata
private

Definition at line 123 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalMCParams, HcalMCParamsRcd> edmtest::HcalDumpConditions::tok_MCParams
private

Definition at line 130 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalPedestals, HcalPedestalsRcd> edmtest::HcalDumpConditions::tok_Pedestals
private

Definition at line 109 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalPedestals, HcalPedestalsRcd> edmtest::HcalDumpConditions::tok_Pedestals_effective
private

Definition at line 111 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalPedestalWidths, HcalPedestalWidthsRcd> edmtest::HcalDumpConditions::tok_PedestalWidths
private

Definition at line 110 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalPedestalWidths, HcalPedestalWidthsRcd> edmtest::HcalDumpConditions::tok_PedestalWidths_effective
private

Definition at line 112 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalPFCorrs, HcalPFCorrsRcd> edmtest::HcalDumpConditions::tok_PFCorrs
private

Definition at line 121 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalQIEData, HcalQIEDataRcd> edmtest::HcalDumpConditions::tok_QIEData
private

Definition at line 107 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalQIETypes, HcalQIETypesRcd> edmtest::HcalDumpConditions::tok_QIETypes
private

Definition at line 108 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalRecoParams, HcalRecoParamsRcd> edmtest::HcalDumpConditions::tok_RecoParams
private

Definition at line 126 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalRespCorrs, HcalRespCorrsRcd> edmtest::HcalDumpConditions::tok_RespCorrs
private

Definition at line 116 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalSiPMCharacteristics, HcalSiPMCharacteristicsRcd> edmtest::HcalDumpConditions::tok_SiPMCharacteristics
private

Definition at line 133 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalSiPMParameters, HcalSiPMParametersRcd> edmtest::HcalDumpConditions::tok_SiPMParameters
private

Definition at line 132 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalTimeCorrs, HcalTimeCorrsRcd> edmtest::HcalDumpConditions::tok_TimeCorrs
private

Definition at line 119 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalTimingParams, HcalTimingParamsRcd> edmtest::HcalDumpConditions::tok_TimingParams
private

Definition at line 127 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalTPChannelParameters, HcalTPChannelParametersRcd> edmtest::HcalDumpConditions::tok_TPChannelParameters
private

Definition at line 134 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalTPParameters, HcalTPParametersRcd> edmtest::HcalDumpConditions::tok_TPParameters
private

Definition at line 135 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalValidationCorrs, HcalValidationCorrsRcd> edmtest::HcalDumpConditions::tok_ValidationCorrs
private

Definition at line 122 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalZDCLowGainFractions, HcalZDCLowGainFractionsRcd> edmtest::HcalDumpConditions::tok_ZDCLowGainFractions
private

Definition at line 129 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().

edm::ESGetToken<HcalZSThresholds, HcalZSThresholdsRcd> edmtest::HcalDumpConditions::tok_ZSThresholds
private

Definition at line 117 of file HcalDumpConditions.cc.

Referenced by analyze(), and HcalDumpConditions().