CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
edmtest::DQMReferenceHistogramRootFileEventSetupAnalyzer Class Reference
Inheritance diagram for edmtest::DQMReferenceHistogramRootFileEventSetupAnalyzer:
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
 
 DQMReferenceHistogramRootFileEventSetupAnalyzer (const edm::ParameterSet &pset)
 
 DQMReferenceHistogramRootFileEventSetupAnalyzer (int i)
 
 ~DQMReferenceHistogramRootFileEventSetupAnalyzer () 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

bool init_
 

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
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ESProduct , Transition Tr = Transition::Event>
auto esConsumes (eventsetup::EventSetupRecordKey const &, ESInputTag const &tag)
 
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 22 of file DQMReferenceHistogramRootFileEventSetupAnalyzer.cc.

Constructor & Destructor Documentation

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

Definition at line 33 of file DQMReferenceHistogramRootFileEventSetupAnalyzer.cc.

References funct::false, and init_.

33  {
34  init_ = false ;
35  //std::cout << "DQMReferenceHistogramRootFileEventSetupAnalyzer(const edm::ParameterSet &ps)" << std::endl;
36  }
edmtest::DQMReferenceHistogramRootFileEventSetupAnalyzer::DQMReferenceHistogramRootFileEventSetupAnalyzer ( int  i)
explicit

Definition at line 38 of file DQMReferenceHistogramRootFileEventSetupAnalyzer.cc.

References funct::false, and init_.

38  {
39  init_ = false ;
40  //std::cout << "DQMReferenceHistogramRootFileEventSetupAnalyzer(int i) " << i << std::endl;
41  }
edmtest::DQMReferenceHistogramRootFileEventSetupAnalyzer::~DQMReferenceHistogramRootFileEventSetupAnalyzer ( )
override

Definition at line 43 of file DQMReferenceHistogramRootFileEventSetupAnalyzer.cc.

References funct::false, and init_.

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

Member Function Documentation

void edmtest::DQMReferenceHistogramRootFileEventSetupAnalyzer::analyze ( const edm::Event event,
const edm::EventSetup setup 
)
override

Definition at line 49 of file DQMReferenceHistogramRootFileEventSetupAnalyzer.cc.

References mathSSE::return().

50  {
51  return ;
52  }
return((rh^lh)&mask)
void edmtest::DQMReferenceHistogramRootFileEventSetupAnalyzer::beginRun ( edm::Run const &  run,
edm::EventSetup const &  iSetup 
)
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 54 of file DQMReferenceHistogramRootFileEventSetupAnalyzer.cc.

References DEFINE_FWK_MODULE, Exception, edm::eventsetup::heterocontainer::HCTypeTag::findType(), edm::EventSetup::get(), DQMStore::getAllContents(), init_, DQMStore::open(), lumiCalc2::outfile, convertSQLitetoXML_cfg::output, AlCaHLTBitMon_QueryRunRegistry::string, funct::true, and edm::eventsetup::EventSetupRecordKey::type().

55  {
56  //std::cout << "DQMReferenceHistogramRootFileEventSetupAnalyzer::beginRun()" << std::endl;
57  if(!init_)
58  {
59  init_ = true ;
61  if(recordKey.type() == edm::eventsetup::EventSetupRecordKey::TypeTag()) {
62  throw cms::Exception ("Record not found") << "Record \"DQMReferenceHistogramRootFileRcd"
63  << "\" does not exist!" << std::endl;
64  }
66  iSetup.get<DQMReferenceHistogramRootFileRcd>().get(rootgeo);
67  //std::cout<<"ROOT FILE IN MEMORY"<<std::endl;
68  std::unique_ptr<std::vector<unsigned char> > tb( (*rootgeo).getUncompressedBlob() );
69  // char filename[128];
70  // sprintf(filename, "mem:%p,%ul", &(*tb)[0], (unsigned long) tb->size());
71  // edm::Service<DQMStore>()->open(filename, false, "", "Reference");
72 
73  //here you can implement the stream for putting the TFile on disk...
74  std::string outfile("dqmreference.root") ;
75  std::ofstream output(outfile.c_str()) ;
76  output.write((const char *)&(*tb)[0], tb->size());
77  output.close() ;
78 
80  dqm->open(outfile, false, "", "Reference");
81  remove(outfile.c_str());
82 
83  std::vector<MonitorElement *> mes = dqm->getAllContents("");
84  // for (std::vector<MonitorElement *>::iterator i = mes.begin(), e = mes.end(); i != e; ++i)
85  // std::cout << "ME '" << (*i)->getFullname() << "'\n";
86 
87  //std::cout<<"SIZE FILE = "<<tb->size()<<std::endl;
88  }
89  }
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
bool open(std::string const &filename, bool overwrite=false, std::string const &path="", std::string const &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
Definition: DQMStore.cc:2861
heterocontainer::HCTypeTag TypeTag
std::vector< MonitorElement * > getAllContents(std::string const &path, uint32_t runNumber=0, uint32_t lumi=0) const
Definition: DQMStore.cc:1755

Member Data Documentation

bool edmtest::DQMReferenceHistogramRootFileEventSetupAnalyzer::init_
private