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
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
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::ESGetToken< CTPPSRPAlignmentCorrectionsData, CTPPSRPAlignmentCorrectionsDataRcdtokenAlignmentIdeal_
 
edm::ESGetToken< CTPPSRPAlignmentCorrectionsData, RPMisalignedAlignmentRecordtokenAlignmentMisaligned_
 
edm::ESGetToken< CTPPSRPAlignmentCorrectionsData, RPRealAlignmentRecordtokenAlignmentReal_
 

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 34 of file CTPPSRPAlignmentInfoAnalyzer.cc.

Constructor & Destructor Documentation

◆ CTPPSRPAlignmentInfoAnalyzer()

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

Definition at line 60 of file CTPPSRPAlignmentInfoAnalyzer.cc.

62  : record_(iConfig.getParameter<string>("record")), iov_(iConfig.getParameter<unsigned long long>("iov")) {
63  if (strcmp(record_.c_str(), "CTPPSRPAlignmentCorrectionsDataRcd") == 0) {
64  tokenAlignmentIdeal_ = esConsumes<CTPPSRPAlignmentCorrectionsData, CTPPSRPAlignmentCorrectionsDataRcd>();
65  } else if (strcmp(record_.c_str(), "RPRealAlignmentRecord") == 0) {
66  tokenAlignmentReal_ = esConsumes<CTPPSRPAlignmentCorrectionsData, RPRealAlignmentRecord>();
67  } else {
68  tokenAlignmentMisaligned_ = esConsumes<CTPPSRPAlignmentCorrectionsData, RPMisalignedAlignmentRecord>();
69  }

References record_, tokenAlignmentIdeal_, tokenAlignmentMisaligned_, and tokenAlignmentReal_.

◆ ~CTPPSRPAlignmentInfoAnalyzer()

CTPPSRPAlignmentInfoAnalyzer::~CTPPSRPAlignmentInfoAnalyzer ( )
inlineoverride

Definition at line 43 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 73 of file CTPPSRPAlignmentInfoAnalyzer.cc.

74  {
76 
77  if (strcmp(record_.c_str(), "CTPPSRPAlignmentCorrectionsDataRcd") == 0) {
78  alignments = iSetup.getHandle(tokenAlignmentIdeal_);
79  } else if (strcmp(record_.c_str(), "RPRealAlignmentRecord") == 0) {
80  alignments = iSetup.getHandle(tokenAlignmentReal_);
81  } else {
82  alignments = iSetup.getHandle(tokenAlignmentMisaligned_);
83  }
84 
85  const CTPPSRPAlignmentCorrectionsData* pCTPPSRPAlignmentCorrectionsData = alignments.product();
87  if (poolDbService.isAvailable()) {
88  poolDbService->writeOne(pCTPPSRPAlignmentCorrectionsData, iov_, record_);
89  }

References edm::EventSetup::getHandle(), iov_, edm::Service< T >::isAvailable(), edm::ESHandle< T >::product(), record_, tokenAlignmentIdeal_, tokenAlignmentMisaligned_, tokenAlignmentReal_, and cond::service::PoolDBOutputService::writeOne().

◆ printInfo()

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

Definition at line 93 of file CTPPSRPAlignmentInfoAnalyzer.cc.

95  {
96  time_t unixTime = event.time().unixTime();
97  char timeStr[50];
98  strftime(timeStr, 50, "%F %T", localtime(&unixTime));
99 
100  edm::LogInfo("CTPPSRPAlignmentInfoAnalyzer")
101  << "New alignments found in run=" << event.id().run() << ", event=" << event.id().event()
102  << ", UNIX timestamp=" << unixTime << " (" << timeStr << "):\n"
103  << alignments;

Member Data Documentation

◆ iov_

cond::Time_t CTPPSRPAlignmentInfoAnalyzer::iov_
private

Definition at line 55 of file CTPPSRPAlignmentInfoAnalyzer.cc.

Referenced by analyze().

◆ record_

std::string CTPPSRPAlignmentInfoAnalyzer::record_
private

Definition at line 54 of file CTPPSRPAlignmentInfoAnalyzer.cc.

Referenced by analyze(), and CTPPSRPAlignmentInfoAnalyzer().

◆ tokenAlignmentIdeal_

edm::ESGetToken<CTPPSRPAlignmentCorrectionsData, CTPPSRPAlignmentCorrectionsDataRcd> CTPPSRPAlignmentInfoAnalyzer::tokenAlignmentIdeal_
private

Definition at line 50 of file CTPPSRPAlignmentInfoAnalyzer.cc.

Referenced by analyze(), and CTPPSRPAlignmentInfoAnalyzer().

◆ tokenAlignmentMisaligned_

edm::ESGetToken<CTPPSRPAlignmentCorrectionsData, RPMisalignedAlignmentRecord> CTPPSRPAlignmentInfoAnalyzer::tokenAlignmentMisaligned_
private

Definition at line 52 of file CTPPSRPAlignmentInfoAnalyzer.cc.

Referenced by analyze(), and CTPPSRPAlignmentInfoAnalyzer().

◆ tokenAlignmentReal_

edm::ESGetToken<CTPPSRPAlignmentCorrectionsData, RPRealAlignmentRecord> CTPPSRPAlignmentInfoAnalyzer::tokenAlignmentReal_
private

Definition at line 51 of file CTPPSRPAlignmentInfoAnalyzer.cc.

Referenced by analyze(), and CTPPSRPAlignmentInfoAnalyzer().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
CTPPSRPAlignmentInfoAnalyzer::tokenAlignmentIdeal_
edm::ESGetToken< CTPPSRPAlignmentCorrectionsData, CTPPSRPAlignmentCorrectionsDataRcd > tokenAlignmentIdeal_
Definition: CTPPSRPAlignmentInfoAnalyzer.cc:50
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
CTPPSRPAlignmentInfoAnalyzer::tokenAlignmentMisaligned_
edm::ESGetToken< CTPPSRPAlignmentCorrectionsData, RPMisalignedAlignmentRecord > tokenAlignmentMisaligned_
Definition: CTPPSRPAlignmentInfoAnalyzer.cc:52
edm::ESHandle
Definition: DTSurvey.h:22
CTPPSRPAlignmentInfoAnalyzer::iov_
cond::Time_t iov_
Definition: CTPPSRPAlignmentInfoAnalyzer.cc:55
CTPPSRPAlignmentInfoAnalyzer::record_
std::string record_
Definition: CTPPSRPAlignmentInfoAnalyzer.cc:54
edm::Service< cond::service::PoolDBOutputService >
CTPPSRPAlignmentInfoAnalyzer::tokenAlignmentReal_
edm::ESGetToken< CTPPSRPAlignmentCorrectionsData, RPRealAlignmentRecord > tokenAlignmentReal_
Definition: CTPPSRPAlignmentInfoAnalyzer.cc:51
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