CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
CTPPSRPAlignmentInfoAnalyzer Class Reference

Class to print out information on current geometry. More...

Inheritance diagram for CTPPSRPAlignmentInfoAnalyzer:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 CTPPSRPAlignmentInfoAnalyzer (const edm::ParameterSet &ps)
 
 ~CTPPSRPAlignmentInfoAnalyzer () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () 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
 
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::vector< ModuleDescription const * > &modules, 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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &es) override
 
void printInfo (const CTPPSRPAlignmentCorrectionsData &alignments, const edm::Event &event) const
 

Private Attributes

cond::Time_t iov_
 
std::string record_
 
edm::ESWatcher< CTPPSRPAlignmentCorrectionsDataRcdwatcherAlignments_
 

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)
 
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<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)
 

Detailed Description

Class to print out information on current geometry.

Definition at line 34 of file CTPPSRPAlignmentInfoAnalyzer.cc.

Constructor & Destructor Documentation

CTPPSRPAlignmentInfoAnalyzer::CTPPSRPAlignmentInfoAnalyzer ( const edm::ParameterSet ps)

Definition at line 57 of file CTPPSRPAlignmentInfoAnalyzer.cc.

References edm::ParameterSet::getParameter(), iov_, and record_.

57  {
58  record_ = iConfig.getParameter<string>("record");
59  iov_ = iConfig.getParameter<unsigned long long>("iov");
60 }
CTPPSRPAlignmentInfoAnalyzer::~CTPPSRPAlignmentInfoAnalyzer ( )
inlineoverride

Definition at line 37 of file CTPPSRPAlignmentInfoAnalyzer.cc.

References analyze(), MillePedeFileConverter_cfg::e, and printInfo().

37 {}

Member Function Documentation

void CTPPSRPAlignmentInfoAnalyzer::analyze ( const edm::Event e,
const edm::EventSetup es 
)
overrideprivate

Definition at line 64 of file CTPPSRPAlignmentInfoAnalyzer.cc.

References edm::ESWatcher< T >::check(), edm::EventSetup::get(), iov_, edm::Service< T >::isAvailable(), edm::ESHandle< T >::product(), record_, watcherAlignments_, and cond::service::PoolDBOutputService::writeOne().

Referenced by ~CTPPSRPAlignmentInfoAnalyzer().

64  {
66  if (watcherAlignments_.check(iSetup)) {
67  if (strcmp(record_.c_str(), "CTPPSRPAlignmentCorrectionsDataRcd") == 0) {
68  iSetup.get<CTPPSRPAlignmentCorrectionsDataRcd>().get(alignments);
69  } else if (strcmp(record_.c_str(), "RPRealAlignmentRecord") == 0) {
70  iSetup.get<RPRealAlignmentRecord>().get(alignments);
71  } else {
72  iSetup.get<RPMisalignedAlignmentRecord>().get(alignments);
73  }
74  const CTPPSRPAlignmentCorrectionsData* pCTPPSRPAlignmentCorrectionsData = alignments.product();
76  if (poolDbService.isAvailable()) {
77  poolDbService->writeOne(pCTPPSRPAlignmentCorrectionsData, iov_, record_);
78  }
79  }
80  return;
81 }
bool isAvailable() const
Definition: Service.h:40
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
Container for CTPPS RP alignment corrections. The corrections are stored on two levels - RP and senso...
edm::ESWatcher< CTPPSRPAlignmentCorrectionsDataRcd > watcherAlignments_
T const * product() const
Definition: ESHandle.h:86
void CTPPSRPAlignmentInfoAnalyzer::printInfo ( const CTPPSRPAlignmentCorrectionsData alignments,
const edm::Event event 
) const
private

Definition at line 85 of file CTPPSRPAlignmentInfoAnalyzer.cc.

References DEFINE_FWK_MODULE.

Referenced by ~CTPPSRPAlignmentInfoAnalyzer().

86  {
87  time_t unixTime = event.time().unixTime();
88  char timeStr[50];
89  strftime(timeStr, 50, "%F %T", localtime(&unixTime));
90 
91  edm::LogInfo("CTPPSRPAlignmentInfoAnalyzer")
92  << "New alignments found in run=" << event.id().run() << ", event=" << event.id().event()
93  << ", UNIX timestamp=" << unixTime << " (" << timeStr << "):\n"
94  << alignments;
95 }

Member Data Documentation

cond::Time_t CTPPSRPAlignmentInfoAnalyzer::iov_
private

Definition at line 45 of file CTPPSRPAlignmentInfoAnalyzer.cc.

Referenced by analyze(), and CTPPSRPAlignmentInfoAnalyzer().

std::string CTPPSRPAlignmentInfoAnalyzer::record_
private

Definition at line 46 of file CTPPSRPAlignmentInfoAnalyzer.cc.

Referenced by analyze(), and CTPPSRPAlignmentInfoAnalyzer().

edm::ESWatcher<CTPPSRPAlignmentCorrectionsDataRcd> CTPPSRPAlignmentInfoAnalyzer::watcherAlignments_
private

Definition at line 43 of file CTPPSRPAlignmentInfoAnalyzer.cc.

Referenced by analyze().