CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/Alignment/KalmanAlignmentAlgorithm/interface/KalmanAlignmentDataCollector.h

Go to the documentation of this file.
00001 #ifndef Alignment_KalmanAlignmentAlgorithm_KalmanAlignmentDataCollector_h
00002 #define Alignment_KalmanAlignmentAlgorithm_KalmanAlignmentDataCollector_h
00003 
00004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00005 
00006 #include <vector>
00007 #include <map>
00008 #include <string>
00009 
00011 
00012 class KalmanAlignmentDataCollector
00013 {
00014 
00015 public:
00016 
00017   KalmanAlignmentDataCollector( void );
00018   KalmanAlignmentDataCollector( const edm::ParameterSet& config );
00019   ~KalmanAlignmentDataCollector( void );
00020 
00021   static KalmanAlignmentDataCollector* get( void );
00022 
00023   static void configure( const edm::ParameterSet& config );
00024 
00025   static void fillHistogram( std::string histo_name, float data );
00026   static void fillHistogram( std::string histo_name, int histo_number, float data );
00027 
00028   static void fillGraph( std::string graph_name, float x_data, float y_data );
00029   static void fillGraph( std::string graph_name, int graph_number, float x_data, float y_data );
00030 
00031   static void fillNtuple( std::string ntuple_name, float data );
00032 
00033   static void write( void );
00034   static void write( std::string file_name, std::string mode = "RECREATE" );
00035 
00036   static void clear( void );
00037     
00038 private:
00039 
00040   void config( const edm::ParameterSet & config );
00041 
00042   void fillTH1F( std::string histo_name, float data );
00043   void fillTH1F( std::string histo_name, int histo_number, float data );
00044   
00045   void fillTGraph( std::string graph_name, float x_data, float y_data );
00046   void fillTGraph( std::string graph_name, int graph_number, float x_data, float y_data );
00047 
00048   void fillTNtuple( std::string ntuple_name, float data );
00049   
00050   void writeToTFile( void );
00051   void writeToTFile( std::string file_name, std::string mode = "RECREATE" );
00052   
00053   void clearData( void );
00054 
00055   std::string toString( int );
00056   
00057   static KalmanAlignmentDataCollector* theDataCollector;
00058 
00059   edm::ParameterSet theConfiguration;
00060   
00061   std::map< std::string, std::vector< float > > theHistoData;
00062   std::map< std::string, std::vector< float > > theXGraphData;
00063   std::map< std::string, std::vector< float > > theYGraphData;
00064   std::map< std::string, std::vector< float > > theNtupleData;
00065 };
00066 
00067 
00068 #endif