54 template<
class S,
class SRcd>
void dumpIt(
const std::vector<std::string>&
mDumpRequest,
60 template<
class S,
class SRcd>
void dumpIt(
const std::vector<std::string>& mDumpRequest,
72 template<
class S,
class SRcd>
80 if (
std::find (mDumpRequest.begin(), mDumpRequest.end(),
name) != mDumpRequest.end())
83 if(!label.empty()) context.
get<SRcd>().get(label, p);
84 else context.
get<SRcd>().
get(p);
86 if( topo ) myobject.setTopo(topo);
91 std::cout <<
"error: invalid IOV sync value !" << std::endl;
96 template<
class S,
class SRcd>
102 if (
std::find (mDumpRequest.begin(), mDumpRequest.end(),
name) != mDumpRequest.end())
105 context.
get<SRcd>().
get(p);
111 std::cout <<
"error: invalid IOV sync value !" << std::endl;
116 int myrun = e.
id().
run();
117 std::ostringstream
file;
118 file <<
front << name.c_str() <<
"_Run" << myrun <<
".txt";
119 std::ofstream outStream(file.str().c_str() );
120 std::cout <<
"HcalDumpConditions: ---- Dumping " << name <<
" ----" << std::endl;
132 std::cout <<
"HcalDumpConditions::analyze-> I AM IN RUN NUMBER "<<e.
id().
run() <<std::endl;
137 dumpIt<HcalElectronicsMap, HcalElectronicsMapRcd> (
mDumpRequest,
e, context,
"ElectronicsMap" );
138 dumpIt<HcalFrontEndMap, HcalFrontEndMapRcd> (
mDumpRequest,
e, context,
"FrontEndMap" );
139 dumpIt<HcalQIEData, HcalQIEDataRcd> (
mDumpRequest,
e, context,
"QIEData", topo);
140 dumpIt<HcalQIETypes, HcalQIETypesRcd> (
mDumpRequest,
e, context,
"QIETypes", topo);
141 dumpIt<HcalPedestals, HcalPedestalsRcd> (
mDumpRequest,
e, context,
"Pedestals", topo);
142 dumpIt<HcalPedestalWidths, HcalPedestalWidthsRcd> (
mDumpRequest,
e, context,
"PedestalWidths", topo);
143 dumpIt<HcalPedestals, HcalPedestalsRcd> (
mDumpRequest,
e, context,
"EffectivePedestals", topo,
"effective");
144 dumpIt<HcalPedestalWidths, HcalPedestalWidthsRcd> (
mDumpRequest,
e, context,
"EffectivePedestalWidths", topo,
"effective");
145 dumpIt<HcalGains, HcalGainsRcd> (
mDumpRequest,
e, context,
"Gains", topo);
146 dumpIt<HcalGainWidths, HcalGainWidthsRcd> (
mDumpRequest,
e, context,
"GainWidths", topo);
147 dumpIt<HcalChannelQuality, HcalChannelQualityRcd> (
mDumpRequest,
e, context,
"ChannelQuality", topo,
"withTopo" );
148 dumpIt<HcalRespCorrs, HcalRespCorrsRcd> (
mDumpRequest,
e, context,
"RespCorrs", topo);
149 dumpIt<HcalZSThresholds, HcalZSThresholdsRcd> (
mDumpRequest,
e, context,
"ZSThresholds", topo);
150 dumpIt<HcalL1TriggerObjects, HcalL1TriggerObjectsRcd> (
mDumpRequest,
e, context,
"L1TriggerObjects", topo);
151 dumpIt<HcalTimeCorrs, HcalTimeCorrsRcd> (
mDumpRequest,
e, context,
"TimeCorrs", topo);
152 dumpIt<HcalLUTCorrs, HcalLUTCorrsRcd> (
mDumpRequest,
e, context,
"LUTCorrs", topo);
153 dumpIt<HcalPFCorrs, HcalPFCorrsRcd> (
mDumpRequest,
e, context,
"PFCorrs", topo);
154 dumpIt<HcalValidationCorrs, HcalValidationCorrsRcd> (
mDumpRequest,
e, context,
"ValidationCorrs", topo);
155 dumpIt<HcalLutMetadata, HcalLutMetadataRcd> (
mDumpRequest,
e, context,
"LutMetadata", topo);
156 dumpIt<HcalDcsValues, HcalDcsRcd> (
mDumpRequest,
e, context,
"DcsValues" );
157 dumpIt<HcalDcsMap, HcalDcsMapRcd> (
mDumpRequest,
e, context,
"DcsMap" );
158 dumpIt<HcalRecoParams, HcalRecoParamsRcd> (
mDumpRequest,
e, context,
"RecoParams", topo);
159 dumpIt<HcalTimingParams, HcalTimingParamsRcd> (
mDumpRequest,
e, context,
"TimingParams", topo);
160 dumpIt<HcalLongRecoParams, HcalLongRecoParamsRcd> (
mDumpRequest,
e, context,
"LongRecoParams", topo);
161 dumpIt<HcalZDCLowGainFractions, HcalZDCLowGainFractionsRcd> (
mDumpRequest,
e, context,
"ZDCLowGainFractions", topo);
162 dumpIt<HcalMCParams, HcalMCParamsRcd> (
mDumpRequest,
e, context,
"MCParams", topo);
163 dumpIt<HcalFlagHFDigiTimeParams, HcalFlagHFDigiTimeParamsRcd>(
mDumpRequest,
e, context,
"FlagHFDigiTimeParams", topo);
164 dumpIt<HcalSiPMParameters, HcalSiPMParametersRcd> (
mDumpRequest,
e, context,
"SiPMParameters", topo);
165 dumpIt<HcalSiPMCharacteristics, HcalSiPMCharacteristicsRcd> (
mDumpRequest,
e, context,
"SiPMCharacteristics" );
166 dumpIt<HcalTPChannelParameters, HcalTPChannelParametersRcd> (
mDumpRequest,
e, context,
"TPChannelParameters", topo);
167 dumpIt<HcalTPParameters, HcalTPParametersRcd> (
mDumpRequest,
e, context,
"TPParameters" );
170 if (
std::find (mDumpRequest.begin(), mDumpRequest.end(),
std::string (
"CalibrationsSet")) != mDumpRequest.end()
171 ||
std::find (mDumpRequest.begin(), mDumpRequest.end(),
std::string (
"CalibrationWidthsSet")) != mDumpRequest.end())
174 if (
std::find (mDumpRequest.begin(), mDumpRequest.end(),
std::string (
"CalibrationsSet")) != mDumpRequest.end()){
175 writeToFile(*pSetup->getHcalCalibrationsSet(),
e,
"CalibrationsSet");
177 if (
std::find (mDumpRequest.begin(), mDumpRequest.end(),
std::string (
"CalibrationWidthsSet")) != mDumpRequest.end()){
178 writeToFile(*pSetup->getHcalCalibrationWidthsSet(),
e,
"CalibrationWidthsSet");
T getUntrackedParameter(std::string const &, T const &) const
CaloTopology const * topology(0)
#define DEFINE_FWK_MODULE(type)
void dumpIt(const std::vector< std::string > &mDumpRequest, const edm::Event &e, const edm::EventSetup &context, const std::string name, const HcalTopology *topo, const std::string label="")
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
HcalDumpConditions(edm::ParameterSet const &p)
HcalDumpConditions(int i)
std::vector< std::string > mDumpRequest
bool dumpObject(std::ostream &fOutput, const HcalPedestals &fObject)
void analyze(const edm::Event &e, const edm::EventSetup &c) override
T const * product() const
~HcalDumpConditions() override
static const IOVSyncValue & invalidIOVSyncValue()
void writeToFile(const S &myS, const edm::Event &e, const std::string name)