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
 
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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
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
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Class to print out information on current geometry.

Definition at line 33 of file CTPPSRPAlignmentInfoAnalyzer.cc.

Constructor & Destructor Documentation

◆ CTPPSRPAlignmentInfoAnalyzer()

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

Definition at line 56 of file CTPPSRPAlignmentInfoAnalyzer.cc.

57  {
58  record_ = iConfig.getParameter<string>("record");
59  iov_ = iConfig.getParameter<unsigned long long>("iov");

References edm::ParameterSet::getParameter().

◆ ~CTPPSRPAlignmentInfoAnalyzer()

CTPPSRPAlignmentInfoAnalyzer::~CTPPSRPAlignmentInfoAnalyzer ( )
inlineoverride

Definition at line 42 of file CTPPSRPAlignmentInfoAnalyzer.cc.

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 63 of file CTPPSRPAlignmentInfoAnalyzer.cc.

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;

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

◆ printInfo()

void CTPPSRPAlignmentInfoAnalyzer::printInfo ( const CTPPSRPAlignmentCorrectionsData alignments,
const edm::Event event 
) const
private

Definition at line 84 of file CTPPSRPAlignmentInfoAnalyzer.cc.

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;

Member Data Documentation

◆ iov_

cond::Time_t CTPPSRPAlignmentInfoAnalyzer::iov_
private

Definition at line 50 of file CTPPSRPAlignmentInfoAnalyzer.cc.

◆ record_

std::string CTPPSRPAlignmentInfoAnalyzer::record_
private

Definition at line 51 of file CTPPSRPAlignmentInfoAnalyzer.cc.

◆ watcherAlignments_

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

Definition at line 48 of file CTPPSRPAlignmentInfoAnalyzer.cc.

edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
CTPPSRPAlignmentCorrectionsDataRcd
Definition: CTPPSRPAlignmentCorrectionsDataRcd.h:23
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
RPMisalignedAlignmentRecord
Definition: RPMisalignedAlignmentRecord.h:6
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
RPRealAlignmentRecord
Definition: RPRealAlignmentRecord.h:6
edm::ESHandle
Definition: DTSurvey.h:22
CTPPSRPAlignmentInfoAnalyzer::watcherAlignments_
edm::ESWatcher< CTPPSRPAlignmentCorrectionsDataRcd > watcherAlignments_
Definition: CTPPSRPAlignmentInfoAnalyzer.cc:48
CTPPSRPAlignmentInfoAnalyzer::iov_
cond::Time_t iov_
Definition: CTPPSRPAlignmentInfoAnalyzer.cc:50
CTPPSRPAlignmentInfoAnalyzer::record_
std::string record_
Definition: CTPPSRPAlignmentInfoAnalyzer.cc:51
edm::Service< cond::service::PoolDBOutputService >
get
#define get
cond::service::PoolDBOutputService::writeOne
Hash writeOne(const T *payload, Time_t time, const std::string &recordName)
Definition: PoolDBOutputService.h:63
CTPPSRPAlignmentCorrectionsData
Container for CTPPS RP alignment corrections. The corrections are stored on two levels - RP and senso...
Definition: CTPPSRPAlignmentCorrectionsData.h:24