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
edmtest::DQMXMLFileEventSetupAnalyzer Class Reference
Inheritance diagram for edmtest::DQMXMLFileEventSetupAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &event, const edm::EventSetup &setup)
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMXMLFileEventSetupAnalyzer (const edm::ParameterSet &pset)
 
 DQMXMLFileEventSetupAnalyzer (int i)
 
virtual ~DQMXMLFileEventSetupAnalyzer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

bool init_
 
std::string labelToGet_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- 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::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- 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 24 of file DQMXMLFileEventSetupAnalyzer.cc.

Constructor & Destructor Documentation

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

Definition at line 36 of file DQMXMLFileEventSetupAnalyzer.cc.

References funct::false, and init_.

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

Definition at line 41 of file DQMXMLFileEventSetupAnalyzer.cc.

References funct::false, and init_.

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

Definition at line 46 of file DQMXMLFileEventSetupAnalyzer.cc.

References funct::false, and init_.

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

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 52 of file DQMXMLFileEventSetupAnalyzer.cc.

References hitfit::return.

53  {
54  return ;
55  }
void edmtest::DQMXMLFileEventSetupAnalyzer::beginRun ( edm::Run const &  run,
edm::EventSetup const &  iSetup 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 57 of file DQMXMLFileEventSetupAnalyzer.cc.

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

58  {
59  //std::cout << "DQMXMLFileEventSetupAnalyzer::beginRun()" << std::endl;
60  if(!init_)
61  {
62  init_ = true ;
64  if(recordKey.type() == edm::eventsetup::EventSetupRecordKey::TypeTag()) {
65  throw cms::Exception ("Record not found") << "Record \"DQMXMLFileRcd"
66  << "\" does not exist!" << std::endl;
67  }
69  iSetup.get<DQMXMLFileRcd>().get(labelToGet_,rootgeo);
70  //std::cout<<"XML FILE IN MEMORY 1 with label " << labelToGet_ <<std::endl;
71  boost::scoped_ptr<std::vector<unsigned char> > tb1( (*rootgeo).getUncompressedBlob() );
72  //here you can implement the stream for putting the TFile on disk...
73  std::string outfile1("XML1_retrieved.xml") ;
74  ofstream output1(outfile1.c_str()) ;
75  output1.write((const char *)&(*tb1)[0], tb1->size());
76  output1.close() ;
77 
78 // iSetup.get<DQMXMLFileRcd>().get("XML2_mio",rootgeo);
79 // std::cout<<"ROOT FILE IN MEMORY 2"<<std::endl;
80 // boost::scoped_ptr<std::vector<unsigned char> > tb2( (*rootgeo).getUncompressedBlob() );
81 // //here you can implement the stream for putting the TFile on disk...
82 // std::string outfile2("XML2_retrieved.xml") ;
83 // ofstream output2(outfile2.c_str()) ;
84 // output2.write((const char *)&(*tb2)[0], tb2->size());
85 // output2.close() ;
86  // boost::scoped_ptr<std::vector<unsigned char> > tb( (*rootgeo).getUncompressedBlob() );
87  }
88  }
heterocontainer::HCTypeTag TypeTag
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:129

Member Data Documentation

bool edmtest::DQMXMLFileEventSetupAnalyzer::init_
private
std::string edmtest::DQMXMLFileEventSetupAnalyzer::labelToGet_
private

Definition at line 33 of file DQMXMLFileEventSetupAnalyzer.cc.

Referenced by beginRun().