53 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,15,0)
54 #include "TBufferFile.h"
62 #include <TBufferXML.h>
90 virtual void endJob() ;
125 using namespace reco;
157 for(
unsigned int j=0;
j<ca[
i]->data.size() ;
j++)
187 <<
"File \"" << xmlCalibration.
fullPath()
188 <<
"\" could not be opened for reading."
190 std::ostringstream ss;
193 TClass *classType = 0;
194 void *ptr = TBufferXML(TBuffer::kRead).ConvertFromXMLAny(
195 ss.str().c_str(), &classType, kTRUE, kFALSE);
198 <<
"Unknown error parsing XML serialization"
201 if (std::strcmp(classType->GetName(),
202 "TrackProbabilityCalibration")) {
203 classType->Destructor(ptr);
205 <<
"Serialized object has wrong C++ type."
221 using namespace reco;
228 for(
unsigned int itFile =1; itFile<
m_xmlilelist3d.size(); itFile++){
231 for(
unsigned int j=0;
j<ca->
data.size() ;
j++)
242 for(
unsigned int itFile =1; itFile<
m_xmlilelist2d.size(); itFile++){
245 for(
unsigned int j=0;
j<ca->
data.size() ;
j++)
283 std::ofstream of2(
"2d.xml");
284 TBufferXML b2(TBuffer::kWrite);
286 TClass::GetClass(
"TrackProbabilityCalibration"),
289 std::ofstream of3(
"3d.xml");
290 TBufferXML b3(TBuffer::kWrite);
292 TClass::GetClass(
"TrackProbabilityCalibration"),
300 std::ofstream
ofile(
"2d.dat");
302 buffer.StreamObject(const_cast<void*>(static_cast<const void*>(
m_calibration[1])),
303 TClass::GetClass(
"TrackProbabilityCalibration"));
304 Int_t
size = buffer.Length();
305 ofile.write(buffer.Buffer(),
size);
308 std::ofstream ofile3(
"3d.dat");
310 buffer3.StreamObject(const_cast<void*>(static_cast<const void*>(
m_calibration[0])),
311 TClass::GetClass(
"TrackProbabilityCalibration"));
312 Int_t size3 = buffer3.Length();
313 ofile3.write(buffer3.Buffer(),size3);
T getParameter(std::string const &) const
std::vector< std::string > m_xmlilelist2d
virtual void analyze(const edm::Event &, const edm::EventSetup &)
#define DEFINE_FWK_MODULE(type)
TrackProbabilityCategoryData category
std::vector< std::string > m_xmlilelist3d
cond::Time_t beginOfTime() const
TrackProbabilityCalibration * fromXml(edm::FileInPath xmlCalibration)
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
PhysicsTools::Calibration::HistogramF histogram
cond::Time_t endOfTime() const
bool xmlFile(const std::string fParam)
std::vector< Entry > data
TrackProbabilityCalibration * m_calibration[2]
std::string fullPath() const
SumHistoCalibration(const edm::ParameterSet &)
tuple size
Write out results.