CMS 3D CMS Logo

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

Prints the DAQ mapping loaded by TotemDAQMappingESSourceXML. More...

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

Public Member Functions

 WriteCTPPSPixelDAQMapping (const edm::ParameterSet &ps)
 
 ~WriteCTPPSPixelDAQMapping ()
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- 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
 
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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

virtual void analyze (const edm::Event &e, const edm::EventSetup &es) override
 

Private Attributes

cond::Time_t daqmappingiov_
 
std::string label_
 
std::string record_
 

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

Prints the DAQ mapping loaded by TotemDAQMappingESSourceXML.

Definition at line 36 of file WriteCTPPSPixelDAQMapping.cc.

Constructor & Destructor Documentation

WriteCTPPSPixelDAQMapping::WriteCTPPSPixelDAQMapping ( const edm::ParameterSet ps)

Definition at line 54 of file WriteCTPPSPixelDAQMapping.cc.

54  :
55 daqmappingiov_(ps.getParameter<unsigned long long>("daqmappingiov")),
56 record_(ps.getParameter<string>("record")),
57 label_(ps.getParameter<string>("label"))
58 {}
T getParameter(std::string const &) const
WriteCTPPSPixelDAQMapping::~WriteCTPPSPixelDAQMapping ( )
inline

Definition at line 40 of file WriteCTPPSPixelDAQMapping.cc.

References analyze(), and MillePedeFileConverter_cfg::e.

40 {}

Member Function Documentation

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

Definition at line 61 of file WriteCTPPSPixelDAQMapping.cc.

References daqmappingiov_, DEFINE_FWK_MODULE, edm::EventSetup::get(), edm::Service< T >::isAvailable(), label_, HPSPFTaus_cff::mapping, edm::ESHandle< T >::product(), record_, and cond::service::PoolDBOutputService::writeOne().

Referenced by ~WriteCTPPSPixelDAQMapping().

62 {
63 
64  // get DAQ mapping
66  es.get<CTPPSPixelDAQMappingRcd>().get(label_, mapping);
67 
68  // print mapping
69  /*printf("* DAQ mapping\n");
70  for (const auto &p : mapping->ROCMapping)
71  cout << " " << p.first << " -> " << p.second << endl;
72  */
73 
74  // Write DAQ Mapping to sqlite file:
75  const CTPPSPixelDAQMapping* pCTPPSPixelDAQMapping = mapping.product(); // DAQ Mapping
77  if( poolDbService.isAvailable() ){
78  poolDbService->writeOne( pCTPPSPixelDAQMapping, daqmappingiov_, /*m_record*/ record_ );
79  }
80 
81 
82 }
bool isAvailable() const
Definition: Service.h:46
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:86
The mapping between FramePosition and ROCInfo.

Member Data Documentation

cond::Time_t WriteCTPPSPixelDAQMapping::daqmappingiov_
private

Definition at line 44 of file WriteCTPPSPixelDAQMapping.cc.

Referenced by analyze().

std::string WriteCTPPSPixelDAQMapping::label_
private
std::string WriteCTPPSPixelDAQMapping::record_
private

Definition at line 45 of file WriteCTPPSPixelDAQMapping.cc.

Referenced by analyze().