CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
edmtest::DQMXMLFileEventSetupAnalyzer Class Reference
Inheritance diagram for edmtest::DQMXMLFileEventSetupAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &setup) override
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 DQMXMLFileEventSetupAnalyzer (const edm::ParameterSet &pset)
 
 DQMXMLFileEventSetupAnalyzer (int i)
 
 ~DQMXMLFileEventSetupAnalyzer () 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
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 init_
 
std::string labelToGet_
 

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
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 21 of file DQMXMLFileEventSetupAnalyzer.cc.

Constructor & Destructor Documentation

◆ DQMXMLFileEventSetupAnalyzer() [1/2]

edmtest::DQMXMLFileEventSetupAnalyzer::DQMXMLFileEventSetupAnalyzer ( const edm::ParameterSet pset)
explicit

Definition at line 34 of file DQMXMLFileEventSetupAnalyzer.cc.

35  : labelToGet_(ps.getParameter<std::string>("labelToGet")) {
36  init_ = false;
37  //std::cout << "DQMXMLFileEventSetupAnalyzer(const edm::ParameterSet &ps)" << std::endl;
38  }

References init_.

◆ DQMXMLFileEventSetupAnalyzer() [2/2]

edmtest::DQMXMLFileEventSetupAnalyzer::DQMXMLFileEventSetupAnalyzer ( int  i)
explicit

Definition at line 40 of file DQMXMLFileEventSetupAnalyzer.cc.

40  {
41  init_ = false;
42  //std::cout << "DQMXMLFileEventSetupAnalyzer(int i) " << i << std::endl;
43  }

References init_.

◆ ~DQMXMLFileEventSetupAnalyzer()

edmtest::DQMXMLFileEventSetupAnalyzer::~DQMXMLFileEventSetupAnalyzer ( )
override

Definition at line 45 of file DQMXMLFileEventSetupAnalyzer.cc.

45  {
46  init_ = false;
47  //std::cout << "~DQMXMLFileEventSetupAnalyzer" << std::endl;
48  }

References init_.

Member Function Documentation

◆ analyze()

void edmtest::DQMXMLFileEventSetupAnalyzer::analyze ( const edm::Event event,
const edm::EventSetup setup 
)
overridevirtual

Implements edm::EDAnalyzer.

Definition at line 50 of file DQMXMLFileEventSetupAnalyzer.cc.

50 { return; }

◆ beginRun()

void edmtest::DQMXMLFileEventSetupAnalyzer::beginRun ( edm::Run const &  run,
edm::EventSetup const &  iSetup 
)
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 52 of file DQMXMLFileEventSetupAnalyzer.cc.

52  {
53  //std::cout << "DQMXMLFileEventSetupAnalyzer::beginRun()" << std::endl;
54  if (!init_) {
55  init_ = true;
58  if (recordKey.type() == edm::eventsetup::EventSetupRecordKey::TypeTag()) {
59  throw cms::Exception("Record not found") << "Record \"DQMXMLFileRcd"
60  << "\" does not exist!" << std::endl;
61  }
63  iSetup.get<DQMXMLFileRcd>().get(labelToGet_, rootgeo);
64  //std::cout<<"XML FILE IN MEMORY 1 with label " << labelToGet_ <<std::endl;
65  std::unique_ptr<std::vector<unsigned char> > tb1((*rootgeo).getUncompressedBlob());
66  //here you can implement the stream for putting the TFile on disk...
67  std::string outfile1("XML1_retrieved.xml");
68  std::ofstream output1(outfile1.c_str());
69  output1.write((const char*)&(*tb1)[0], tb1->size());
70  output1.close();
71 
72  // iSetup.get<DQMXMLFileRcd>().get("XML2_mio",rootgeo);
73  // std::cout<<"ROOT FILE IN MEMORY 2"<<std::endl;
74  // std::unique_ptr<std::vector<unsigned char> > tb2( (*rootgeo).getUncompressedBlob() );
75  // //here you can implement the stream for putting the TFile on disk...
76  // std::string outfile2("XML2_retrieved.xml") ;
77  // std::ofstream output2(outfile2.c_str()) ;
78  // output2.write((const char *)&(*tb2)[0], tb2->size());
79  // output2.close() ;
80  // std::unique_ptr<std::vector<unsigned char> > tb( (*rootgeo).getUncompressedBlob() );
81  }
82  }

References Exception, edm::eventsetup::heterocontainer::HCTypeTag::findType(), edm::EventSetup::get(), get, init_, labelToGet_, skim900GeV_StreamA_MinBiasPD_cfg::output1, AlCaHLTBitMon_QueryRunRegistry::string, and edm::eventsetup::EventSetupRecordKey::type().

Member Data Documentation

◆ init_

bool edmtest::DQMXMLFileEventSetupAnalyzer::init_
private

◆ labelToGet_

std::string edmtest::DQMXMLFileEventSetupAnalyzer::labelToGet_
private

Definition at line 31 of file DQMXMLFileEventSetupAnalyzer.cc.

Referenced by beginRun().

edm::eventsetup::heterocontainer::HCTypeTag::findType
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:121
skim900GeV_StreamA_MinBiasPD_cfg.output1
output1
Definition: skim900GeV_StreamA_MinBiasPD_cfg.py:212
edm::eventsetup::EventSetupRecordKey
Definition: EventSetupRecordKey.h:30
edmtest::DQMXMLFileEventSetupAnalyzer::labelToGet_
std::string labelToGet_
Definition: DQMXMLFileEventSetupAnalyzer.cc:31
edm::ESHandle
Definition: DTSurvey.h:22
edm::eventsetup::EventSetupRecordKey::TypeTag
heterocontainer::HCTypeTag TypeTag
Definition: EventSetupRecordKey.h:32
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DQMXMLFileRcd
Definition: DQMXMLFileRcd.h:24
get
#define get
Exception
Definition: hltDiff.cc:246
edmtest::DQMXMLFileEventSetupAnalyzer::init_
bool init_
Definition: DQMXMLFileEventSetupAnalyzer.cc:30