CMS 3D CMS Logo

Public Member Functions | Private Attributes

ConverterTester Class Reference

#include <ConverterTester.h>

Inheritance diagram for ConverterTester:
edm::EDAnalyzer

List of all members.

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void beginJob ()
virtual void beginRun (const edm::Run &, const edm::EventSetup &)
 ConverterTester (const edm::ParameterSet &)
virtual void endJob ()
virtual void endRun (const edm::Run &, const edm::EventSetup &)
virtual ~ConverterTester ()

Private Attributes

unsigned int count
DQMStoredbe
std::string fName
int frequency
std::string label
MonitorElementmeTestFloat
MonitorElementmeTestInt
MonitorElementmeTestProfile1
MonitorElementmeTestProfile2
MonitorElementmeTestString
MonitorElementmeTestTH1FD
MonitorElementmeTestTH1FN
MonitorElementmeTestTH2F
MonitorElementmeTestTH3F
TRandom * Random
double RandomVal1
double RandomVal2
double RandomVal3
int verbosity

Detailed Description

Class to fill dqm monitor elements from existing EDM file

Date:
2009/12/14 22:22:21
Revision:
1.3
Author:
M. Strang SUNY-Buffalo

Definition at line 38 of file ConverterTester.h.


Constructor & Destructor Documentation

ConverterTester::ConverterTester ( const edm::ParameterSet iPSet) [explicit]

Definition at line 3 of file ConverterTester.cc.

References count, dbe, fName, frequency, edm::ParameterSet::getUntrackedParameter(), cppFunctionSkipper::operator, and verbosity.

{
  std::string MsgLoggerCat = "ConverterTester_ConverterTester";

  fName = iPSet.getUntrackedParameter<std::string>("Name");
  verbosity = iPSet.getUntrackedParameter<int>("Verbosity");
  frequency = iPSet.getUntrackedParameter<int>("Frequency");
 
  if (verbosity >= 0) {
    edm::LogInfo(MsgLoggerCat) 
      << "\n===============================\n"
      << "Initialized as EDAnalyzer with parameter values:\n"
      << "    Name          = " << fName << "\n"
      << "    Verbosity     = " << verbosity << "\n"
      << "    Frequency     = " << frequency << "\n"
      << "===============================\n";
  }
 
  dbe = 0;
  dbe = edm::Service<DQMStore>().operator->();
 
  count = 0;

}
ConverterTester::~ConverterTester ( ) [virtual]

Definition at line 28 of file ConverterTester.cc.

{}

Member Function Documentation

void ConverterTester::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [virtual]
void ConverterTester::beginJob ( void  ) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 30 of file ConverterTester.cc.

References DQMStore::book1D(), DQMStore::book2D(), DQMStore::book3D(), DQMStore::bookFloat(), DQMStore::bookInt(), DQMStore::bookProfile(), DQMStore::bookProfile2D(), DQMStore::bookString(), dbe, MonitorElement::getFullname(), meTestFloat, meTestInt, meTestProfile1, meTestProfile2, meTestString, meTestTH1FD, meTestTH1FN, meTestTH2F, meTestTH3F, DQMStore::setCurrentFolder(), and DQMStore::tag().

{

  if(dbe){
    meTestString = 0;
    meTestInt = 0;
    meTestFloat = 0;
    meTestTH1FN = 0;
    meTestTH1FD = 0;
    meTestTH2F = 0;
    meTestTH3F = 0;
    meTestProfile1 = 0;
    meTestProfile2 = 0;
    Random = new TRandom3();
    
    dbe->setCurrentFolder("ConverterTest/String");
    meTestString = dbe->bookString("TestString","Test String" );

    dbe->setCurrentFolder("ConverterTest/Int");
    meTestInt = dbe->bookInt("TestInt");

    dbe->setCurrentFolder("ConverterTest/Float");
    meTestFloat = dbe->bookFloat("TestFloat");

    dbe->setCurrentFolder("ConverterTest/TH1F");
    meTestTH1FN = 
      dbe->book1D("Random1DN", "Random1D Numerator", 100, -10., 10.);
    meTestTH1FD = 
      dbe->book1D("Random1DD", "Random1D Denominator", 100, -10., 10.);

    dbe->setCurrentFolder("ConverterTest/TH2F");
    meTestTH2F = dbe->book2D("Random2D", "Random2D", 100, -10, 10., 100, -10., 
                             10.);

    dbe->setCurrentFolder("ConverterTest/TH3F");
    meTestTH3F = dbe->book3D("Random3D", "Random3D", 100, -10., 10., 100, 
                             -10., 10., 100, -10., 10.);

    dbe->setCurrentFolder("ConverterTest/TProfile");
    meTestProfile1 = dbe->bookProfile("Profile1", "Profile1", 100, -10., 10., 
                                      100, -10., 10.);

    dbe->setCurrentFolder("ConverterTest/TProfile2D");
    meTestProfile2 = dbe->bookProfile2D("Profile2", "Profile2", 100, -10., 
                                        10., 100, -10, 10., 100, -10., 10.);

    dbe->tag(meTestTH1FN->getFullname(),1);
    dbe->tag(meTestTH1FD->getFullname(),2);    
    dbe->tag(meTestTH2F->getFullname(),3);
    dbe->tag(meTestTH3F->getFullname(),4);
    dbe->tag(meTestProfile1->getFullname(),5);
    dbe->tag(meTestProfile2->getFullname(),6);
    dbe->tag(meTestString->getFullname(),7);
    dbe->tag(meTestInt->getFullname(),8);
    dbe->tag(meTestFloat->getFullname(),9);
  }

  return;
}
void ConverterTester::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 99 of file ConverterTester.cc.

{
  return;
}
void ConverterTester::endJob ( void  ) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 90 of file ConverterTester.cc.

References count, and verbosity.

{
  std::string MsgLoggerCat = "ConverterTester_endJob";
  if (verbosity >= 0)
    edm::LogInfo(MsgLoggerCat) 
      << "Terminating having processed " << count << " events.";
  return;
}
void ConverterTester::endRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 105 of file ConverterTester.cc.

References MonitorElement::Fill(), meTestFloat, and meTestInt.

{
  meTestInt->Fill(100);
  meTestFloat->Fill(3.141592);

  return;
}

Member Data Documentation

unsigned int ConverterTester::count [private]

Definition at line 75 of file ConverterTester.h.

Referenced by analyze(), ConverterTester(), and endJob().

Definition at line 57 of file ConverterTester.h.

Referenced by beginJob(), and ConverterTester().

std::string ConverterTester::fName [private]

Definition at line 53 of file ConverterTester.h.

Referenced by ConverterTester().

Definition at line 55 of file ConverterTester.h.

Referenced by ConverterTester().

std::string ConverterTester::label [private]

Definition at line 56 of file ConverterTester.h.

Definition at line 61 of file ConverterTester.h.

Referenced by beginJob(), and endRun().

Definition at line 60 of file ConverterTester.h.

Referenced by beginJob(), and endRun().

Definition at line 66 of file ConverterTester.h.

Referenced by analyze(), and beginJob().

Definition at line 67 of file ConverterTester.h.

Referenced by analyze(), and beginJob().

Definition at line 59 of file ConverterTester.h.

Referenced by beginJob().

Definition at line 62 of file ConverterTester.h.

Referenced by analyze(), and beginJob().

Definition at line 63 of file ConverterTester.h.

Referenced by analyze(), and beginJob().

Definition at line 64 of file ConverterTester.h.

Referenced by analyze(), and beginJob().

Definition at line 65 of file ConverterTester.h.

Referenced by analyze(), and beginJob().

TRandom* ConverterTester::Random [private]

Definition at line 69 of file ConverterTester.h.

double ConverterTester::RandomVal1 [private]

Definition at line 70 of file ConverterTester.h.

Referenced by analyze().

double ConverterTester::RandomVal2 [private]

Definition at line 71 of file ConverterTester.h.

Referenced by analyze().

double ConverterTester::RandomVal3 [private]

Definition at line 72 of file ConverterTester.h.

Referenced by analyze().

Definition at line 54 of file ConverterTester.h.

Referenced by ConverterTester(), and endJob().