CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

bool printDetCabling_
 
bool printFecCabling_
 
bool printRegionCabling_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- 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.

15 {};

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 19 of file SiStripFedCablingBuilder.h.

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

Reimplemented from edm::EDAnalyzer.

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(), getGTfromDQMFile::obj, printDetCabling_, printFecCabling_, printRegionCabling_, edm::ESHandle< class >::product(), HLT_25ns14e33_v3_cff::region, edm::RunBase::run(), and contentValuesCheck::ss.

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 }
RunNumber_t run() const
Definition: RunBase.h:42
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:46
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:55
T const * product() const
Definition: ESHandle.h:86
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
bool isValid() const
Definition: ESHandle.h:47

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().