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

Public Member Functions

virtual void analyze (const edm::Event &event, const edm::EventSetup &setup) override
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 DQMReferenceHistogramRootFileEventSetupAnalyzer (const edm::ParameterSet &pset)
 
 DQMReferenceHistogramRootFileEventSetupAnalyzer (int i)
 
virtual ~DQMReferenceHistogramRootFileEventSetupAnalyzer ()
 
- 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
 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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

bool init_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- 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

Definition at line 24 of file DQMReferenceHistogramRootFileEventSetupAnalyzer.cc.

Constructor & Destructor Documentation

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

Definition at line 35 of file DQMReferenceHistogramRootFileEventSetupAnalyzer.cc.

References edm::false, and init_.

35  {
36  init_ = false ;
37  //std::cout << "DQMReferenceHistogramRootFileEventSetupAnalyzer(const edm::ParameterSet &ps)" << std::endl;
38  }
volatile std::atomic< bool > shutdown_flag false
edmtest::DQMReferenceHistogramRootFileEventSetupAnalyzer::DQMReferenceHistogramRootFileEventSetupAnalyzer ( int  i)
explicit

Definition at line 40 of file DQMReferenceHistogramRootFileEventSetupAnalyzer.cc.

References edm::false, and init_.

40  {
41  init_ = false ;
42  //std::cout << "DQMReferenceHistogramRootFileEventSetupAnalyzer(int i) " << i << std::endl;
43  }
volatile std::atomic< bool > shutdown_flag false
edmtest::DQMReferenceHistogramRootFileEventSetupAnalyzer::~DQMReferenceHistogramRootFileEventSetupAnalyzer ( )
virtual

Definition at line 45 of file DQMReferenceHistogramRootFileEventSetupAnalyzer.cc.

References edm::false, and init_.

46  {
47  init_ = false ;
48  //std::cout << "~DQMReferenceHistogramRootFileEventSetupAnalyzer" << std::endl;
49  }
volatile std::atomic< bool > shutdown_flag false

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 51 of file DQMReferenceHistogramRootFileEventSetupAnalyzer.cc.

References reco::return().

52  {
53  return ;
54  }
return(e1-e2)*(e1-e2)+dp *dp
void edmtest::DQMReferenceHistogramRootFileEventSetupAnalyzer::beginRun ( edm::Run const &  run,
edm::EventSetup const &  iSetup 
)
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 56 of file DQMReferenceHistogramRootFileEventSetupAnalyzer.cc.

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

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

Member Data Documentation

bool edmtest::DQMReferenceHistogramRootFileEventSetupAnalyzer::init_
private