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
TrackProbabilityXMLtoDB Class Reference

#include <RecoBTag/TrackProbabilityXMLtoDB/src/TrackProbabilityXMLtoDB.cc>

Inheritance diagram for TrackProbabilityXMLtoDB:
edm::EDAnalyzer

Public Member Functions

virtual void analyze (const edm::Event &iEvent, const edm::EventSetup &iSetup)
 
virtual void endJob ()
 
 TrackProbabilityXMLtoDB (const edm::ParameterSet &)
 
 ~TrackProbabilityXMLtoDB ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Attributes

int count
 
edm::InputTag m_assoc
 
double m_cutMaxChiSquared
 
double m_cutMaxDecayLen
 
double m_cutMaxDistToAxis
 
double m_cutMaxLIP
 
double m_cutMaxTIP
 
double m_cutMinProb
 
double m_cutMinPt
 
int m_cutPixelHits
 
int m_cutTotalHits
 
edm::InputTag m_jets
 
edm::InputTag m_primaryVertexProducer
 
int ntracks
 

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
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 81 of file TrackProbabilityXMLtoDB.cc.

Constructor & Destructor Documentation

TrackProbabilityXMLtoDB::TrackProbabilityXMLtoDB ( const edm::ParameterSet parameters)
explicit

Definition at line 150 of file TrackProbabilityXMLtoDB.cc.

151 {
152 }
TrackProbabilityXMLtoDB::~TrackProbabilityXMLtoDB ( )
inline

Definition at line 121 of file TrackProbabilityXMLtoDB.cc.

122  {
123  }

Member Function Documentation

void TrackProbabilityXMLtoDB::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 155 of file TrackProbabilityXMLtoDB.cc.

156 {
157 }
virtual void TrackProbabilityXMLtoDB::endJob ( void  )
inlinevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 85 of file TrackProbabilityXMLtoDB.cc.

References CalibrationInterface< T, CO >::categoriesWithData(), TrackProbabilityCalibration::Entry::category, cond::service::PoolDBOutputService::createNewIOV(), TrackProbabilityCalibration::data, data, cond::service::PoolDBOutputService::endOfTime(), edm::FileInPath::fullPath(), TrackProbabilityCalibration::Entry::histogram, i, edm::Service< T >::isAvailable(), and CalibrationInterface< T, CO >::size().

86  {
88  if( !mydbservice.isAvailable() ) return;
89 
90  edm::FileInPath f2d("RecoBTag/TrackProbability/data/2DHisto.xml");
91  edm::FileInPath f3d("RecoBTag/TrackProbability/data/3DHisto.xml");
94 
95  vector<pair<TrackClassFilterCategory, CalibratedHistogramXML> > data = calibrationOld->categoriesWithData();
96  vector<pair<TrackClassFilterCategory, CalibratedHistogramXML> > data2d = calibration2dOld->categoriesWithData();
99  for(int i = 0 ; i < data.size();i++)
100  {
102  entry.category=data[i].first.categoryData();
103  entry.histogram=data[i].second;
104  calibration->data.push_back(entry);
105  }
106  for(int i = 0 ; i < data2d.size();i++)
107  {
109  entry.category=data2d[i].first.categoryData();
110  entry.histogram=data2d[i].second;
111  calibration2d->data.push_back(entry);
112  }
113 
114 
115  mydbservice->createNewIOV<TrackProbabilityCalibration>(calibration, mydbservice->endOfTime(),"BTagTrackProbability3DRcd");
116 
117  mydbservice->createNewIOV<TrackProbabilityCalibration>(calibration2d, mydbservice->endOfTime(),"BTagTrackProbability2DRcd");
118 
119 
120  }
int i
Definition: DBlmapReader.cc:9
std::pair< std::string, MonitorElement * > entry
Definition: ME_MAP.h:8
bool isAvailable() const
Definition: Service.h:47
const std::vector< std::pair< T, CO > > & categoriesWithData() const
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
PhysicsTools::Calibration::HistogramF histogram
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82

Member Data Documentation

int TrackProbabilityXMLtoDB::count
private

Definition at line 130 of file TrackProbabilityXMLtoDB.cc.

edm::InputTag TrackProbabilityXMLtoDB::m_assoc
private

Definition at line 142 of file TrackProbabilityXMLtoDB.cc.

double TrackProbabilityXMLtoDB::m_cutMaxChiSquared
private

Definition at line 137 of file TrackProbabilityXMLtoDB.cc.

double TrackProbabilityXMLtoDB::m_cutMaxDecayLen
private

Definition at line 136 of file TrackProbabilityXMLtoDB.cc.

double TrackProbabilityXMLtoDB::m_cutMaxDistToAxis
private

Definition at line 139 of file TrackProbabilityXMLtoDB.cc.

double TrackProbabilityXMLtoDB::m_cutMaxLIP
private

Definition at line 138 of file TrackProbabilityXMLtoDB.cc.

double TrackProbabilityXMLtoDB::m_cutMaxTIP
private

Definition at line 134 of file TrackProbabilityXMLtoDB.cc.

double TrackProbabilityXMLtoDB::m_cutMinProb
private

Definition at line 140 of file TrackProbabilityXMLtoDB.cc.

double TrackProbabilityXMLtoDB::m_cutMinPt
private

Definition at line 135 of file TrackProbabilityXMLtoDB.cc.

int TrackProbabilityXMLtoDB::m_cutPixelHits
private

Definition at line 132 of file TrackProbabilityXMLtoDB.cc.

int TrackProbabilityXMLtoDB::m_cutTotalHits
private

Definition at line 133 of file TrackProbabilityXMLtoDB.cc.

edm::InputTag TrackProbabilityXMLtoDB::m_jets
private

Definition at line 143 of file TrackProbabilityXMLtoDB.cc.

edm::InputTag TrackProbabilityXMLtoDB::m_primaryVertexProducer
private

Definition at line 144 of file TrackProbabilityXMLtoDB.cc.

int TrackProbabilityXMLtoDB::ntracks
private

Definition at line 131 of file TrackProbabilityXMLtoDB.cc.