116 string full_histo_name = histo_name +
toString( histo_number );
142 string full_graph_name = graph_name +
toString( graph_number );
143 fillTGraph( full_graph_name, x_data, y_data );
176 TFile*
file =
new TFile( file_name.c_str(), mode.c_str() );
180 map< string, vector< float > >::iterator itH =
theHistoData.begin();
181 vector< float >::iterator itV;
186 tempHisto =
new TH1F( itH->first.c_str(), itH->first.c_str(), nBins, xMin, xMax );
188 itV = itH->second.begin();
189 while ( itV != itH->second.end() ) {
190 tempHisto->Fill( *itV );
203 map< string, vector< float > >::iterator itXG =
theXGraphData.begin();
204 map< string, vector< float > >::iterator itYG =
theYGraphData.begin();
213 int nData = itXG->second.size();
215 xData =
new float[nData];
216 yData =
new float[nData];
218 for (
int iData = 0; iData < nData; iData++ )
220 xData[iData] = itXG->second[iData];
221 yData[iData] = itYG->second[iData];
224 tempGraph =
new TGraph( nData, xData, yData );
225 tempGraph->SetName( itXG->first.c_str() );
226 tempGraph->SetTitle( itXG->first.c_str() );
242 map< string, vector< float > >::iterator itN =
theNtupleData.begin();
248 ntuple =
new TNtuple( itN->first.c_str(), itN->first.c_str(), itN->first.c_str() );
250 vector< float >::iterator itD = itN->second.begin(), itDEnd = itN->second.end();
251 while ( itD != itDEnd )
253 ntuple->Fill( *itD );
284 snprintf( temp,
sizeof(temp),
"%u", i );
std::map< std::string, std::vector< float > > theNtupleData
T getUntrackedParameter(std::string const &, T const &) const
static void fillHistogram(std::string histo_name, float data)
~KalmanAlignmentDataCollector(void)
void fillTGraph(std::string graph_name, float x_data, float y_data)
void fillTH1F(std::string histo_name, float data)
std::map< std::string, std::vector< float > > theXGraphData
std::map< std::string, std::vector< float > > theHistoData
A simple class that allows fast and easy histograming and the production of graphs.
std::string toString(int)
static KalmanAlignmentDataCollector * theDataCollector
static void fillNtuple(std::string ntuple_name, float data)
void fillTNtuple(std::string ntuple_name, float data)
KalmanAlignmentDataCollector(void)
static KalmanAlignmentDataCollector * get(void)
char data[epos_bytes_allocation]
edm::ParameterSet theConfiguration
void config(const edm::ParameterSet &config)
static void configure(const edm::ParameterSet &config)
static void fillGraph(std::string graph_name, float x_data, float y_data)
std::map< std::string, std::vector< float > > theYGraphData