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 Member Functions | Private Attributes
WriteEcalMiscalibConstantsMC Class Reference

#include <CalibCalorimetry/WriteEcalMiscalibConstantsMC/src/WriteEcalMiscalibConstantsMC.cc>

Inheritance diagram for WriteEcalMiscalibConstantsMC:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 WriteEcalMiscalibConstantsMC (const edm::ParameterSet &)
 
 ~WriteEcalMiscalibConstantsMC ()
 
- 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 (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &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 Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
virtual void endJob ()
 

Private Attributes

std::string newTagRequest_
 

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

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 25 of file WriteEcalMiscalibConstantsMC.h.

Constructor & Destructor Documentation

WriteEcalMiscalibConstantsMC::WriteEcalMiscalibConstantsMC ( const edm::ParameterSet iConfig)
explicit

Definition at line 50 of file WriteEcalMiscalibConstantsMC.cc.

References edm::ParameterSet::getParameter(), newTagRequest_, and AlCaHLTBitMon_QueryRunRegistry::string.

51 {
52  //now do what ever initialization is needed
53  newTagRequest_ = iConfig.getParameter< std::string > ("NewTagRequest");
54 
55 
56 }
T getParameter(std::string const &) const
WriteEcalMiscalibConstantsMC::~WriteEcalMiscalibConstantsMC ( )

Definition at line 59 of file WriteEcalMiscalibConstantsMC.cc.

60 {
61 
62  // do anything here that needs to be done at desctruction time
63  // (e.g. close files, deallocate resources etc.)
64 
65 }

Member Function Documentation

void WriteEcalMiscalibConstantsMC::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 74 of file WriteEcalMiscalibConstantsMC.cc.

References gather_cfg::cout, edm::EventSetup::get(), and newTagRequest_.

75 {
76  using namespace edm;
77  // Intercalib constants
79  iSetup.get<EcalIntercalibConstantsMCRcd>().get(pIcal);
80  const EcalIntercalibConstantsMC* Mcal = pIcal.product();
81 
83  if( poolDbService.isAvailable() ){
84  if ( poolDbService->isNewTagRequest(newTagRequest_) ){
85  std::cout<<" Creating a new one "<<std::endl;
86  poolDbService->createNewIOV<const EcalIntercalibConstantsMC>( Mcal, poolDbService->beginOfTime(), poolDbService->endOfTime(),newTagRequest_);
87  std::cout<<"Done" << std::endl;
88  }else{
89  std::cout<<"Old One "<<std::endl;
90  poolDbService->appendSinceTime<const EcalIntercalibConstantsMC>( Mcal, poolDbService->currentTime(),newTagRequest_);
91  }
92  }
93 }
const T & get() const
Definition: EventSetup.h:56
tuple cout
Definition: gather_cfg.py:145
void WriteEcalMiscalibConstantsMC::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 98 of file WriteEcalMiscalibConstantsMC.cc.

99 {
100 }
void WriteEcalMiscalibConstantsMC::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 105 of file WriteEcalMiscalibConstantsMC.cc.

References gather_cfg::cout.

Referenced by o2o.O2ORunMgr::executeJob().

105  {
106  std::cout << "Here is the end" << std::endl;
107 }
tuple cout
Definition: gather_cfg.py:145

Member Data Documentation

std::string WriteEcalMiscalibConstantsMC::newTagRequest_
private

Definition at line 37 of file WriteEcalMiscalibConstantsMC.h.

Referenced by analyze(), and WriteEcalMiscalibConstantsMC().