61 template<
class S,
class SRcd>
void dumpIt(
const std::vector<std::string>&
mDumpRequest,
90 if (mDumpRequest.empty()) {
91 throw cms::Exception(
"Bad Config") <<
"CastorDumpConditions: No record to dump.";
109 log <<
"I AM IN THE RUN " << iEvent.
id().
run() <<
"\n";
110 log <<
"What to dump? "<< std::endl;
112 log<<
"CastorDumpConditions: Empty request \n";
118 LogAbsolute(
"CastorDumpConditions") << *it <<
"\n";
121 dumpIt<CastorElectronicsMap , CastorElectronicsMapRcd> (
mDumpRequest,
iEvent,iSetup,
"ElectronicsMap" );
123 dumpIt<CastorPedestals , CastorPedestalsRcd> (
mDumpRequest,
iEvent,iSetup,
"Pedestals" );
124 dumpIt<CastorPedestalWidths , CastorPedestalWidthsRcd> (
mDumpRequest,
iEvent,iSetup,
"PedestalWidths" );
126 dumpIt<CastorGainWidths , CastorGainWidthsRcd> (
mDumpRequest,
iEvent,iSetup,
"GainWidths" );
127 dumpIt<CastorChannelQuality , CastorChannelQualityRcd> (
mDumpRequest,
iEvent,iSetup,
"ChannelQuality" );
128 dumpIt<CastorRecoParams , CastorRecoParamsRcd> (
mDumpRequest,
iEvent,iSetup,
"RecoParams" );
129 dumpIt<CastorSaturationCorrs, CastorSaturationCorrsRcd>(
mDumpRequest,
iEvent,iSetup,
"SaturationCorrs");
133 template<
class S,
class SRcd>
138 if (
std::find (mDumpRequest.begin(), mDumpRequest.end(),
name) != mDumpRequest.end())
140 int myrun = e.
id().
run();
142 context.
get<SRcd>().
get(p);
145 std::ostringstream
file;
146 file <<
file_prefix << name.c_str() <<
"_Run" << myrun <<
".txt";
147 std::ofstream outStream(file.str().c_str() );
T getUntrackedParameter(std::string const &, T const &) const
void analyze(const edm::Event &, const edm::EventSetup &) override
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
#define DEFINE_FWK_MODULE(type)
std::vector< std::string > mDumpRequest
void dumpIt(const std::vector< std::string > &mDumpRequest, const edm::Event &e, const edm::EventSetup &context, const std::string name)
bool dumpObject(std::ostream &fOutput, const CastorPedestals &fObject)
CastorDumpConditions(const edm::ParameterSet &)
T const * product() const