CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

KalmanAlignmentDataCollector Class Reference

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

#include <KalmanAlignmentDataCollector.h>

List of all members.

Public Member Functions

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

Static Public Member Functions

static void clear (void)
static void configure (const edm::ParameterSet &config)
static void fillGraph (std::string graph_name, float x_data, float y_data)
static void fillGraph (std::string graph_name, int graph_number, 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 (void)
static void write (std::string file_name, std::string mode="RECREATE")

Private Member Functions

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

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.

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

Definition at line 18 of file KalmanAlignmentDataCollector.cc.

: theConfiguration( config ) {}
KalmanAlignmentDataCollector::~KalmanAlignmentDataCollector ( void  )

Definition at line 21 of file KalmanAlignmentDataCollector.cc.

{}

Member Function Documentation

void KalmanAlignmentDataCollector::clear ( void  ) [static]

Definition at line 87 of file KalmanAlignmentDataCollector.cc.

References clearData(), and theDataCollector.

void KalmanAlignmentDataCollector::clearData ( void  ) [private]

Definition at line 273 of file KalmanAlignmentDataCollector.cc.

References theHistoData, theXGraphData, and theYGraphData.

Referenced by clear().

{
  theHistoData.clear();
  theXGraphData.clear();
  theYGraphData.clear();
}
void KalmanAlignmentDataCollector::config ( const edm::ParameterSet config) [private]

Definition at line 93 of file KalmanAlignmentDataCollector.cc.

References theConfiguration.

Referenced by configure().

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

Definition at line 31 of file KalmanAlignmentDataCollector.cc.

References config(), and theDataCollector.

Referenced by KalmanAlignmentAlgorithm::initialize().

{
  //if ( !theDataCollector ) theDataCollector = new KalmanAlignmentDataCollector();
  theDataCollector->config( config );
}
static void KalmanAlignmentDataCollector::fillGraph ( std::string  graph_name,
float  x_data,
float  y_data 
) [static]
static void KalmanAlignmentDataCollector::fillGraph ( std::string  graph_name,
int  graph_number,
float  x_data,
float  y_data 
) [static]
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]
void KalmanAlignmentDataCollector::fillNtuple ( std::string  ntuple_name,
float  data 
) [static]

Definition at line 66 of file KalmanAlignmentDataCollector.cc.

References fillTNtuple(), and theDataCollector.

{
  //if ( !theDataCollector ) theDataCollector = new KalmanAlignmentDataCollector();
  theDataCollector->fillTNtuple( ntuple_name, data );
}
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,
float  data 
) [private]
void KalmanAlignmentDataCollector::fillTH1F ( std::string  histo_name,
int  histo_number,
float  data 
) [private]
void KalmanAlignmentDataCollector::fillTNtuple ( std::string  ntuple_name,
float  data 
) [private]

Definition at line 149 of file KalmanAlignmentDataCollector.cc.

References runTheMatrix::data, and theNtupleData.

Referenced by fillNtuple().

{
  if ( theNtupleData.find( ntuple_name ) == theNtupleData.end() )
  {
    theNtupleData[ntuple_name] = vector< float > ( 1, data );
   }
  else
  {
    theNtupleData[ntuple_name].push_back( data );
  }
}
KalmanAlignmentDataCollector * KalmanAlignmentDataCollector::get ( void  ) [static]

Definition at line 24 of file KalmanAlignmentDataCollector.cc.

References theDataCollector.

{
  //if ( !theDataCollector ) theDataCollector = new KalmanAlignmentDataCollector();
  return theDataCollector;
}
string KalmanAlignmentDataCollector::toString ( int  i) [private]

Definition at line 281 of file KalmanAlignmentDataCollector.cc.

References cond::rpcobtemp::temp.

{
  char temp[10];
  sprintf( temp, "%u", i );

  return string( temp );
}
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().

{
  //if ( !theDataCollector ) theDataCollector = new KalmanAlignmentDataCollector();
  theDataCollector->writeToTFile();
}
void KalmanAlignmentDataCollector::writeToTFile ( void  ) [private]

Definition at line 162 of file KalmanAlignmentDataCollector.cc.

References harvesting_AlCaReco_cfg::fileMode, convertXMLtoSQLite_cfg::fileName, edm::ParameterSet::getUntrackedParameter(), and theConfiguration.

Referenced by write().

{
  string fileName = theConfiguration.getUntrackedParameter< string >( "FileName", "KalmanAlignmentData.root" );
  string fileMode = theConfiguration.getUntrackedParameter< string >( "Mode", "RECREATE" );
  writeToTFile( fileName, fileMode );
}
void KalmanAlignmentDataCollector::writeToTFile ( std::string  file_name,
std::string  mode = "RECREATE" 
) [private]

Member Data Documentation

Definition at line 59 of file KalmanAlignmentDataCollector.h.

Referenced by config(), and writeToTFile().

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().