Public Member Functions | |
virtual void | analyze (const edm::Event &e, const edm::EventSetup &c) |
template<class S , class SRcd > | |
void | dumpIt (S *myS, SRcd *mySRcd, const edm::Event &e, const edm::EventSetup &context, std::string name) |
HcalDumpConditions (int i) | |
HcalDumpConditions (edm::ParameterSet const &p) | |
virtual | ~HcalDumpConditions () |
Private Attributes | |
std::string | front |
std::vector< std::string > | mDumpRequest |
Definition at line 41 of file HcalDumpConditions.cc.
edmtest::HcalDumpConditions::HcalDumpConditions | ( | edm::ParameterSet const & | p | ) | [inline, explicit] |
Definition at line 44 of file HcalDumpConditions.cc.
References front, edm::ParameterSet::getUntrackedParameter(), mDumpRequest, and AlCaHLTBitMon_QueryRunRegistry::string.
{ front = p.getUntrackedParameter<std::string>("outFilePrefix","Dump"); mDumpRequest = p.getUntrackedParameter <std::vector <std::string> > ("dump", std::vector<std::string>()); }
edmtest::HcalDumpConditions::HcalDumpConditions | ( | int | i | ) | [inline, explicit] |
Definition at line 50 of file HcalDumpConditions.cc.
{ }
virtual edmtest::HcalDumpConditions::~HcalDumpConditions | ( | ) | [inline, virtual] |
Definition at line 52 of file HcalDumpConditions.cc.
{ }
void edmtest::HcalDumpConditions::analyze | ( | const edm::Event & | e, |
const edm::EventSetup & | c | ||
) | [virtual] |
Implements edm::EDAnalyzer.
Definition at line 84 of file HcalDumpConditions.cc.
References gather_cfg::cout, dumpIt(), alignCSCRings::e, spr::find(), edm::EventSetup::get(), edm::EventBase::id(), mDumpRequest, edm::EventID::run(), and AlCaHLTBitMon_QueryRunRegistry::string.
{ edm::ESHandle<HcalTopology> topology ; context.get<IdealGeometryRecord>().get( topology ); using namespace edm::eventsetup; std::cout <<"HcalDumpConditions::analyze-> I AM IN RUN NUMBER "<<e.id().run() <<std::endl; if (mDumpRequest.empty()) return; if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("ElectronicsMap")) != mDumpRequest.end()) dumpIt(new HcalElectronicsMap, new HcalElectronicsMapRcd, e,context,"ElectronicsMap"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("QIEData")) != mDumpRequest.end()) dumpIt(new HcalQIEData(&(*topology)), new HcalQIEDataRcd, e,context,"QIEData"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("Pedestals")) != mDumpRequest.end()) dumpIt(new HcalPedestals(&(*topology)), new HcalPedestalsRcd, e,context,"Pedestals"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("PedestalWidths")) != mDumpRequest.end()) dumpIt(new HcalPedestalWidths(&(*topology)), new HcalPedestalWidthsRcd, e,context,"PedestalWidths"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("Gains")) != mDumpRequest.end()) dumpIt(new HcalGains(&(*topology)), new HcalGainsRcd, e,context,"Gains"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("GainWidths")) != mDumpRequest.end()) dumpIt(new HcalGainWidths(&(*topology)), new HcalGainWidthsRcd, e,context,"GainWidths"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("ChannelQuality")) != mDumpRequest.end()) dumpIt(new HcalChannelQuality(&(*topology)), new HcalChannelQualityRcd, e,context,"ChannelQuality"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("RespCorrs")) != mDumpRequest.end()) dumpIt(new HcalRespCorrs(&(*topology)), new HcalRespCorrsRcd, e,context,"RespCorrs"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("ZSThresholds")) != mDumpRequest.end()) dumpIt(new HcalZSThresholds(&(*topology)), new HcalZSThresholdsRcd, e,context,"ZSThresholds"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("L1TriggerObjects")) != mDumpRequest.end()) dumpIt(new HcalL1TriggerObjects(&(*topology)), new HcalL1TriggerObjectsRcd, e,context,"L1TriggerObjects"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("TimeCorrs")) != mDumpRequest.end()) dumpIt(new HcalTimeCorrs(&(*topology)), new HcalTimeCorrsRcd, e,context,"TimeCorrs"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("LUTCorrs")) != mDumpRequest.end()) dumpIt(new HcalLUTCorrs(&(*topology)), new HcalLUTCorrsRcd, e,context,"LUTCorrs"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("PFCorrs")) != mDumpRequest.end()) dumpIt(new HcalPFCorrs(&(*topology)), new HcalPFCorrsRcd, e,context,"PFCorrs"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("ValidationCorrs")) != mDumpRequest.end()) dumpIt(new HcalValidationCorrs(&(*topology)), new HcalValidationCorrsRcd, e,context,"ValidationCorrs"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("LutMetadata")) != mDumpRequest.end()) dumpIt(new HcalLutMetadata(&(*topology)), new HcalLutMetadataRcd, e,context,"LutMetadata"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("DcsValues")) != mDumpRequest.end()) dumpIt(new HcalDcsValues, new HcalDcsRcd, e,context,"DcsValues"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("DcsMap")) != mDumpRequest.end()) dumpIt(new HcalDcsMap, new HcalDcsMapRcd, e,context,"DcsMap"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("CholeskyMatrices")) != mDumpRequest.end()) dumpIt(new HcalCholeskyMatrices(&(*topology)), new HcalCholeskyMatricesRcd, e,context,"CholeskyMatrices"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("RecoParams")) != mDumpRequest.end()) dumpIt(new HcalRecoParams(&(*topology)), new HcalRecoParamsRcd, e,context,"RecoParams"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("TimingParams")) != mDumpRequest.end()) dumpIt(new HcalTimingParams(&(*topology)), new HcalTimingParamsRcd, e,context,"TimingParams"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("LongRecoParams")) != mDumpRequest.end()) dumpIt(new HcalLongRecoParams(&(*topology)), new HcalLongRecoParamsRcd, e,context,"LongRecoParams"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("MCParams")) != mDumpRequest.end()) dumpIt(new HcalMCParams(&(*topology)), new HcalMCParamsRcd, e,context,"MCParams"); if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("FlagHFDigiTimeParams")) != mDumpRequest.end()) dumpIt(new HcalFlagHFDigiTimeParams(&(*topology)), new HcalFlagHFDigiTimeParamsRcd, e,context,"FlagHFDigiTimeParams"); }
void edmtest::HcalDumpConditions::dumpIt | ( | S * | myS, |
SRcd * | mySRcd, | ||
const edm::Event & | e, | ||
const edm::EventSetup & | context, | ||
std::string | name | ||
) |
Definition at line 64 of file HcalDumpConditions.cc.
References gather_cfg::cout, CastorDbASCIIIO::dumpObject(), mergeVDriftHistosByStation::file, front, edm::EventSetup::get(), edm::EventBase::id(), edm::IOVSyncValue::invalidIOVSyncValue(), AlCaHLTBitMon_ParallelJobs::p, edm::ESHandle< T >::product(), and edm::EventID::run().
Referenced by analyze().
{ int myrun = e.id().run(); edm::ESHandle<S> p; context.get<SRcd>().get(p); S* myobject = new S(*p.product()); std::ostringstream file; file << front << name.c_str() << "_Run" << myrun << ".txt"; std::ofstream outStream(file.str().c_str() ); std::cout << "HcalDumpConditions: ---- Dumping " << name.c_str() << " ----" << std::endl; HcalDbASCIIIO::dumpObject (outStream, (*myobject) ); if ( context.get<SRcd>().validityInterval().first() == edm::IOVSyncValue::invalidIOVSyncValue() ) std::cout << "error: invalid IOV sync value !" << std::endl; }
std::string edmtest::HcalDumpConditions::front [private] |
Definition at line 58 of file HcalDumpConditions.cc.
Referenced by dumpIt(), and HcalDumpConditions().
std::vector<std::string> edmtest::HcalDumpConditions::mDumpRequest [private] |
Definition at line 59 of file HcalDumpConditions.cc.
Referenced by analyze(), and HcalDumpConditions().