CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ReadMeFromFile.cc
Go to the documentation of this file.
1 /*
2  * \author Anna Cimmino
3  */
5 
6 // Framework
8 
9 //DataFormats
13 
14 // Geometry
17 
18 // DQM
20 
21 #include <map>
22 #include <sstream>
23 //#include <math.h>
24 
25 using namespace edm;
26 using namespace std;
27 
29 
30  LogVerbatim ("readFile") << "[ReadMeFromFile]: Constructor";
31 
32  myFile_= ps.getUntrackedParameter<string>("InputFile", "uffa.root");
33 }
34 
36  dbe_ = 0;
37 }
38 
40 
41 void ReadMeFromFile::beginRun(const Run& r, const EventSetup& iSetup){
42  LogVerbatim ("readfile") << "[ReadMeFromFile]: Begin run";
44  dbe_->setVerbose(0);
45  dbe_->load(myFile_);
46 }
47 
48 void ReadMeFromFile::beginLuminosityBlock(LuminosityBlock const& lumiSeg, EventSetup const& context) {}
49 
50 //called at each event
52 
53 
54 void ReadMeFromFile::endLuminosityBlock(LuminosityBlock const& lumiSeg, EventSetup const& iSetup) {
55 
56 // // vector<string> prova = dbe_->getMEs();
57 // // for(unsigned int i=0; i<prova.size(); i++ ){
58 // // cout<<prova[i]<<endl;
59 // // }
60 
61 // cout<<"End lumi block "<<endl;
62 
63 // dbe_->setCurrentFolder("RPC/RecHits/Barrel/Wheel_0/sector_1/station_2");
64 // // std::vector<MonitorElement *> mes = dbe_->getAllContents("RPC/RecHits/Barrel/Wheel_0/sector_1/station_2");
65 // MonitorElement * me = dbe_->get("RPC/RecHits/Barrel/Wheel_0/sector_1/station_2/Occupancy_W+0_RB2out_S01_Backward");
66 // if(me) cout<<"FOUD "<<endl;
67 // // if (not mes.empty()) {
68 // // std::cout << "found " << mes.size() << " MonitorElements inside 'RPC/RecHits/Barrel/Wheel_0/sector_1/station_2':" << std::endl;
69 // // for (size_t i = 0; i < mes.size(); ++i) {
70 // // MonitorElement * me = mes[i];
71 // // std::cout << '\t' << me->getName() << std::endl;
72 // // }
73 // // }
74 }
75 
76 void ReadMeFromFile::endRun(const Run& r, const EventSetup& c){}
77 
79 
T getUntrackedParameter(std::string const &, T const &) const
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
Begin Lumi block.
void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
End Lumi Block.
int iEvent
Definition: GenABIO.cc:230
void beginRun(const edm::Run &, const edm::EventSetup &)
void beginJob()
BeginJob.
void endJob()
Endjob.
void setVerbose(unsigned level)
Definition: DQMStore.cc:631
DQMStore * dbe_
bool load(const std::string &filename, OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
Definition: DQMStore.cc:2910
void endRun(const edm::Run &, const edm::EventSetup &)
ReadMeFromFile(const edm::ParameterSet &ps)
Constructor.
void analyze(const edm::Event &, const edm::EventSetup &)
Analyze.
virtual ~ReadMeFromFile()
Destructor.
Definition: Run.h:41