CMS 3D CMS Logo

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

Prints the Analysis Mask loaded by TotemDAQMappingESSourceXML. More...

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

Public Member Functions

 WriteCTPPSPixelAnalysisMask (const edm::ParameterSet &ps)
 
 ~WriteCTPPSPixelAnalysisMask ()
 
- 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
 
 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 analysismaskiov_
 
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 Analysis Mask loaded by TotemDAQMappingESSourceXML.

Definition at line 35 of file WriteCTPPSPixelAnalysisMask.cc.

Constructor & Destructor Documentation

WriteCTPPSPixelAnalysisMask::WriteCTPPSPixelAnalysisMask ( const edm::ParameterSet ps)

Definition at line 53 of file WriteCTPPSPixelAnalysisMask.cc.

53  :
54 analysismaskiov_(ps.getParameter<unsigned long long>("analysismaskiov")),
55 record_(ps.getParameter<string>("record")),
56 label_(ps.getParameter<string>("label"))
57 {}
T getParameter(std::string const &) const
WriteCTPPSPixelAnalysisMask::~WriteCTPPSPixelAnalysisMask ( )
inline

Definition at line 39 of file WriteCTPPSPixelAnalysisMask.cc.

References analyze(), and MillePedeFileConverter_cfg::e.

39 {}

Member Function Documentation

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

Definition at line 60 of file WriteCTPPSPixelAnalysisMask.cc.

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

Referenced by ~WriteCTPPSPixelAnalysisMask().

61 {
62 
63  // get analysis mask to mask channels
65  es.get<CTPPSPixelAnalysisMaskRcd>().get(label_, analysisMask);
66 
67  /*// print analysisMask
68  printf("* mask\n");
69  for (const auto &p : analysisMask->analysisMask)
70  cout << " " << p.first
71  << ": fullMask=" << p.second.fullMask
72  << ", number of masked channels " << p.second.maskedPixels.size() << endl;
73  */
74 
75  // Write Analysis Mask to sqlite file:
76  const CTPPSPixelAnalysisMask* pCTPPSPixelAnalysisMask = analysisMask.product(); // Analysis Mask
78  if( poolDbService.isAvailable() ){
79  poolDbService->writeOne( pCTPPSPixelAnalysisMask, analysismaskiov_, /*m_record*/ record_ );
80  }
81 
82 
83 }
bool isAvailable() const
Definition: Service.h:46
Channel-mask mapping.
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86

Member Data Documentation

cond::Time_t WriteCTPPSPixelAnalysisMask::analysismaskiov_
private

Definition at line 43 of file WriteCTPPSPixelAnalysisMask.cc.

Referenced by analyze().

std::string WriteCTPPSPixelAnalysisMask::label_
private
std::string WriteCTPPSPixelAnalysisMask::record_
private

Definition at line 44 of file WriteCTPPSPixelAnalysisMask.cc.

Referenced by analyze().