CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
CTPPSPixelDAQMappingAnalyzer Class Reference
Inheritance diagram for CTPPSPixelDAQMappingAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
 CTPPSPixelDAQMappingAnalyzer (edm::ParameterSet const &iConfig)
 
 CTPPSPixelDAQMappingAnalyzer (int i)
 
virtual ~CTPPSPixelDAQMappingAnalyzer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- 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)
 

Public Attributes

cond::Time_t analysismaskiov_
 
cond::Time_t daqmappingiov_
 
string label_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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

Definition at line 18 of file CTPPSPixelDAQMappingAnalyzer.cc.

Constructor & Destructor Documentation

CTPPSPixelDAQMappingAnalyzer::CTPPSPixelDAQMappingAnalyzer ( edm::ParameterSet const &  iConfig)
inlineexplicit

Definition at line 25 of file CTPPSPixelDAQMappingAnalyzer.cc.

25  :
26  label_(iConfig.getUntrackedParameter<string>("label", "RPix")),
27  daqmappingiov_(iConfig.getParameter<unsigned long long>("daqmappingiov")),
28  analysismaskiov_(iConfig.getParameter<unsigned long long>("analysismaskiov"))
29  {}
CTPPSPixelDAQMappingAnalyzer::CTPPSPixelDAQMappingAnalyzer ( int  i)
inlineexplicit

Definition at line 30 of file CTPPSPixelDAQMappingAnalyzer.cc.

30 {}
virtual CTPPSPixelDAQMappingAnalyzer::~CTPPSPixelDAQMappingAnalyzer ( )
inlinevirtual

Member Function Documentation

void CTPPSPixelDAQMappingAnalyzer::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overridevirtual

Definition at line 37 of file CTPPSPixelDAQMappingAnalyzer.cc.

References DEFINE_FWK_MODULE, edm::EventSetup::get(), edm::EventBase::id(), HPSPFTaus_cff::mapping, and edm::EventID::run().

37  {
38 
39  using namespace edm;
40 
41  /*edm::eventsetup::EventSetupRecordKey recordKey(edm::eventsetup::EventSetupRecordKey::TypeTag::findType("CTPPSPixelDAQMappingRcd"));
42  if( recordKey.type() == edm::eventsetup::EventSetupRecordKey::TypeTag()) {
43  //record not found
44  std::cout <<"Record \"CTPPSPixelDAQMappingRcd"<<"\" does not exist "<<std::endl;
45  }*/
46 
47 
48  //this part gets the handle of the event source and the record (i.e. the Database)
49  if (e.id().run() == daqmappingiov_){
51  context.get<CTPPSPixelDAQMappingRcd>().get("RPix", mapping);
52 
53  // print mapping
54  /*printf("* DAQ mapping\n");
55  for (const auto &p : mapping->ROCMapping)
56  std::cout << " " << p.first << " -> " << p.second << std::endl;*/
57  }
58 
59  //edm::eventsetup::EventSetupRecordKey recordKey(edm::eventsetup::EventSetupRecordKey::TypeTag::findType("CTPPSPixelAnalysisMaskRcd"));
60  //if( recordKey.type() == edm::eventsetup::EventSetupRecordKey::TypeTag()) {
61  //record not found
62  //std::cout <<"Record \"CTPPSPixelAnalysisMaskRcd"<<"\" does not exist "<<std::endl;
63  //}
64 
65  if (e.id().run() == analysismaskiov_){
66  // get analysis mask to mask channels
68  context.get<CTPPSPixelAnalysisMaskRcd>().get(label_, analysisMask);
69 
70  // print mask
71  /*printf("* mask\n");
72  for (const auto &p : analysisMask->analysisMask)
73  cout << " " << p.first
74  << ": fullMask=" << p.second.fullMask
75  << ", number of masked channels " << p.second.maskedPixels.size() << endl;
76  */
77  }
78 
79  }
RunNumber_t run() const
Definition: EventID.h:39
edm::EventID id() const
Definition: EventBase.h:60
HLT enums.

Member Data Documentation

cond::Time_t CTPPSPixelDAQMappingAnalyzer::analysismaskiov_

Definition at line 23 of file CTPPSPixelDAQMappingAnalyzer.cc.

cond::Time_t CTPPSPixelDAQMappingAnalyzer::daqmappingiov_

Definition at line 22 of file CTPPSPixelDAQMappingAnalyzer.cc.

string CTPPSPixelDAQMappingAnalyzer::label_