CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
BoostIODBReader< DataType, RecordType > Class Template Reference

#include <CondTools/Hcal/interface/BoostIODBReader.h>

Inheritance diagram for BoostIODBReader< DataType, RecordType >:
edm::EDAnalyzer edm::EDConsumerBase

Public Types

typedef DataType data_type
 
typedef RecordType record_type
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 BoostIODBReader (const edm::ParameterSet &)
 
virtual ~BoostIODBReader ()
 
- 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 Member Functions

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

Private Attributes

std::string outputFile_
 

Additional Inherited Members

- 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

template<class DataType, class RecordType>
class BoostIODBReader< DataType, RecordType >

Description: reads an object from a database and puts it into a file using boost I/O

Implementation: [Notes on implementation]

Definition at line 43 of file BoostIODBReader.h.

Member Typedef Documentation

template<class DataType , class RecordType >
typedef DataType BoostIODBReader< DataType, RecordType >::data_type

Definition at line 46 of file BoostIODBReader.h.

template<class DataType , class RecordType >
typedef RecordType BoostIODBReader< DataType, RecordType >::record_type

Definition at line 47 of file BoostIODBReader.h.

Constructor & Destructor Documentation

template<class DataType , class RecordType >
BoostIODBReader< DataType, RecordType >::BoostIODBReader ( const edm::ParameterSet ps)
explicit

Definition at line 59 of file BoostIODBReader.h.

60  : outputFile_(ps.getParameter<std::string>("outputFile"))
61 {
62 }
T getParameter(std::string const &) const
std::string outputFile_
template<class DataType , class RecordType >
virtual BoostIODBReader< DataType, RecordType >::~BoostIODBReader ( )
inlinevirtual

Definition at line 50 of file BoostIODBReader.h.

50 {}

Member Function Documentation

template<class DataType , class RecordType >
void BoostIODBReader< DataType, RecordType >::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 65 of file BoostIODBReader.h.

References edm::EventSetup::get(), and AlCaHLTBitMon_ParallelJobs::p.

67 {
69  iSetup.get<RecordType>().get(p);
70 
71  std::ofstream of(outputFile_.c_str(), std::ios_base::binary);
72  if (!of.is_open())
73  throw cms::Exception("InvalidArgument")
74  << "Failed to open file \"" << outputFile_ << '"' << std::endl;
75 
76  eos::portable_oarchive ar(of);
77  ar & *p;
78 }
const T & get() const
Definition: EventSetup.h:55
std::string outputFile_

Member Data Documentation

template<class DataType , class RecordType >
std::string BoostIODBReader< DataType, RecordType >::outputFile_
private

Definition at line 55 of file BoostIODBReader.h.