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

#include <calibXMLwriter.h>

Public Member Functions

 calibXMLwriter (EcalSubdetector=EcalBarrel)
 
void writeLine (EBDetId const &, float)
 
void writeLine (EEDetId const &, float)
 
 ~calibXMLwriter ()
 

Private Attributes

FILE * FILENAME
 
EcalSubdetector subdet_
 

Detailed Description

Definition at line 15 of file calibXMLwriter.h.

Constructor & Destructor Documentation

calibXMLwriter::calibXMLwriter ( EcalSubdetector  subdet = EcalBarrel)

Definition at line 5 of file calibXMLwriter.cc.

References EcalEndcap, lut2db_cfg::filename, FILENAME, and subdet_.

5  : subdet_(subdet)
6 {
7 
8  char filename[128];
9  if (subdet_==EcalEndcap) {
10  sprintf(filename,"endcap_iniCalib.xml");
11  } else {
12  sprintf(filename,"barrel_iniCalib.xml");
13  }
14  FILENAME = fopen(filename,"w");
15  fprintf(FILENAME,"<?xml version=\"1.0\" ?>\n");
16  fprintf(FILENAME,"<CalibrationConstants>\n");
17  if (subdet==EcalEndcap) {
18  fprintf(FILENAME,"<EcalEndcap>\n");
19  } else {
20  fprintf(FILENAME,"<EcalBarrel>\n");
21  }
22 
23 }
EcalSubdetector subdet_
tuple filename
Definition: lut2db_cfg.py:20
calibXMLwriter::~calibXMLwriter ( )

Definition at line 25 of file calibXMLwriter.cc.

References EcalEndcap, FILENAME, and subdet_.

26 {
27  if (subdet_==EcalEndcap) {
28  fprintf(FILENAME,"<EcalEndcap>\n");
29  } else {
30  fprintf(FILENAME,"<EcalBarrel>\n");
31  }
32  fprintf(FILENAME,"</CalibrationConstants>\n");
33  fclose(FILENAME);
34 }
EcalSubdetector subdet_

Member Function Documentation

void calibXMLwriter::writeLine ( EBDetId const &  det,
float  calib 
)

Definition at line 36 of file calibXMLwriter.cc.

References eta, FILENAME, EBDetId::ieta(), EBDetId::iphi(), and phi.

Referenced by ElectronCalibration::endJob(), ElectronCalibrationUniv::endJob(), InvRingCalib::endOfJob(), EcalEleCalibLooper::endOfJob(), and ZeeCalibration::endOfJob().

37 {
38 int eta=det.ieta();
39 int phi=det.iphi();
40 fprintf(FILENAME,"<Cell eta_index=\"%d\" phi_index=\"%d\" scale_factor=\"%f\"/>\n",eta,phi,calib);
41 }
MVATrainerComputer * calib
Definition: MVATrainer.cc:64
void calibXMLwriter::writeLine ( EEDetId const &  det,
float  calib 
)

Definition at line 44 of file calibXMLwriter.cc.

References FILENAME, EEDetId::ix(), EEDetId::iy(), x, y, z, and EEDetId::zside().

45 {
46 int x=det.ix();
47 int y=det.iy();
48 int z=det.zside();
49 fprintf(FILENAME,"<Cell x_index=\"%d\" y_index=\"%d\" z_index=\"%d\" scale_factor=\"%f\"/>\n",x,y,z,calib);
50 }
MVATrainerComputer * calib
Definition: MVATrainer.cc:64

Member Data Documentation

FILE* calibXMLwriter::FILENAME
private

Definition at line 29 of file calibXMLwriter.h.

Referenced by calibXMLwriter(), writeLine(), and ~calibXMLwriter().

EcalSubdetector calibXMLwriter::subdet_
private

Definition at line 28 of file calibXMLwriter.h.

Referenced by calibXMLwriter(), and ~calibXMLwriter().