CMS 3D CMS Logo

KalmanAlignmentDataCollector Class Reference

A simple class that allows fast and easy histograming and the production of graphs. More...

#include <Alignment/KalmanAlignmentAlgorithm/interface/KalmanAlignmentDataCollector.h>

List of all members.

Public Member Functions

 KalmanAlignmentDataCollector (const edm::ParameterSet &config)
 KalmanAlignmentDataCollector (void)
 ~KalmanAlignmentDataCollector (void)

Static Public Member Functions

static void clear (void)
static void configure (const edm::ParameterSet &config)
static void fillGraph (std::string graph_name, int graph_number, float x_data, float y_data)
static void fillGraph (std::string graph_name, float x_data, float y_data)
static void fillHistogram (std::string histo_name, int histo_number, float data)
static void fillHistogram (std::string histo_name, float data)
static void fillNtuple (std::string ntuple_name, float data)
static
KalmanAlignmentDataCollector
get (void)
static void write (std::string file_name, std::string mode="RECREATE")
static void write (void)

Private Member Functions

void clearData (void)
void config (const edm::ParameterSet &config)
void fillTGraph (std::string graph_name, int graph_number, float x_data, float y_data)
void fillTGraph (std::string graph_name, float x_data, float y_data)
void fillTH1F (std::string histo_name, int histo_number, float data)
void fillTH1F (std::string histo_name, float data)
void fillTNtuple (std::string ntuple_name, float data)
std::string toString (int)
void writeToTFile (std::string file_name, std::string mode="RECREATE")
void writeToTFile (void)

Private Attributes

edm::ParameterSet theConfiguration
std::map< std::string,
std::vector< float > > 
theHistoData
std::map< std::string,
std::vector< float > > 
theNtupleData
std::map< std::string,
std::vector< float > > 
theXGraphData
std::map< std::string,
std::vector< float > > 
theYGraphData

Static Private Attributes

static
KalmanAlignmentDataCollector
theDataCollector = new KalmanAlignmentDataCollector()


Detailed Description

A simple class that allows fast and easy histograming and the production of graphs.

Definition at line 12 of file KalmanAlignmentDataCollector.h.


Constructor & Destructor Documentation

KalmanAlignmentDataCollector::KalmanAlignmentDataCollector ( void   ) 

Definition at line 15 of file KalmanAlignmentDataCollector.cc.

00015 {}

KalmanAlignmentDataCollector::KalmanAlignmentDataCollector ( const edm::ParameterSet config  ) 

Definition at line 18 of file KalmanAlignmentDataCollector.cc.

00018 : theConfiguration( config ) {}

KalmanAlignmentDataCollector::~KalmanAlignmentDataCollector ( void   ) 

Definition at line 21 of file KalmanAlignmentDataCollector.cc.

00021 {}


Member Function Documentation

void KalmanAlignmentDataCollector::clear ( void   )  [static]

Definition at line 87 of file KalmanAlignmentDataCollector.cc.

References clearData(), and theDataCollector.

00088 {
00089   if ( theDataCollector ) theDataCollector->clearData();
00090 }

void KalmanAlignmentDataCollector::clearData ( void   )  [private]

Definition at line 273 of file KalmanAlignmentDataCollector.cc.

References theHistoData, theXGraphData, and theYGraphData.

Referenced by clear().

00274 {
00275   theHistoData.clear();
00276   theXGraphData.clear();
00277   theYGraphData.clear();
00278 }

void KalmanAlignmentDataCollector::config ( const edm::ParameterSet config  )  [private]

Definition at line 93 of file KalmanAlignmentDataCollector.cc.

References theConfiguration.

Referenced by configure().

00094 {
00095   theConfiguration = config;
00096 }

void KalmanAlignmentDataCollector::configure ( const edm::ParameterSet config  )  [static]

Definition at line 31 of file KalmanAlignmentDataCollector.cc.

References config(), and theDataCollector.

Referenced by KalmanAlignmentAlgorithm::initialize().

00032 {
00033   //if ( !theDataCollector ) theDataCollector = new KalmanAlignmentDataCollector();
00034   theDataCollector->config( config );
00035 }

static void KalmanAlignmentDataCollector::fillGraph ( std::string  graph_name,
int  graph_number,
float  x_data,
float  y_data 
) [static]

static void KalmanAlignmentDataCollector::fillGraph ( std::string  graph_name,
float  x_data,
float  y_data 
) [static]

Referenced by KalmanAlignmentUserVariables::update().

static void KalmanAlignmentDataCollector::fillHistogram ( std::string  histo_name,
int  histo_number,
float  data 
) [static]

static void KalmanAlignmentDataCollector::fillHistogram ( std::string  histo_name,
float  data 
) [static]

Referenced by KalmanAlignmentAlgorithm::run().

void KalmanAlignmentDataCollector::fillNtuple ( std::string  ntuple_name,
float  data 
) [static]

Definition at line 66 of file KalmanAlignmentDataCollector.cc.

References fillTNtuple(), and theDataCollector.

00067 {
00068   //if ( !theDataCollector ) theDataCollector = new KalmanAlignmentDataCollector();
00069   theDataCollector->fillTNtuple( ntuple_name, data );
00070 }

void KalmanAlignmentDataCollector::fillTGraph ( std::string  graph_name,
int  graph_number,
float  x_data,
float  y_data 
) [private]

void KalmanAlignmentDataCollector::fillTGraph ( std::string  graph_name,
float  x_data,
float  y_data 
) [private]

void KalmanAlignmentDataCollector::fillTH1F ( std::string  histo_name,
int  histo_number,
float  data 
) [private]

void KalmanAlignmentDataCollector::fillTH1F ( std::string  histo_name,
float  data 
) [private]

void KalmanAlignmentDataCollector::fillTNtuple ( std::string  ntuple_name,
float  data 
) [private]

Definition at line 149 of file KalmanAlignmentDataCollector.cc.

References theNtupleData.

Referenced by fillNtuple().

00150 {
00151   if ( theNtupleData.find( ntuple_name ) == theNtupleData.end() )
00152   {
00153     theNtupleData[ntuple_name] = vector< float > ( 1, data );
00154    }
00155   else
00156   {
00157     theNtupleData[ntuple_name].push_back( data );
00158   }
00159 }

KalmanAlignmentDataCollector * KalmanAlignmentDataCollector::get ( void   )  [static]

Definition at line 24 of file KalmanAlignmentDataCollector.cc.

References theDataCollector.

00025 {
00026   //if ( !theDataCollector ) theDataCollector = new KalmanAlignmentDataCollector();
00027   return theDataCollector;
00028 }

string KalmanAlignmentDataCollector::toString ( int  i  )  [private]

Definition at line 281 of file KalmanAlignmentDataCollector.cc.

References pyDBSRunClass::temp.

00282 {
00283   char temp[10];
00284   sprintf( temp, "%u", i );
00285 
00286   return string( temp );
00287 }

static void KalmanAlignmentDataCollector::write ( std::string  file_name,
std::string  mode = "RECREATE" 
) [static]

void KalmanAlignmentDataCollector::write ( void   )  [static]

Definition at line 73 of file KalmanAlignmentDataCollector.cc.

References theDataCollector, and writeToTFile().

Referenced by KalmanAlignmentAlgorithm::terminate().

00074 {
00075   //if ( !theDataCollector ) theDataCollector = new KalmanAlignmentDataCollector();
00076   theDataCollector->writeToTFile();
00077 }

void KalmanAlignmentDataCollector::writeToTFile ( std::string  file_name,
std::string  mode = "RECREATE" 
) [private]

void KalmanAlignmentDataCollector::writeToTFile ( void   )  [private]

Definition at line 162 of file KalmanAlignmentDataCollector.cc.

References harvestingCosmics_cfg::fileMode, aod_PYTHIA_cfg::fileName, edm::ParameterSet::getUntrackedParameter(), and theConfiguration.

Referenced by write().

00163 {
00164   string fileName = theConfiguration.getUntrackedParameter< string >( "FileName", "KalmanAlignmentData.root" );
00165   string fileMode = theConfiguration.getUntrackedParameter< string >( "Mode", "RECREATE" );
00166   writeToTFile( fileName, fileMode );
00167 }


Member Data Documentation

edm::ParameterSet KalmanAlignmentDataCollector::theConfiguration [private]

Definition at line 59 of file KalmanAlignmentDataCollector.h.

Referenced by config(), and writeToTFile().

KalmanAlignmentDataCollector * KalmanAlignmentDataCollector::theDataCollector = new KalmanAlignmentDataCollector() [static, private]

Definition at line 57 of file KalmanAlignmentDataCollector.h.

Referenced by clear(), configure(), fillNtuple(), get(), and write().

std::map< std::string, std::vector< float > > KalmanAlignmentDataCollector::theHistoData [private]

Definition at line 61 of file KalmanAlignmentDataCollector.h.

Referenced by clearData().

std::map< std::string, std::vector< float > > KalmanAlignmentDataCollector::theNtupleData [private]

Definition at line 64 of file KalmanAlignmentDataCollector.h.

Referenced by fillTNtuple().

std::map< std::string, std::vector< float > > KalmanAlignmentDataCollector::theXGraphData [private]

Definition at line 62 of file KalmanAlignmentDataCollector.h.

Referenced by clearData().

std::map< std::string, std::vector< float > > KalmanAlignmentDataCollector::theYGraphData [private]

Definition at line 63 of file KalmanAlignmentDataCollector.h.

Referenced by clearData().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:26:14 2009 for CMSSW by  doxygen 1.5.4