CMS 3D CMS Logo

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

#include <SiStripFedCablingBuilder.h>

Inheritance diagram for SiStripFedCablingBuilder:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginRun (const edm::Run &, const edm::EventSetup &) override
 
 SiStripFedCablingBuilder (const edm::ParameterSet &iConfig)
 
 ~SiStripFedCablingBuilder () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (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::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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

bool printDetCabling_
 
bool printFecCabling_
 
bool printRegionCabling_
 

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 &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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 9 of file SiStripFedCablingBuilder.h.

Constructor & Destructor Documentation

SiStripFedCablingBuilder::SiStripFedCablingBuilder ( const edm::ParameterSet iConfig)

Definition at line 19 of file SiStripFedCablingBuilder.cc.

19  :
20  printFecCabling_( pset.getUntrackedParameter<bool>("PrintFecCabling",false) ),
21  printDetCabling_( pset.getUntrackedParameter<bool>("PrintDetCabling",false) ),
22  printRegionCabling_( pset.getUntrackedParameter<bool>("PrintRegionCabling",false) )
23 {;}
SiStripFedCablingBuilder::~SiStripFedCablingBuilder ( )
inlineoverride

Definition at line 15 of file SiStripFedCablingBuilder.h.

References beginRun().

15 {};

Member Function Documentation

void SiStripFedCablingBuilder::analyze ( const edm::Event ,
const edm::EventSetup  
)
inlineoverride

Definition at line 19 of file SiStripFedCablingBuilder.h.

19 {;}
void SiStripFedCablingBuilder::beginRun ( const edm::Run run,
const edm::EventSetup setup 
)
override

Definition at line 27 of file SiStripFedCablingBuilder.cc.

References cond::service::PoolDBOutputService::appendSinceTime(), cond::service::PoolDBOutputService::beginOfTime(), cond::service::PoolDBOutputService::createNewIOV(), cond::service::PoolDBOutputService::currentTime(), cond::service::PoolDBOutputService::endOfTime(), edm::EventSetup::get(), edm::Service< T >::isAvailable(), cond::service::PoolDBOutputService::isNewTagRequest(), edm::ESHandleBase::isValid(), hgcalPlots::obj, SiStripFecCabling::print(), SiStripDetCabling::print(), SiStripFedCabling::print(), SiStripRegionCabling::print(), printDetCabling_, printFecCabling_, printRegionCabling_, edm::ESHandle< T >::product(), edm::RunBase::run(), SiStripFedCabling::summary(), and SiStripFedCabling::terse().

Referenced by ~SiStripFedCablingBuilder().

28  {
29 
30  edm::LogInfo("SiStripFedCablingBuilder") << "... creating dummy SiStripFedCabling Data for Run " << run.run() << "\n " << std::endl;
31 
32  edm::LogVerbatim("SiStripFedCablingBuilder")
33  << "[SiStripFedCablingBuilder::" << __func__ << "]"
34  << " Retrieving FED cabling...";
36  setup.get<SiStripFedCablingRcd>().get( fed );
37 
38  edm::LogVerbatim("SiStripFedCablingBuilder")
39  << "[SiStripFedCablingBuilder::" << __func__ << "]"
40  << " Retrieving FEC cabling...";
42  setup.get<SiStripFecCablingRcd>().get( fec );
43 
44  edm::LogVerbatim("SiStripFedCablingBuilder")
45  << "[SiStripFedCablingBuilder::" << __func__ << "]"
46  << " Retrieving DET cabling...";
48  setup.get<SiStripDetCablingRcd>().get( det );
49 
50  edm::LogVerbatim("SiStripFedCablingBuilder")
51  << "[SiStripFedCablingBuilder::" << __func__ << "]"
52  << " Retrieving REGION cabling...";
54  setup.get<SiStripRegionCablingRcd>().get( region );
55 
56  if ( !fed.isValid() ) {
57  edm::LogError("SiStripFedCablingBuilder")
58  << " Invalid handle to FED cabling object: ";
59  return;
60  }
61 
63  setup.get<TrackerTopologyRcd>().get(tTopo);
64  {
65  std::stringstream ss;
66  ss << "[SiStripFedCablingBuilder::" << __func__ << "]"
67  << " VERBOSE DEBUG" << std::endl;
68  fed->print(ss, tTopo.product());
69  ss << std::endl;
70  if ( printFecCabling_ && fec.isValid() ) { fec->print( ss ); }
71  ss << std::endl;
72  if ( printDetCabling_ && det.isValid() ) { det->print( ss ); }
73  ss << std::endl;
74  if ( printRegionCabling_ && region.isValid() ) { region->print( ss ); }
75  ss << std::endl;
76  edm::LogVerbatim("SiStripFedCablingBuilder") << ss.str();
77  }
78 
79  {
80  std::stringstream ss;
81  ss << "[SiStripFedCablingBuilder::" << __func__ << "]"
82  << " TERSE DEBUG" << std::endl;
83  fed->terse( ss );
84  ss << std::endl;
85  edm::LogVerbatim("SiStripFedCablingBuilder") << ss.str();
86  }
87 
88  {
89  std::stringstream ss;
90  ss << "[SiStripFedCablingBuilder::" << __func__ << "]"
91  << " SUMMARY DEBUG" << std::endl;
92  fed->summary(ss, tTopo.product());
93  ss << std::endl;
94  edm::LogVerbatim("SiStripFedCablingBuilder") << ss.str();
95  }
96 
97  edm::LogVerbatim("SiStripFedCablingBuilder")
98  << "[SiStripFedCablingBuilder::" << __func__ << "]"
99  << " Copying FED cabling...";
100  SiStripFedCabling* obj = new SiStripFedCabling( *( fed.product() ) );
101 
102  //End now write sistripnoises data in DB
104 
105  if( mydbservice.isAvailable() ){
106  if ( mydbservice->isNewTagRequest("SiStripFedCablingRcd") ){
107  mydbservice->createNewIOV<SiStripFedCabling>(obj,mydbservice->beginOfTime(),mydbservice->endOfTime(),"SiStripFedCablingRcd");
108  } else {
109  mydbservice->appendSinceTime<SiStripFedCabling>(obj,mydbservice->currentTime(),"SiStripFedCablingRcd");
110  }
111  }else{
112  edm::LogError("SiStripFedCablingBuilder")<<"Service is unavailable"<<std::endl;
113  }
114 }
void print(std::stringstream &) const
RunNumber_t run() const
Definition: RunBase.h:40
void terse(std::stringstream &) const
void print(std::stringstream &ss, const TrackerTopology *trackerTopo) const
LEFT FOR COMPATIBILITY. SHOULD BE REPLACED BY PRINTDEBUG.
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
bool isNewTagRequest(const std::string &recordName)
bool isAvailable() const
Definition: Service.h:40
void print(std::stringstream &) const
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
void summary(std::stringstream &ss, const TrackerTopology *trackerTopo) const
LEFT FOR COMPATIBILITY. SHOULD BE REPLACED BY PRINTSUMMARY.
T get() const
Definition: EventSetup.h:71
bool isValid() const
Definition: ESHandle.h:44
T const * product() const
Definition: ESHandle.h:86
void print(std::stringstream &) const

Member Data Documentation

bool SiStripFedCablingBuilder::printDetCabling_
private

Definition at line 24 of file SiStripFedCablingBuilder.h.

Referenced by beginRun().

bool SiStripFedCablingBuilder::printFecCabling_
private

Definition at line 23 of file SiStripFedCablingBuilder.h.

Referenced by beginRun().

bool SiStripFedCablingBuilder::printRegionCabling_
private

Definition at line 25 of file SiStripFedCablingBuilder.h.

Referenced by beginRun().