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 &)
 
void beginRun (const edm::Run &, const edm::EventSetup &)
 
 SiStripFedCablingBuilder (const edm::ParameterSet &iConfig)
 
 ~SiStripFedCablingBuilder ()
 
- 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)
 

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 &)
 
- 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 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 ( )
inline

Definition at line 15 of file SiStripFedCablingBuilder.h.

References beginRun().

15 {};

Member Function Documentation

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

Definition at line 19 of file SiStripFedCablingBuilder.h.

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

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(), MuonAssociatorByHits_cfi::obj, SiStripDetCabling::print(), SiStripFecCabling::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 
62  {
63  std::stringstream ss;
64  ss << "[SiStripFedCablingBuilder::" << __func__ << "]"
65  << " VERBOSE DEBUG" << std::endl;
66  fed->print( ss );
67  ss << std::endl;
68  if ( printFecCabling_ && fec.isValid() ) { fec->print( ss ); }
69  ss << std::endl;
70  if ( printDetCabling_ && det.isValid() ) { det->print( ss ); }
71  ss << std::endl;
72  if ( printRegionCabling_ && region.isValid() ) { region->print( ss ); }
73  ss << std::endl;
74  edm::LogVerbatim("SiStripFedCablingBuilder") << ss.str();
75  }
76 
77  {
78  std::stringstream ss;
79  ss << "[SiStripFedCablingBuilder::" << __func__ << "]"
80  << " TERSE DEBUG" << std::endl;
81  fed->terse( ss );
82  ss << std::endl;
83  edm::LogVerbatim("SiStripFedCablingBuilder") << ss.str();
84  }
85 
86  {
87  std::stringstream ss;
88  ss << "[SiStripFedCablingBuilder::" << __func__ << "]"
89  << " SUMMARY DEBUG" << std::endl;
90  fed->summary( ss );
91  ss << std::endl;
92  edm::LogVerbatim("SiStripFedCablingBuilder") << ss.str();
93  }
94 
95  edm::LogVerbatim("SiStripFedCablingBuilder")
96  << "[SiStripFedCablingBuilder::" << __func__ << "]"
97  << " Copying FED cabling...";
98  SiStripFedCabling* obj = new SiStripFedCabling( *( fed.product() ) );
99 
100  //End now write sistripnoises data in DB
102 
103  if( mydbservice.isAvailable() ){
104  if ( mydbservice->isNewTagRequest("SiStripFedCablingRcd") ){
105  mydbservice->createNewIOV<SiStripFedCabling>(obj,mydbservice->beginOfTime(),mydbservice->endOfTime(),"SiStripFedCablingRcd");
106  } else {
107  mydbservice->appendSinceTime<SiStripFedCabling>(obj,mydbservice->currentTime(),"SiStripFedCablingRcd");
108  }
109  }else{
110  edm::LogError("SiStripFedCablingBuilder")<<"Service is unavailable"<<std::endl;
111  }
112 }
void print(std::stringstream &) const
RunNumber_t run() const
Definition: RunBase.h:40
void terse(std::stringstream &) const
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
bool isNewTagRequest(const std::string &recordName)
void print(std::stringstream &ss) const
LEFT FOR COMPATIBILITY. SHOULD BE REPLACED BY PRINTDEBUG.
void summary(std::stringstream &ss) const
LEFT FOR COMPATIBILITY. SHOULD BE REPLACED BY PRINTSUMMARY.
bool isAvailable() const
Definition: Service.h:46
void print(std::stringstream &) const
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
const T & get() const
Definition: EventSetup.h:56
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
bool isValid() const
Definition: ESHandle.h:47
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().