Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:27

0001 #ifndef CondFormats_PhysicsToolsObjects_PhysicsTGraphPayload_h
0002 #define CondFormats_PhysicsToolsObjects_PhysicsTGraphPayload_h
0003 
0004 /*
0005  * PhysicsTGraphPayload
0006  *
0007  * Class to persist TGraph objects in Conditions database
0008  * (The TGraphs are used to evaluate Pt dependent cuts on the output of tau ID MVAs)
0009  *
0010  * Author: Christian Veelken, LLR
0011  *
0012  */
0013 
0014 #include "CondFormats/Serialization/interface/Serializable.h"
0015 
0016 #include "TGraph.h"
0017 
0018 #include <vector>
0019 #include <string>
0020 #include <iostream>
0021 
0022 class PhysicsTGraphPayload {
0023 public:
0024   /// default constructor
0025   PhysicsTGraphPayload();
0026 
0027   /// constructor from TGraph object
0028   PhysicsTGraphPayload(const TGraph& graph);
0029 
0030   /// conversion to TGraph
0031   operator TGraph() const;
0032 
0033   /// print points of TGraph object
0034   void print(std::ostream& stream) const;
0035 
0036 protected:
0037   std::string name_;
0038   int numPoints_;
0039   std::vector<float> x_;
0040   std::vector<float> y_;
0041 
0042   COND_SERIALIZABLE;
0043 };
0044 
0045 #endif